/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "SpaceFont";
  src: url("./fonts/Space-Silhouette-Font.woff2") format("woff2"),
    url("./fonts/Space-Silhouette-Font.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: "Poppins", sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: url("./images/background.png") no-repeat center center fixed;
  background-size: cover;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

.overlay {
  background-color: rgba(0, 0, 0, 0.3);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 0;
  padding-bottom: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  position: relative;
}

.card:hover {
  transform: translateY(-10px); /* Move slightly up on hover */
}

.banner {
  position: relative;
  height: 120px;
  background-color: #ccc;
  overflow: hidden;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card {
  position: relative;
  margin-top: -60px;
  padding: 20px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: avatarZoom 2s ease-in-out infinite alternate;
  position: relative;
  max-width: 100%;
  max-height: 100%;
  margin-top: -30px;
}

.name {
  font-family: "SpaceFont";
  font-size: 3em;
  font-weight: bold;
  margin: 20px 0 10px;
  color: #6a0dad;
  animation: fadeInUp 1.5s ease-in-out;
}

.description {
  font-size: 0.85em;
  margin-bottom: 30px;
  color: #666;
  animation: fadeInUp 1.8s ease-in-out;
}

.links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 2.1s ease-in-out;
}

button {
  background-color: #6a0dad;
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  font-size: 0.95em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 250px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-family: "Poppins", sans-serif; /* Ensure button uses the same font */
  outline: none;
}

button:hover {
  background-color: #8a2be2;
  transform: scale(1.05);
}

.icon {
  height: auto;
  width: 20px;
  margin-left: 1px;
  object-fit: contain;
}

.button-text {
  flex: 1;
  text-align: center; /* Center text in the button */
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes avatarZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    background-position: 90%; /* Aligns the background to the top center */
  }

  .card {
    max-width: 75%;
    max-height: 75%;
    margin: 15px;
  }

  .banner {
    height: 100px;
  }

  .profile-card {
    margin-top: -40px;
  }

  .avatar {
    width: 100px;
    height: 100px;
    margin-top: -20px;
  }

  .name {
    font-size: 1.6em;
  }

  .description {
    font-size: 0.75em; /* Slightly reduced font size */
  }

  button {
    padding: 8px 16px;
    font-size: 0.85em;
    max-width: 50%;
  }

  .icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  body {
    background-position: 90%; /* Aligns the background to the top center */
  }

  .card {
    max-width: 70%; /* Further reduced to prevent the card from filling the screen */
    max-height: 85%;
  }

  .banner {
    height: 80px;
  }

  .profile-card {
    margin-top: -30px;
  }

  .avatar {
    width: 80px;
    height: 80px;
    margin-top: -10px;
  }

  .name {
    font-size: 1.4em;
  }

  .description {
    font-size: 0.7em;
  }

  button {
    padding: 7px 14px;
    font-size: 0.8em;
    max-width: 70%; /* Further reduced for smaller screens */
  }

  .icon {
    width: 16px;
  }
}
