body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1a0933, #2a1b4d, #3d214c);
  color: #ffffff;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  position: relative;
}#languageSwitch {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}#languageSelect {
  width: 180px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, #3b2a5e, #4c3a7a);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}#languageSelect:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 102, 170, 0.3);
  transform: translateY(-2px);
}#languageSelect option {
  background: #3b2a5e;
  color: #ffffff;
}
#loadingOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 9, 51, 0.9), rgba(42, 27, 77, 0.9));
  display: flex;
  flex-direction: column; 
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-out;
}

.loader {
  width: 60px;
  height: 60px;
  border: 6px solid transparent;
  border-top-color: #ff66aa;
  border-bottom-color: #ff3399;
  border-radius: 50%;
  animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

#loadingText {
  color: #ffffff;
  font-size: 18px;
  text-align: center;
  margin-top: 10px;
  animation: pulse 2s ease-in-out infinite;
}
#title {
  font-size: 36px;
  font-weight: 700;
  margin: 15px auto;
  background: linear-gradient(45deg, #ff66aa, #ffffff);
  -webkit-background-clip: text;
  position: relative;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}#description {
  max-width: 80%;
  margin: 15px auto;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: fadeInUp 1.2s ease-out 0.2s;
  animation-fill-mode: both;
}#warning {
  max-width: 80%;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 500;
  color: #9683d3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: fadeInUp 1.4s ease-out 0.4s;
  animation-fill-mode: both;
}@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}#search-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
  flex-wrap: wrap;
}#userId, #gameMode, #searchBtn {
  width: 300px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
}#userId {
  animation: slideInLeft 1s ease-out 0.6s;
  animation-fill-mode: both;
}#gameMode {
  width: 150px;
  animation: slideInRight 1s ease-out 0.8s;
  animation-fill-mode: both;
}#searchBtn {
  animation: scaleIn 1s ease-out 1s;
  animation-fill-mode: both;
}#userId, #gameMode {
  background: linear-gradient(135deg, #3b2a5e, #4c3a7a);
  color: #ffffff;
}#gameMode option {
  background: #3b2a5e;
  color: #ffffff;
}#userId::placeholder {
  color: #b0a4d8;
  font-size: 16px;
  font-style: italic;
}#userId:focus, #gameMode:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 102, 170, 0.3);
  transform: translateY(-2px);
}#searchBtn {
  background: linear-gradient(135deg, #ff66aa, #ff3399);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  text-transform: none;
}#searchBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff3399, #ff0066);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 51, 153, 0.4);
}#searchBtn:active:not(:disabled) {
  transform: scale(0.98);
}#searchBtn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}#results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}.milestone-card {
  width: 360px;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  transition: transform 0.3s ease-in-out, box-shadow 0.4s ease-in-out, filter 0.4s ease-in-out;
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  cursor: pointer; 
}.milestone-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  z-index: 1;

}.milestone-card > div {
  position: relative;
  z-index: 2;
}.milestone-card h3 {
  margin: 0;
  font-size: 16px;
}.milestone-card p {
  margin: 3px 0;
  font-size: 12px;
}.milestone-card a {
  color: #ff66aa;
  text-decoration: none;
}.milestone-card a:hover {
  text-decoration: underline;
}.milestone-card:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(255, 102, 170, 0.5);
  filter: brightness(1.1);
}.milestone-card:active {
  box-shadow: 0 6px 16px rgba(255, 102, 170, 0.4);
  filter: brightness(1.05); 
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, filter 0.1s ease-out;
}#credit {
  font-size: 12px;
  color: #b0a4d8;
  text-align: center;
  margin: 15px auto;
  animation: fadeInUp 1.6s ease-out 0.6s;
  animation-fill-mode: both;
}#loadingOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}#loadingText {
  color: #ffffff;
  font-size: 18px;
  text-align: center;
}@media (max-width: 900px) {
  #search-container {
    flex-direction: column;
    gap: 15px;
  }
}@media (max-width: 600px) {
  #userId, #gameMode, #searchBtn {
    width: 100%;
    max-width: 300px;
  }
  #languageSelect {
    width: 150px;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
#playerProfile {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 9;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  opacity: 0;
  visibility: hidden;
}
#playerProfile.show {
  opacity: 1;
  visibility: visible;
  animation: profilePop 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes profilePop {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
#playerProfile:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(255, 102, 170, 0.4); 
  background: rgba(0, 0, 0, 0.4); 
}

#playerAvatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #ff66aa;
  object-fit: cover;
  margin-bottom: 8px;
}

#playerInfo {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

#playerName {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #ff66aa;
  text-align: center;
}

#playerStats {
  margin: 5px 0 0;
  font-size: 12px;
  color: #b0a4d8;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 600px) {
  #playerProfile {
    position: static;
    margin: 10px auto;
    width: 150px;
  }
}
