:root {
  --glass-bg: rgba(31, 38, 52, 0.1); /* Very low opacity for main glass, almost invisible */
  --glass-border: rgba(255,255,255,0.05); /* Extremely subtle border */
  --glass-blur: 40px; /* Maxed out blur for super smooth background */
  --main-gradient: linear-gradient(120deg,#5e72ff 10%,#42e3fa 90%);
  --nav-blur: 45px; /* Even higher blur for navbar */
  /* Re-imagined shadow: very soft, wide glow, less like a distinct object shadow */
  --glass-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.2), 0 4px 20px rgba(0, 0, 0, 0.1);
  --white: #fff;
  --text-gradient: linear-gradient(120deg, #b0daff 10%, #95f8ff 90%); /* Brighter, more ethereal text gradient */
  --glow-color-light: rgba(170, 240, 255, 0.6); /* For subtle glowing effects */
  --glow-color-dark: rgba(94, 114, 255, 0.5);

  /* NEW: Define filter shadows for nav links */
  --nav-glow-filter: drop-shadow(0 0 15px var(--glow-color-light)) drop_shadow(0 0 8px var(--glow-color-light));
  --nav-glow-filter-active: drop_shadow(0 0 5px var(--glow-color-dark));
}

html {
  font-size: 16px; /* Base font size */
}

body {
  height: 100%;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(115deg, #0f121a 0%, #1e2430 100%); /* Slightly darker background for contrast */
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  background: url('assets/DiscordBanner.png') center center/cover no-repeat;
  opacity: 0.25; /* More visible background for refraction effect */
  filter: blur(6px) grayscale(0.05); /* Even more blur, less grayscale for color vibrancy */
  pointer-events: none;
  transform: scale(1.03); /* Slight scale to avoid blur edge artifacts */
}
.hero-bg {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* --- Navigation (Modified to be transparent and now hideable) --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4vw;
  min-height: 95px;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: all 0.5s ease-out; /* Smooth transition for hiding/showing */
}

/* Class to hide the main navbar */
nav.hidden {
  top: -120px; /* Moves it completely out of view upwards */
  opacity: 0;
  pointer-events: none; /* Prevents interaction when hidden */
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  user-select: none;
  padding-left: 20px;
}
.logo img {
  height: 120px; /* Make the logo bigger */
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
  border-radius: 20px;
  transition: transform 0.3s ease-out;
}
.logo img:hover {
  transform: scale(2); /* Slightly more pronounced hover effect, adjusted for responsiveness */
}

.logo span {
  font-size:1.6rem;
  font-weight:700;
  letter-spacing:0.1em;
  color: var(--white);
  text-transform: uppercase;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 15px var(--glow-color-dark); /* Subtle glow for logo text */
}
.nav-links {
  display: flex;
  gap: 10px; /* Increased gap */
  align-items: center;
  flex-wrap: nowrap;
  max-width: 100vw;

  scrollbar-width: none;
  padding-bottom: 2px;
  padding-right: 150px; /* This padding might push elements off screen on small devices */
  justify-content: flex-end; /* Align links to the right */
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links a, .nav-links .styles-link {
  position: relative;
  color: rgba(255, 255, 255, 0.8); /* Slightly faded for default state */
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  background: transparent; /* Absolutely no background */
  border: 1px solid transparent; /* Hairline transparent border */
  padding: 10px 22px; /* Generous padding for hover effect */
  border-radius: 25px; /* Very rounded, pill-like */
  box-shadow: none; /* No box shadow by default */
  backdrop-filter: none; /* No individual blur for nav links */
  -webkit-backdrop-filter: none;
  transition: all .35s cubic-bezier(0.25, 1, 0.5, 1); /* Slower, more elegant transition */
  cursor: pointer;
  opacity: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: inline-block;
  outline: none;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* Subtle text shadow for readability */
}
.nav-links a.active,
.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links .styles-link.active,
.nav-links .styles-link:hover,
.nav-links .styles-link:focus-visible {
  color: var(--white);
  background: rgba(255,255,255,0.02);
  box-shadow: none;
  filter: var(--nav-glow-filter);
  border: 1px solid rgba(255,255,255,0.3);
  text-decoration: none;
  transform: translateY(-2px) scale(1.02);
  text-shadow: 0 0 8px rgba(255,255,255,0.7);
}
.nav-links a:active,
.nav-links .styles-link:active {
  background: rgba(255,255,255,0.01);
  border-color: rgba(255,255,255,0.1);
  color: var(--white);
  transform: translateY(0) scale(0.99);
  box-shadow: none;
  filter: var(--nav-glow-filter-active);
}

/* --- Scrolled Navigation Buttons --- */
.scrolled-nav-buttons {
  position: fixed;
  top: 15px; /* Adjust top position as desired */
  left: 50%;
  transform: translateX(-50%);
  z-index: 99; /* Below main nav, above content */
  display: flex;
  gap: 10px; /* Space between buttons */
  padding: 10px 20px;
  background: rgba(31, 38, 52, 0.25); /* More visible glass background */
  border-radius: 25px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 0 10px rgba(255,255,255,0.05); /* Soft outer and inner shadow */
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  opacity: 0; /* Initially hidden */
  pointer-events: none; /* Cannot interact when hidden */
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center; /* Center items if they wrap */
  max-width: 90vw; /* Responsive width */
}

.scrolled-nav-buttons.visible {
  opacity: 1; /* Fully visible */
  pointer-events: all; /* Can interact when visible */
  transform: translateX(-50%) translateY(0); /* Ensure correct position when visible */
}

.scrolled-nav-buttons a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem; /* Smaller font size for compact buttons */
  padding: 8px 15px; /* Compact padding */
  border-radius: 20px; /* Rounded buttons */
  background: rgba(255,255,255,0.05); /* Subtle button background */
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s ease-out;
  white-space: nowrap; /* Prevent text wrapping inside buttons */
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.scrolled-nav-buttons a:hover,
.scrolled-nav-buttons a:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
  box-shadow: 0 0 10px var(--glow-color-light); /* Subtle glow on hover */
  transform: translateY(-1px);
}
.scrolled-nav-buttons a.active {
  background: var(--main-gradient); /* Use main gradient for active small button */
  border-color: var(--white);
  color: var(--white);
  box-shadow: 0 0 15px var(--glow-color-light);
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

@media (max-width: 1200px) {
  html { font-size: 15px; } /* Slightly reduce base font size */
  .nav-links {
    gap: 15px;
    padding-right: 20px; /* Adjust padding to prevent overflow */
  }
  .nav-links a, .nav-links .styles-link {
    font-size: 1.0rem;
    padding: 8px 18px;
  }
  .hero-title {
      font-size: 3.8rem; /* Scale down hero title */
      margin-bottom: 35px;
  }
  .hero-content {
      padding: 60px 30px;
  }
}

@media (max-width: 900px) {
  html { font-size: 14px; } /* Further reduce base font size */
  nav {
    padding: 15px 2vw; /* Adjusted padding for smaller screens */
    min-height: auto;
    flex-direction: column; /* Stack logo and nav links */
    align-items: center;
  }
  .logo {
      padding-left: 0; /* Center logo */
  }
  .logo img { height: 80px; } /* Smaller logo */
  .logo span { font-size: 1.4rem; }
  .nav-links {
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 0; /* Remove right padding */
    justify-content: center; /* Center nav links when stacked */
    width: 100%; /* Take full width */
  }
  .nav-links a, .nav-links .styles-link {
    font-size: 0.9rem;
    padding: 7px 14px;
  }
  .hero-title {
      font-size: 3rem;
      margin-bottom: 30px;
  }
  .hero-content {
      padding: 50px 25px;
      min-height: 350px;
  }
  .hero-btn {
      font-size: 1.3rem;
      padding: 15px 40px;
      margin-top: 40px;
  }
  #online-players-box {
      font-size: 1.1em;
      padding: 8px 20px;
  }

  /* For scrolled nav on small screens */
  .scrolled-nav-buttons {
    gap: 8px; /* Reduce gap further on small screens */
    padding: 8px 15px;
    top: 10px; /* Slightly higher for more space */
    max-width: 95vw; /* Allow more width */
  }
  .scrolled-nav-buttons a {
    font-size: 0.75rem; /* Even smaller font */
    padding: 6px 12px; /* Smaller padding */
  }

  /* Ranking page specific adjustments */
  .ranking-container {
    flex-direction: column; /* Stack buttons and content vertically */
    align-items: center; /* Center items when stacked */
    gap: 40px; /* More space between stacked sections */
  }
  .ranking-buttons-sidebar {
    width: 100%; /* Take full width */
    max-width: 250px; /* Constrain max width even when stacked */
    flex-direction: row; /* Buttons horizontally in a row */
    justify-content: center; /* Center buttons */
    flex-wrap: wrap; /* Allow buttons to wrap */
    padding: 15px; /* Adjust padding */
    gap: 10px; /* Smaller gap for buttons */
  }
  .ranking-tab-button {
    font-size: 0.95rem;
    padding: 10px 15px;
  }
  .ranking-content-display {
    width: 100%; /* Content display takes full width */
    padding: 25px; /* Adjust padding */
  }
  .ranking-content-display h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }
  .image-row {
    gap: 15px; /* Smaller gap for images */
  }
  .image-row img {
    max-height: 180px; /* Smaller images */
  }
  .ranking-tab-content p {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  html { font-size: 13px; } /* Further reduce base font size for very small screens */
  .logo img { height: 60px; }
  .logo span { font-size: 1.2rem; }
  nav {
    padding: 10px 2vw;
  }
  .nav-links {
    margin-top: 5px;
    flex-wrap: wrap; /* Allow links to wrap to next line */
    justify-content: center;
  }
  .nav-links a, .nav-links .styles-link {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
  .hero-title {
      font-size: 2.2rem;
      margin-bottom: 20px;
  }
  .hero-content {
      padding: 40px 20px;
      min-height: 300px;
      font-size: 1rem;
  }
  .hero-btn {
      font-size: 1.1rem;
      padding: 12px 30px;
      margin-top: 30px;
  }
  #online-players-box {
      font-size: 1em;
      padding: 6px 15px;
  }
  #welcomeBox {
      padding: 10px 20px;
      font-size: 1.1em;
      flex-direction: column; /* Stack welcome message and logout button */
      gap: 10px;
  }
  #welcomeMessage {
      padding-right: 0;
  }
  #logoutBtn {
      margin-left: 0;
      margin-top: 10px;
      font-size: 0.9rem;
      padding: 8px 18px;
  }

  /* For scrolled nav on very small screens */
  .scrolled-nav-buttons {
    gap: 5px;
    padding: 6px 10px;
    top: 5px;
  }
  .scrolled-nav-buttons a {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  /* Ranking page specific adjustments for small screens */
  .ranking-buttons-sidebar {
    gap: 8px; /* Even smaller gap for buttons */
    padding: 10px;
  }
  .ranking-tab-button {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  .ranking-content-display {
    padding: 15px;
  }
  .ranking-content-display h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
  .image-row {
    gap: 10px; /* Smaller gap for images */
  }
  .image-row img {
    max-height: 120px; /* Even smaller images */
    border-radius: 8px;
  }
  .character-name {
      font-size: 0.85rem; /* Smaller font for names */
      margin-bottom: 3px;
  }
  .ranking-tab-content p {
    font-size: 0.9rem;
  }

  /* Modal responsiveness for smaller screens */
  .modal-content {
      width: 95%;
      padding: 15px;
  }
  .prev-slide, .next-slide {
      padding: 10px;
      font-size: 16px;
  }
  .close-button {
      font-size: 22px;
      top: 8px;
      right: 12px;
  }
  .slider-dots {
      bottom: 8px;
  }
  .dot {
      height: 9px;
      width: 9px;
  }

  /* Login Box adjustments */
  .login-glass-box {
      width: 95%;
      padding: 30px 20px;
      right: 2.5vw; /* Adjust positioning for full responsiveness */
      bottom: 2.5vw;
      min-height: auto;
      font-size: 1rem;
  }
  .login-form h2 {
      font-size: 1.3rem;
      margin-bottom: 25px;
  }
  .input-group label {
      font-size: 0.95rem;
  }
  .input-group input {
      padding: 10px 14px;
      font-size: 1rem;
  }
  .login-btn {
      font-size: 1.1rem;
      padding: 12px 0;
      margin-top: 25px;
  }
  .login-small-text {
      font-size: 0.9rem;
      margin-top: 20px;
  }
}

/* Optional: Additional breakpoint for very small mobile devices */
@media (max-width: 480px) {
    html { font-size: 12px; }
    .logo img { height: 100px; }
    .logo span { font-size: 1rem; }
    .nav-links a, .nav-links .styles-link {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-content {
        padding: 30px 15px;
    }
    .hero-btn {
        font-size: 1rem;
        padding: 10px 25px;
    }
    .scrolled-nav-buttons {
        max-width: 98vw;
        gap: 3px;
        padding: 4px 8px;
    }
    .scrolled-nav-buttons a {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    .ranking-tab-button {
        font-size: 0.8rem;
        padding: 7px 10px;
    }
    .ranking-content-display h2 {
        font-size: 1.2rem;
    }
    .image-row img {
        max-height: 100px;
    }
    .character-name {
        font-size: 0.8rem;
    }
}


.main-content-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 2;
  min-height: 640px; /* Adjusted if content is shorter */
  padding-top: 140px; /* Ensure content is below initial navbar */
  padding-bottom: 60px;
  box-sizing: border-box; /* Include padding in height */
}
.hero-content {
  color: #fcfcfd;
  border: 2.2px solid rgba(255,255,255,0.08);
  background: rgba(31, 38, 52, 0.08);
  border-radius: 40px;
  max-width: 850px; /* Default max-width for most pages */
  width: 90%; /* Responsive width */
  margin: 0 auto;
  padding: 80px 40px;
  backdrop-filter: blur(20) saturate(160%) brightness(120%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%) brightness(120%);
  text-align: center;
  opacity: 1;
  pointer-events: all;
  font-size: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px; /* Default min-height for most pages */
  box-shadow: 0 10px 45px rgba(0,0,0,0.35), 0 4px 20px rgba(0,0,0,0.2);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  box-sizing: border-box; /* Include padding in max-width */
}
/* IMPORTANT: Override for ranking.html's hero-content */
/* If you want the ranking page hero-content to be wider, ensure this is applied.
   The inline style in ranking.html is stronger, but for a global stylesheet,
   you might want a specific class or ID for ranking page's hero-content */
#ranking-page-hero-content.hero-content { /* Example if you add #ranking-page-hero-content ID */
  max-width: 1000px;
  padding: 60px 40px;
  min-height: auto; /* Allow height to adjust to content */
}


.hero-content p {
  color: #e0f2ff;
  line-height: 1.6;
}
.hero-content b {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content a {
  font-weight: 700;
  text-decoration: none;
  background: var(--main-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.25s ease-out;
  text-shadow: 0 0 5px rgba(255,255,255,0.4);
}
.hero-content a:hover {
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 45px;
  margin-top: 0;
  background: var(--main-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(94, 114, 255, 0.7);
}
.hero-btn {
  display: inline-block;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.2);
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 auto;
  margin-top: 50px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(255,255,255,0.6);
  transition: all .4s cubic-bezier(0.25, 1, 0.5, 1);
  outline: none;
  box-shadow: 0 0 20px rgba(94, 114, 255, 0.3);
  padding: 20px 60px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-btn:active {
  background: rgba(255,255,255,0.02);
  border: 2px solid rgba(255,255,255,0.3);
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 0 10px var(--glow-color-dark);
}

/* --- Online Players Display --- */
#online-players-box {
  margin: 25px 0;
  padding: 10px 25px;
  background: rgba(31, 38, 52, 0.15); /* Slightly more opaque than main glass for readability */
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  color: #fff;
  font-size: 1.2em;
  font-weight: 600;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}
#online-players-box span {
  background: linear-gradient(90deg, #98ff98, #d0ff98); /* Brighter green gradient */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  text-shadow: 0 0 5px rgba(152, 255, 152, 0.7); /* Glow for player count */
}


/* --- Welcome Box and Logout Button --- */
#welcomeBox {
  margin-top: 50px;
  display: flex; /* Changed from 'none' to 'flex' for correct layout when visible */
  align-items: center;
  padding: 15px 30px;
  background: rgba(31, 38, 52, 0.1);
  border-radius: 25px;
  border: 1.5px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2), 0 3px 15px rgba(0,0,0,0.1);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: #fff;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#welcomeMessage {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-right: 20px;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255,255,255,0.5); /* Glow for welcome text */
}

#logoutBtn {
  margin-left: 25px;
  background: transparent; /* Truly transparent background */
  border: 1.5px solid rgba(255,255,255,0.1); /* Very subtle border */
  color: rgba(255, 255, 255, 0.8); /* Slightly faded text by default */
  font-weight: 600;
  font-size: 1.1rem;
  padding: 10px 22px;
  border-radius: 20px; /* Very rounded */
  cursor: pointer;
  transition: all .35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: none; /* No default shadow */
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  outline: none;
}

#logoutBtn:hover,
#logoutBtn:focus-visible {
  background: rgba(255,255,255,0.02); /* Minimal background on hover */
  border-color: rgba(255,255,255,0.4); /* Brighter border on hover */
  color: #fff;
  box-shadow: 0 0 12px var(--glow-color-light); /* Subtle glow on hover */
  transform: translateY(-1px) scale(1.01);
  text-shadow: 0 0 8px rgba(255,255,255,0.8); /* Brighter text glow */
}

#logoutBtn:active {
  background: rgba(255,255,255,0.01);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(0) scale(0.99);
  box-shadow: inset 0 0 5px var(--glow-color-dark);
}

/* --- Login Box (Styles remain for structure, but display is 'none' by default) --- */
.login-glass-box {
  position: fixed;
  right: 5vw;
  bottom: -500px;
  z-index: 1000;
  background: rgba(31, 38, 52, 0.12);
  border-radius: 35px;
  border: 1.7px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 3px 15px rgba(0,0,0,0.15);
  padding: 40px;
  width: 350px;
  max-width: 90vw; /* Use max-width for responsiveness */
  min-height: 420px;
  max-height: 90vh;
  box-sizing: border-box;
  color: #fff;
  backdrop-filter: blur(var(--glass-blur)) saturate(160%) brightness(115%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%) brightness(115%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-size: 1.08rem;
  transition: bottom 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease-out;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}
.login-glass-box.show {
    bottom: 5vw;
    opacity: 1;
    pointer-events: all;
}
.close-login-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    z-index: 1001;
}
.close-login-btn:hover {
    color: var(--white);
    transform: rotate(90deg);
}
.login-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    flex-grow: 1;
    justify-content: center;
}
.login-form h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 35px 0;
  text-align: center;
  color: #fff;
  letter-spacing: 0.05em;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 10px var(--glow-color-dark);
  width: 100%;
}
.input-group {
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.input-group label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e6f3ff;
  letter-spacing: 0.02em;
  text-align: left;
  width: 100%;
}
.input-group input {
  border-radius: 15px;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 12px 16px;
  font-size: 1.15rem;
  font-family: inherit;
  outline: none;
  transition: all .25s ease-out;
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.15);
}
.input-group input:focus {
  border: 1.5px solid rgba(66, 227, 250, 0.5);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.2), 0 0 0 3px rgba(66, 227, 250, 0.25);
}
.login-btn {
  margin-top: 30px;
  width: 100%;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 18px;
  padding: 14px 0;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all .35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 15px rgba(94, 114, 255, 0.25);
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
  outline: none;
}
.login-btn:hover, .login-btn:focus {
  background: rgba(255,255,255,0.03);
  color: #fff;
  box-shadow: 0 0 25px var(--glow-color-light), inset 0 0 10px var(--glow-color-light);
  border: 2px solid rgba(255,255,255,0.5);
  transform: translateY(-2px) scale(1.01);
  text-shadow: 0 0 12px #fff;
}
.login-btn:active {
  transform: translateY(0) scale(0.99);
  background: rgba(255,255,255,0.01);
  border-color: rgba(255,255,255,0.2);
  box-shadow: inset 0 0 8px var(--glow-color-dark);
}
.login-small-text {
  margin-top: 25px;
  text-align: center;
  font-size: 1rem;
  color: #cce0f5;
  opacity: 0.95;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.login-small-text a {
  color: #8af0ff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease-out;
  text-shadow: none;
}
.login-small-text a:hover {
  color: #5e72ff;
}

/* Slider Styles (kept original) */
.slider-container {
  flex: 0 0 294px;
  height: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.slider-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Ranking Page Specific Styles --- */

.hero-content {
  /* This is the existing hero-content, but it needs to be wider to contain the ranking system */
  max-width: 1000px; /* Increased max-width */
  padding: 60px 40px; /* Adjusted padding */
  display: flex; /* Ensure it's a flex container */
  flex-direction: column; /* Stack children vertically */
  align-items: center; /* Center items horizontally */
  /* Remove fixed min-height if it conflicts with content */
  min-height: auto; /* Allow height to adjust to content */
}

.ranking-container {
  display: flex;
  flex-direction: row; /* Buttons on left, content on right */
  gap: 30px; /* Space between sidebar and content */
  margin-top: 50px; /* Space from hero title/paragraph */
  width: 100%; /* Take full width of its parent (hero-content) */
  max-width: 900px; /* Max width for the entire ranking block */
  align-items: flex-start; /* Align items to the top */
}

.ranking-buttons-sidebar {
  display: flex;
  flex-direction: column; /* Stack buttons vertically */
  gap: 20px; /* Space between buttons */
  flex: 0 0 200px; /* Fixed width for the sidebar, prevent shrinking */
  padding: 20px;
  background: rgba(31, 38, 52, 0.15); /* Subtle glass background for sidebar */
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  align-items: stretch; /* Make buttons fill the width of the sidebar */
}

.ranking-tab-button {
  background: rgba(255,255,255,0.05); /* Lighter background for inactive buttons */
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 15px 20px;
  border-radius: 18px; /* Rounded corners */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  outline: none;
  white-space: nowrap; /* Prevent text wrapping */
}

.ranking-tab-button:hover,
.ranking-tab-button:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
  box-shadow: 0 0 15px var(--glow-color-light); /* Subtle glow on hover */
  transform: translateY(-2px);
}

.ranking-tab-button.active {
  background: var(--main-gradient); /* Use your main gradient for active button */
  border-color: var(--white);
  color: var(--white);
  box-shadow: 0 0 20px rgba(94, 114, 255, 0.5); /* Stronger glow for active */
  transform: translateY(-1px);
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.ranking-tab-button:active {
  transform: translateY(0);
  box-shadow: inset 0 0 8px var(--glow-color-dark);
}

.ranking-content-display {
  flex-grow: 1; /* Take up remaining space */
  padding: 30px;
  background: rgba(31, 38, 52, 0.1); /* Lighter glass background for content */
  border-radius: 25px;
  border: 1.5px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 3px 15px rgba(0,0,0,0.15);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%) brightness(115%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%) brightness(115%);
  color: #fff;
  overflow: hidden; /* Important for hiding inactive tabs */
  position: relative; /* For absolute positioning of tabs for transitions */
}

.ranking-content-display h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 10px var(--glow-color-dark);
}

.ranking-tab-content {
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.4s ease-out; /* Smooth fade in/out */
  position: absolute; /* Allow overlapping for transition */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 30px; /* Match parent padding */
  box-sizing: border-box; /* Include padding in width/height */
  overflow-y: auto; /* If content is long, enable scroll */
}

.ranking-tab-content.active {
  display: block; /* Show the active tab */
  opacity: 1; /* Fade in */
  position: relative; /* Take up space in flow */
}

.ranking-tab-content p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e0f2ff;
  margin-bottom: 15px;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.image-row {
  display: flex;
  justify-content: center; /* Center images horizontally */
  align-items: flex-end; /* Align characters to the bottom for consistent 'ground' */
  gap: 20px; /* Space between character containers */
  margin-bottom: 30px; /* Space below images */
  flex-wrap: wrap; /* Allow images to wrap on smaller screens */
  padding-top: 10px; /* Give a little vertical space if needed */
}

/* New styles for the container holding character and name */
.character-display {
  display: flex;
  flex-direction: column; /* Stack name above image */
  align-items: center; /* Center name and image horizontally */
  text-align: center; /* Ensure name text is centered */
  /* Add subtle transform/transition for coherence with image hover */
  transition: transform 0.3s ease-out;
}

.character-display:hover {
  transform: translateY(-8px); /* Lift the entire character and name on hover */
}


.character-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff; /* White text for names */
  margin-bottom: 8px; /* Space between name and character */
  background: linear-gradient(90deg, #b0daff, #95f8ff); /* Apply the text gradient */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 10px rgba(170, 240, 255, 0.7); /* Subtle glow for names */
  white-space: nowrap; /* Prevent names from wrapping */
  transition: transform 0.3s ease-out; /* Match hover transition with image */
}

/* Ensure character name lifts slightly with the image on hover */
.character-display:hover .character-name {
    text-shadow: 0 0 15px rgba(170, 240, 255, 0.9), 0 0 5px rgba(94, 114, 255, 0.7); /* Enhanced glow on hover */
    transform: translateY(-2px); /* Slight extra lift for text */
}


.image-row img {
  max-height: 250px; /* Adjust this value based on the desired height of your characters */
  width: auto; /* Let the width adjust to maintain aspect ratio */
  object-fit: contain; /* Ensures the whole character is visible, no cropping */
  border-radius: 15px; /* Rounded corners for images (if they have a background or are not perfectly transparent) */

  transition: transform 0.3s ease-out, filter 0.3s ease-out; /* Use filter for glow */
  filter: drop-shadow(0 0 0 rgba(0,0,0,0)); /* Start with no glow filter */
}

/* IMPORTANT: The hover effect for the image should now be on .character-display:hover */
.character-display:hover img {
  /* No need for transform here anymore, as it's handled by .character-display:hover */
  filter: drop_shadow(0 5px 25px rgba(94, 114, 255, 0.6)) drop_shadow(0 0 10px rgba(170, 240, 255, 0.8));
}

/* --- Pop-up Modal Styles (NEW ADDITIONS) --- */
.modal {
    display: none; /* Hidden by default, JS will change to flex on load if needed */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if content is too large */
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity for overlay */
    backdrop-filter: blur(8px); /* Subtle blur behind modal */
    -webkit-backdrop-filter: blur(8px);
    display: flex; /* Use flexbox for centering content */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    opacity: 0; /* Start hidden for fade-in effect */
    transition: opacity 0.3s ease-out; /* Fade-in animation for the overlay */
}

.modal.show {
    opacity: 1; /* Show with fade-in */
}

.modal-content {
    position: relative; /* For positioning the close button */
    background: rgba(31, 38, 52, 0.2); /* Glassy background for the content box */
    border-radius: 25px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.05);
    max-width: 800px; /* Max width of the modal content */
    width: 90%; /* Responsive width */
    padding: 30px; /* Padding inside the modal */
    box-sizing: border-box; /* Include padding in the element's total width and height */
    transform: translateY(20px); /* Start slightly lower for subtle animation on open */
    transition: transform 0.3s ease-out; /* Animate content movement */
}

.modal.show .modal-content {
    transform: translateY(0); /* Move up to final position when modal is shown */
}

.close-button {
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    text-shadow: 0 0 8px rgba(0,0,0,0.5); /* Shadow for the 'X' */
    z-index: 10; /* Ensure it's above slider elements */
}

.close-button:hover,
.close-button:focus {
    color: var(--glow-color-light); /* Defined in your existing CSS */
    transform: rotate(90deg); /* Cool rotation effect on hover */
}

/* --- Image Slider within Pop-up --- */
.slider-container-popup {
    position: relative;
    width: 100%;
    overflow: hidden; /* Crucial to hide parts of slides not currently visible */
    border-radius: 15px; /* Match modal content border-radius for consistency */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3); /* Inner shadow for depth */
}

.slider-track {
    display: flex; /* Arranges slides side-by-side */
    transition: transform 0.5s ease-in-out; /* Smooth transition when changing slides */
}

.slide-link {
    min-width: 100%; /* Each slide occupies the full width of its container */
    display: block; /* Ensures the link takes up the full space of the image */
    text-decoration: none; /* Removes default underline from links */
    line-height: 0; /* Prevents extra space below images */
}

.slider-track img {
    width: 100%;
    height: auto; /* Maintains aspect ratio of the image */
    display: block; /* Removes extra space below images */
    border-radius: 15px; /* Apply border-radius to the images too */
}

.prev-slide, .next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%; /* Vertically center */
    transform: translateY(-50%); /* Adjust for perfect vertical centering */
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0; /* Default for prev-slide */
    user-select: none; /* Prevent text selection on arrows */
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background */
    border: none;
    outline: none;
    z-index: 10; /* Ensure arrows are above images */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.next-slide {
    right: 0;
    border-radius: 3px 0 0 3px; /* Rounded corners on left side for next button */
}

.prev-slide {
    left: 0;
}

.prev-slide:hover, .next-slide:hover {
    background-color: rgba(0, 0, 0, 0.7); /* Darker on hover */
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 15px; /* Position at the bottom of the slider container */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    display: flex;
    gap: 10px; /* Space between dots */
    z-index: 10; /* Ensure dots are above images */
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 2px; /* Small margin around each dot */
    background-color: rgba(255, 255, 255, 0.4); /* Faded white for inactive dots */
    border-radius: 50%; /* Makes them circular */
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: rgba(255, 255, 255, 0.9); /* Brighter white for active/hovered dot */
    transform: scale(1.2); /* Slightly larger on active/hover */
}

/* Ensure the main navigation hides correctly behind the modal */
body.modal-open { /* A class you could add to body if you want to block scroll while modal is open */
  overflow: hidden;
}
.menu-toggle {
  display: block !important;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  font-size: 2rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}



.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: rgba(31, 38, 52, 0.2);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.4);
  border-left: 1px solid rgba(255,255,255,0.1);
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: right 0.4s ease-in-out;
  z-index: 1100;
  border-top-left-radius: 90px;
  border-bottom-left-radius: 25px;
}

.side-menu.show {
  right: 0;
}

.side-menu a {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 15px;
  background: rgba(255,255,255,0.05);
  transition: all 0.3s ease;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.side-menu a:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 10px var(--glow-color-light);
}

/* Show toggle on all screen sizes */
@media (max-width: 1024px) {
  .menu-toggle {
    display: none;
  }

  .nav-links {
    display: none !important;
  }
}

/* Optional: Hide nav-links entirely (if needed) */
.nav-links {
  display: none;
}

.menu-toggle {
  display: block !important;
}





