/* ==========================================================================
   HOURGLASS WEB APPLICATION - CORE STYLESHEET
   Dark Discord-themed Dashboard with Responsive Modern UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Global Reset & Typography
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at center, #0D1721 25%, #05090D 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. Layout Containers
   -------------------------------------------------------------------------- */
.main-container {
  width: 92%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px 0 40px;
  min-height: 100vh;
}

@media (max-width: 992px) {
  .main-container {
    width: 94%;
    padding: 15px 0 30px;
  }
}

@media (max-width: 640px) {
  .main-container {
    width: 100%;
    padding: 12px 14px 25px;
  }
}

/* --------------------------------------------------------------------------
   3. Main App Header & Modern Glassmorphism Navbar
   -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 14px;
  z-index: 1000;
  margin-bottom: 26px;
}

.app-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 28, 41, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 8px 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-navbar:hover {
  border-color: rgba(255, 255, 255, 0.13);
}

/* Brand */
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  user-select: none;
  flex-shrink: 0;
}

.app-logo {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.app-brand:hover .app-logo {
  transform: rotate(12deg) scale(1.08);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.6));
}

.app-title {
  display: inline-block;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.3px;
  line-height: 1.4;
  padding-bottom: 2px;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-badge {
  background: rgba(88, 101, 242, 0.2);
  color: #818cf8;
  border: 1px solid rgba(88, 101, 242, 0.4);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1.5px 5px;
  border-radius: 5px;
  text-transform: uppercase;
  line-height: 1.1;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.mobile-nav-toggle .icon-close {
  display: none;
}

.mobile-nav-toggle.open .icon-open {
  display: none;
}

.mobile-nav-toggle.open .icon-close {
  display: block;
}

/* Navigation Menu */
.app-nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  margin-left: 8px;
  min-width: 0;
}

/* Page Selection Bar (Dock style) */
.app-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 3px;
  background: rgba(11, 19, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  flex-wrap: nowrap;
}

.app-nav-item {
  position: relative;
  flex-shrink: 0;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.81rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.app-nav-link .nav-icon {
  flex-shrink: 0;
  transition: transform 0.18s ease, stroke 0.18s ease;
}

.app-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.app-nav-link:hover .nav-icon {
  transform: translateY(-1px);
  stroke: #ffffff;
}

.app-nav-link.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.32);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.18);
}

.app-nav-link.active .nav-icon {
  stroke: #38bdf8;
}

/* Header Actions (Search, Lang, Invite) */
.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Quick Search Button */
.btn-quick-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  background: rgba(11, 19, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0 10px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn-quick-search:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.search-btn-text {
  font-size: 0.8rem;
}

.search-btn-kbd {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.68rem;
  font-family: inherit;
  color: #64748b;
  font-weight: 700;
  line-height: 1.2;
}

.btn-quick-search:hover .search-btn-kbd {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  background: rgba(11, 19, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  border: 1px solid transparent;
  user-select: none;
}

.lang-flag {
  width: 15px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
  opacity: 0.8;
  transition: all 0.2s ease;
}

.lang-code {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-btn:hover .lang-flag {
  opacity: 1;
  transform: scale(1.05);
}

.lang-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: 0 1px 6px rgba(56, 189, 248, 0.16);
  font-weight: 700;
}

.lang-btn.active .lang-flag {
  opacity: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 4px rgba(56, 189, 248, 0.35);
}

/* Discord CTA */
.btn-discord-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  background: #5865F2;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0 11px;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(88, 101, 242, 0.35);
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.btn-discord-nav:hover {
  background: #4752C4;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(88, 101, 242, 0.45);
  color: #ffffff;
}

.btn-discord-nav .discord-svg-icon {
  flex-shrink: 0;
}

/* Responsive navbar adjustments for medium/compact desktop */
@media (max-width: 1350px) {
  .btn-quick-search .search-btn-text {
    display: none;
  }
  .app-badge {
    display: none;
  }
}

@media (max-width: 1250px) {
  .btn-discord-nav .discord-btn-text {
    display: none;
  }
  .btn-discord-nav {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 9px;
  }
  .app-nav-link {
    padding: 5px 7px;
    font-size: 0.79rem;
    gap: 4px;
  }
}

@media (max-width: 1140px) {
  .app-navbar {
    padding: 6px 10px;
    gap: 8px;
  }
  .app-nav-menu {
    margin-left: 6px;
    gap: 6px;
  }
  .app-nav-link {
    padding: 5px 6px;
    font-size: 0.76rem;
  }
  .app-nav-link .nav-icon {
    width: 14px;
    height: 14px;
  }
  .lang-btn {
    padding: 0 5px;
  }
}

/* Mobile drawer below 1024px */
@media (max-width: 1024px) {
  .app-header {
    position: relative;
    top: 0;
    margin-bottom: 20px;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .app-nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin-left: 0;
    background: rgba(17, 27, 39, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
    box-sizing: border-box;
    max-width: 100%;
  }
  .app-nav-menu.open {
    display: flex;
    animation: navFadeDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .app-nav-list {
    flex-direction: column;
    width: 100%;
    gap: 6px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .app-nav-item {
    width: 100%;
  }
  .app-nav-link {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 10px;
    gap: 10px;
  }
  .app-nav-link .nav-icon {
    width: 18px;
    height: 18px;
  }
  .app-nav-actions {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
  }
  .btn-quick-search {
    width: 100%;
    flex: 1 1 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  .btn-quick-search .search-btn-text {
    display: inline;
  }
  .lang-switch {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
  }
  .lang-btn {
    flex: 1;
    justify-content: center;
    padding: 0 4px;
  }
  .btn-discord-nav {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    padding: 0 8px;
    width: auto;
  }
  .btn-discord-nav .discord-btn-text {
    display: inline;
  }
  .app-badge {
    display: inline-block;
  }
}

@media (max-width: 480px) {
  .app-nav-actions {
    flex-direction: column;
    gap: 10px;
  }
  .lang-switch {
    width: 100%;
    flex: 1 1 100%;
    height: 38px;
  }
  .btn-discord-nav {
    width: 100%;
    flex: 1 1 100%;
    height: 38px;
    justify-content: center;
  }
}

@keyframes navFadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* --------------------------------------------------------------------------
   4. Top Leaderboard Tabs (Utilisateurs / Serveurs switch)
   -------------------------------------------------------------------------- */
.top-tabs-wrapper {
  margin: 10px 0 22px;
}

.top-tabs,
.nav-menu-horizontal-short {
  display: inline-flex;
  gap: 8px;
  background: rgba(21, 32, 46, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  list-style: none;
  max-width: 100%;
}

.top-tab-btn,
.nav-menu-item-short a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: #94a3b8;
  padding: 9px 20px;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.top-tab-btn svg {
  flex-shrink: 0;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.top-tab-btn:hover,
.nav-menu-item-short a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.top-tab-btn:hover svg {
  stroke: #ffffff;
}

.top-tab-btn.active,
.nav-menu-item-short-selected a {
  background: rgba(56, 189, 248, 0.16) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.38) !important;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.22) !important;
}

.top-tab-btn.active svg {
  stroke: #38bdf8;
}

@media (max-width: 520px) {
  .top-tabs,
  .nav-menu-horizontal-short {
    width: 100%;
    display: flex;
  }
  .top-tab-btn,
  .nav-menu-item-short a {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

/* --------------------------------------------------------------------------
   5. Cards & Boxes
   -------------------------------------------------------------------------- */
.gray-box {
  background-color: #15202e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 16px 20px;
  margin-top: 15px;
  margin-bottom: 15px;
  display: block;
  border-radius: 20px;
  width: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.small-border-radius {
  border-radius: 16px;
}

.link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.link:hover {
  text-decoration: none;
}

div.gray-box.link:hover {
  background-color: #1a293b;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.dynamic {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin: 0;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   6. Metric & Stats Containers (KPI Boxes)
   -------------------------------------------------------------------------- */
.home-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* 2-column grid for the 30-day activity KPI cards */
.home-stats-grid-2cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* Balanced 6-column grid for the 5 bot statistics: Row 1 = 2 featured cards (50% each), Row 2 = 3 cards (33% each) */
.home-stats-grid-bot {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
}

.home-stats-grid-bot .featured-kpi {
  grid-column: span 3;
}

.home-stats-grid-bot .home-stats-box:not(.featured-kpi) {
  grid-column: span 2;
}

.home-stats-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #15202e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}

.home-stats-box:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
}

.home-stats-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.home-stats-label {
  font-size: 0.85rem;
  color: #8fa3b8;
  font-weight: 500;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-stats-value {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-stats-value.time-value {
  font-size: clamp(1.02rem, 1.4vw, 1.3rem);
  white-space: nowrap;
}

.home-stats-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(57, 146, 190, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.home-stats-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@media (max-width: 860px) {
  .home-stats-grid-bot {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .home-stats-grid-bot .featured-kpi {
    grid-column: span 1;
  }
  .home-stats-grid-bot .home-stats-box:not(.featured-kpi) {
    grid-column: span 1;
  }
  .home-stats-grid-bot .home-stats-box:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .home-stats-container,
  .home-stats-grid-2cols,
  .home-stats-grid-bot {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-stats-grid-bot .featured-kpi,
  .home-stats-grid-bot .home-stats-box:not(.featured-kpi),
  .home-stats-grid-bot .home-stats-box:last-child {
    grid-column: span 1;
  }
  .home-stats-box {
    padding: 14px 16px;
  }
}

/* Home Dashboard Section Headers & Badges */
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.home-section-icon svg {
  display: block;
}

.home-section-icon.icon-30d {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.home-section-icon.icon-alltime {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.home-section-icon.icon-db {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.home-section-title {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 0;
}

.home-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.home-section-badge.badge-30d {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.home-section-badge.badge-alltime {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.home-section-badge.badge-db {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c084fc;
}

.home-stats-box.featured-kpi-30d {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(21, 32, 46, 0.95), rgba(35, 28, 16, 0.6));
}

.home-stats-box.featured-kpi-30d:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.home-stats-icon.icon-accent-amber {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.home-stats-icon.icon-accent-purple {
  background-color: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

/* --------------------------------------------------------------------------
   7. Filter Forms & Controls
   -------------------------------------------------------------------------- */
.top-form {
  margin: 15px 0 25px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: rgba(21, 32, 46, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

.top-label {
  font-weight: 600;
  color: #cbd5e1;
  font-size: 0.92rem;
  margin-right: 8px;
}

.top-select {
  padding: 9px 16px;
  background-color: #162436;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.92rem;
  cursor: pointer;
  color: #ffffff;
  outline: none;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.top-select:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: #1a2c42;
}

.top-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.top-button {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 22px;
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.32);
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.top-button svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.top-button:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.48);
}

.top-button:hover svg {
  transform: scale(1.1);
}

.top-button:active {
  transform: translateY(0);
}

/* Top Leaderboard - Server Search Selector */
.top-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-server-filter-group {
  flex: 1 1 240px;
  min-width: 220px;
  position: relative;
}

.top-server-search-wrap {
  position: relative;
  flex: 1;
  width: 100%;
}

.top-server-search-bar {
  padding: 8px 12px;
  height: 40px;
  background-color: #162436;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.top-server-search-bar:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: #1a2c42;
}

.top-server-search-bar:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
  background-color: #1a2c42;
}

.top-server-search-input {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.top-server-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.top-server-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: rgba(17, 27, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(56, 189, 248, 0.15);
  z-index: 200;
  overflow: hidden;
  animation: dropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.top-server-dropdown .page-search-dropdown-inner {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.all-servers-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .top-tabs-wrapper {
    margin: 8px 0 10px;
  }
  .top-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px 10px;
    margin: 8px 0 8px;
  }
  .top-filter-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    flex: none;
  }
  .top-server-filter-group {
    width: 100%;
    flex: none;
    min-width: 0;
    margin-bottom: 0;
  }
  .top-server-search-wrap {
    flex: none;
    width: 100%;
  }
  .top-server-search-input {
    font-size: 16px;
  }
  .top-server-dropdown {
    min-width: 100%;
  }
  .top-select {
    width: 100%;
    padding: 8px 14px;
  }
  .top-button {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 4px;
    padding: 10px;
  }

  /* Remove excessive gap under the form and search bar on mobile */
  .top-form + .gray-box,
  .top-form + .active-server-banner,
  .top-form + .top-active-server-banner {
    margin-top: 0 !important;
  }

  .active-server-banner,
  .top-active-server-banner {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
  }

  .active-server-banner + .gray-box,
  .top-active-server-banner + .gray-box {
    margin-top: 0 !important;
  }

  .gray-box {
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 12px 14px;
    border-radius: 14px;
  }
}

/* Search Bar Input */
.search-input {
  padding: 12px 18px;
  margin-top: 10px;
  margin-bottom: 20px;
  width: 100%;
  background-color: #172435;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  outline: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.search-input::placeholder {
  color: #64748b;
}

.search-input:focus {
  background-color: #1e3047;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* --------------------------------------------------------------------------
   8. Leaderboard & Stats Rows
   -------------------------------------------------------------------------- */
.stats-box {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

/* Podium Rank Badges & Numbers */
.rank-badge,
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 800;
  user-select: none;
  letter-spacing: -0.2px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-badge.rank-1 {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.25);
}

.rank-badge.rank-2 {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.rank-badge.rank-3 {
  background: rgba(217, 119, 6, 0.2);
  color: #fb923c;
  border: 1px solid rgba(217, 119, 6, 0.5);
}

.rank-badge.rank-other {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.username-fixed {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 !important;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* User Level Tag (pill badge next to username in lists) */
.user-level-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  vertical-align: middle;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.user-level-tag:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.user-level-tag.tier-novice {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.user-level-tag.tier-adept {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.user-level-tag.tier-veteran {
  background: rgba(192, 132, 252, 0.12);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.3);
}

.user-level-tag.tier-master {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.hours-fixed {
  background: rgba(57, 146, 190, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  margin: 0 !important;
}

.messages-fixed {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  margin: 0 !important;
}

.xp-fixed {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  margin: 0 !important;
}

@media (max-width: 600px) {
  .stats-box {
    gap: 10px;
  }
  .rank-badge,
  .rank {
    min-width: 36px;
    height: 28px;
    padding: 0 6px;
    font-size: 0.82rem;
  }
  .username-fixed {
    font-size: 0.95rem;
  }
  .hours-fixed,
  .messages-fixed,
  .xp-fixed {
    padding: 3px 9px;
    font-size: 0.8rem;
  }
}

@media (max-width: 440px) {
  .messages-fixed,
  .xp-fixed {
    display: none; /* Hide message and xp pills on tiny screens to avoid overflow */
  }
}

/* --------------------------------------------------------------------------
   9. Directory Cards Grid (Users & Servers)
   -------------------------------------------------------------------------- */
.continous-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .continous-container {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   10. Avatars & Media
   -------------------------------------------------------------------------- */
.small-pp {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.big-pp {
  width: 100px;
  height: 100px;
  min-width: 100px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #1e293b;
  border: 3px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.border-server {
  border-radius: 14px !important;
}

@media (max-width: 600px) {
  .big-pp {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
}

/* --------------------------------------------------------------------------
   11. Buttons & Links
   -------------------------------------------------------------------------- */
.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: #5865F2;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin: 15px auto;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.35);
}

.btn-discord:hover {
  background-color: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(88, 101, 242, 0.5);
}

.btn-discord-icon {
  margin-right: 10px;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.simplelink {
  display: inline-block;
  color: #38bdf8;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.simplelink:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   12. Pagination Controls
   -------------------------------------------------------------------------- */
.page-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  margin-top: 25px;
}

.page-link {
  text-decoration: none;
  font-weight: 700;
  color: #cbd5e1;
  background-color: #1a283a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: 21px;
  padding: 0 14px;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: #3992be;
  color: #ffffff;
  border-color: #3992be;
  transform: translateY(-1px);
}

.page-link-selected {
  text-decoration: none;
  font-weight: 800;
  color: #ffffff;
  background-color: #3992be;
  border: 1px solid #3992be;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: 21px;
  padding: 0 14px;
  box-shadow: 0 4px 12px rgba(57, 146, 190, 0.4);
}

/* --------------------------------------------------------------------------
   13. Tables (Commands documentation)
   -------------------------------------------------------------------------- */
.commands-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.commands-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  border-radius: 12px;
  overflow: hidden;
}

.commands-table th,
.commands-table td {
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 16px;
  text-align: left;
  color: #ffffff;
}

.commands-table th {
  background-color: #24415f;
  font-weight: 700;
  font-size: 0.95rem;
  color: #38bdf8;
  letter-spacing: 0.3px;
}

.commands-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.commands-table tr:hover {
  background-color: rgba(56, 189, 248, 0.05);
}

.commands-table td:first-child {
  font-family: monospace;
  font-weight: 700;
  color: #facc15;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   14. Text Utility Classes
   -------------------------------------------------------------------------- */
.micro-text { font-size: 0.75rem; color: #64748b; }
.small-text { font-size: 0.9rem; color: #cbd5e1; margin: 8px 0; }
.small-bold-text { font-size: 0.95rem; font-weight: 700; color: #ffffff; margin: 8px 0; }
.medium-text { font-size: 1.05rem; color: #94a3b8; margin: 8px 0; line-height: 1.6; }
.medium-bold-text { font-size: 1.15rem; font-weight: 700; color: #ffffff; margin: 8px 0; }
.big-text { font-size: clamp(1.2rem, 2vw, 1.6rem); color: #ffffff; margin: 10px 0; }
.big-bold-text { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 800; color: #ffffff; margin: 14px 0 8px; letter-spacing: -0.3px; }
.giant-bold-text { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; color: #ffffff; margin: 0; letter-spacing: -0.5px; }

.gray { color: #94a3b8; }
.green { color: #10b981; }
.red { color: #f87171; }
.amber { color: #fbbf24; }

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.more-top-margin { margin-top: 1.8rem; }
.nomargin { margin: 0 !important; }
.nogap { gap: 0 !important; }
.nopadding { padding: 0 !important; }
.leftmargin { margin-left: 12px; }

.text-overflow {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.horizontal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.nowrap {
  flex-wrap: nowrap;
}

.home-center-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 15px auto;
  image-rendering: pixelated;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
footer {
  margin-top: 40px;
  padding: 20px 10px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   16. Global Search Modal (Ctrl + K)
   -------------------------------------------------------------------------- */

/* Global Search Modal Backdrop & Dialog */
.global-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 40px;
  animation: searchFadeIn 0.18s ease-out forwards;
}

@keyframes searchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.global-search-dialog {
  background: rgba(17, 27, 39, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(56, 189, 248, 0.12);
  overflow: hidden;
  animation: searchSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes searchSlideDown {
  from { transform: translateY(-14px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.global-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-icon-input {
  stroke: #38bdf8;
  flex-shrink: 0;
}

.global-search-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  width: 100%;
  outline: none;
}

.global-search-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.search-esc-key {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-family: inherit;
  color: #94a3b8;
  font-weight: 700;
  cursor: pointer;
}

.search-esc-key:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.global-search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.search-initial-hint,
.search-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
}

.search-group-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 10px 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.15s ease;
  margin-bottom: 3px;
  border: 1px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(3px);
}

.search-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e293b;
}

.search-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.search-item-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: #ffffff;
}

.search-item-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.search-item-badge {
  background: rgba(255, 255, 255, 0.06);
  color: #38bdf8;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.global-search-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(10, 16, 24, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: #64748b;
}

.search-hint-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-hint-item kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.72rem;
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   17. Gamification: Level, XP & Badges
   -------------------------------------------------------------------------- */
.btn-export-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.25) 0%, rgba(56, 189, 248, 0.2) 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-export-card:hover {
  background: linear-gradient(135deg, #5865F2 0%, #38bdf8 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
}

.user-level-card {
  background: rgba(21, 32, 46, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.user-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
}

.user-level-badge-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-level-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865F2 0%, #38bdf8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.4);
  flex-shrink: 0;
}

.user-level-num {
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
  color: #ffffff;
}

.user-level-sub {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.85);
}

.user-level-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
}

.user-level-xp-text {
  font-size: 0.84rem;
  color: #94a3b8;
  font-weight: 600;
}

.user-level-next-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-level-pct {
  font-size: 1rem;
  font-weight: 800;
  color: #38bdf8;
}

.user-xp-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.user-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 100%);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.badge-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(21, 32, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.badge-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.badge-card.unlocked {
  background: rgba(21, 32, 46, 0.88);
}

.badge-card.unlocked.rarity-common {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.badge-card.unlocked.rarity-rare {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.12);
}

.badge-card.unlocked.rarity-epic {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 4px 18px rgba(129, 140, 248, 0.14);
}

.badge-card.unlocked.rarity-legendary {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.18);
}

.badge-card.locked {
  opacity: 0.65;
  filter: grayscale(0.2);
}

.badge-card.locked:hover {
  opacity: 0.9;
}

.badge-card-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.badge-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  transition: transform 0.2s ease;
}

.badge-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.badge-card.unlocked.rarity-common .badge-card-icon {
  color: #10b981;
}
.badge-card.unlocked.rarity-rare .badge-card-icon {
  color: #38bdf8;
}
.badge-card.unlocked.rarity-epic .badge-card-icon {
  color: #c084fc;
}
.badge-card.unlocked.rarity-legendary .badge-card-icon {
  color: #fbbf24;
}

.badge-card.locked .badge-card-icon {
  color: #64748b;
  opacity: 0.6;
}

.badge-card:hover .badge-card-icon {
  transform: scale(1.1);
}

.badge-card-lock {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.badge-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.badge-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.badge-card-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: #ffffff;
}

.badge-rarity-pill {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.badge-rarity-pill.rarity-common {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-rarity-pill.rarity-rare {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.badge-rarity-pill.rarity-epic {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
}

.badge-rarity-pill.rarity-legendary {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-bottom: 8px;
}

.badge-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.badge-progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.badge-progress-fill {
  height: 100%;
  background: #38bdf8;
  border-radius: 3px;
}

.badge-progress-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.badge-unlocked-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  margin-top: auto;
}

.badges-unlocked-ratio {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ratio-pct {
  font-size: 1.4rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
}

.ratio-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   18. Export Stat Card Modal
   -------------------------------------------------------------------------- */
.hourglass-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: searchFadeIn 0.2s ease-out;
}

.hourglass-modal-content {
  background: rgba(17, 27, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 590px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: searchSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title {
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.modal-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0 0 16px;
}

.card-preview-container {
  width: 100%;
  background: #090e15;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.card-preview-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
}

.export-snippet-group {
  margin-bottom: 14px;
}

.snippet-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.snippet-input-row {
  display: flex;
  gap: 8px;
}

.snippet-input {
  flex: 1;
  background: rgba(15, 23, 35, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
}

.btn-copy-snippet {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-copy-snippet:hover {
  background: #38bdf8;
  color: #0d1721;
}

.modal-actions-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.btn-download-svg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5865F2;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-download-svg:hover {
  background: #4752C4;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   19. Supports Page - XP & Leveling Guide
   -------------------------------------------------------------------------- */
.xp-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.xp-guide-item {
  background: rgba(15, 23, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.xp-guide-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.xp-guide-item.full-width {
  grid-column: 1 / -1;
}

.xp-guide-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.xp-guide-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.xp-guide-icon-box.cyan {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.xp-guide-icon-box.blurple {
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.35);
}

.xp-guide-icon-box.amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.xp-guide-icon-box.green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.xp-guide-icon-box.purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.xp-guide-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.xp-guide-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.xp-guide-chip {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.xp-guide-chip.cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.xp-guide-chip.blurple {
  background: rgba(88, 101, 242, 0.2);
  color: #818cf8;
  border: 1px solid rgba(88, 101, 242, 0.4);
}

.xp-guide-chip.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.xp-guide-chip.green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.xp-guide-chip.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.xp-guide-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

/* --------------------------------------------------------------------------
   20. Page Search Bars (Users, Servers & Member lists - styled like Ctrl+K)
   -------------------------------------------------------------------------- */
.page-search-form {
  margin-bottom: 22px;
  width: 100%;
}

.page-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(17, 27, 39, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 11px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.03);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.page-search-bar:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(17, 27, 39, 0.92);
}

.page-search-bar:focus-within {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12), 0 8px 25px rgba(0, 0, 0, 0.35);
  background: rgba(17, 27, 39, 0.98);
}

.page-search-icon {
  stroke: #38bdf8;
  flex-shrink: 0;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.page-search-bar:focus-within .page-search-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.page-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 600;
  outline: none;
  min-width: 0;
  font-family: inherit;
  line-height: 1.4;
}

.page-search-input::placeholder {
  color: #64748b;
  font-weight: 500;
  transition: color 0.2s ease;
}

.page-search-bar:focus-within .page-search-input::placeholder {
  color: #94a3b8;
}

.page-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.page-search-clear:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: scale(1.06);
}

.page-search-enter-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  line-height: 1.2;
}

.page-search-bar:focus-within .page-search-enter-kbd {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
}

.page-search-enter-kbd:hover {
  background: #38bdf8;
  color: #0d1721;
  border-color: #38bdf8;
}

/* Page Live Search Dropdown (Ctrl+K style) */
.page-search-wrap {
  position: relative;
  width: 100%;
}

.page-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(17, 27, 39, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.15);
  z-index: 100;
  overflow: hidden;
  animation: dropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-search-dropdown-inner {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.page-search-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 8px 16px;
  background: rgba(10, 16, 24, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  color: #64748b;
}

.page-search-dropdown-footer .search-hint-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.page-search-dropdown-footer kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.68rem;
  font-family: inherit;
  color: #94a3b8;
  line-height: 1.2;
}



/* ==========================================================================
   VERSUS PAGE & DUEL STYLES (MODERN REVAMP)
   ========================================================================== */

/* Header action button for User & Server Profile */
.btn-versus-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(249, 115, 22, 0.16));
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}

.btn-versus-action:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(249, 115, 22, 0.3));
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

/* Versus Container & Hero */
.versus-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.versus-hero {
  text-align: center;
  margin-bottom: 26px;
}

.versus-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fca5a5;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.18);
}

.versus-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 8px;
}

.versus-subtitle {
  color: #94a3b8;
  font-size: 1.02rem;
  margin: 0;
}

/* Selector Box */
.versus-selector-box {
  padding: 20px 24px;
  margin-bottom: 25px;
  background: #111a24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 50;
}

.versus-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

.versus-input-group {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.versus-input-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.player-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-1 {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.dot-2 {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

/* Versus Custom Live Search Bars (P1 / P2) */
.page-search-bar.bar-p1:focus-within {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), 0 8px 25px rgba(0, 0, 0, 0.35);
}

.icon-p1 {
  stroke: #38bdf8;
}

.page-search-bar.bar-p1:focus-within .icon-p1 {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.page-search-bar.bar-p2:focus-within {
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2), 0 8px 25px rgba(0, 0, 0, 0.35);
}

.icon-p2 {
  stroke: #f43f5e;
}

.page-search-bar.bar-p2:focus-within .icon-p2 {
  stroke: #f43f5e;
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.6));
}

.versus-swap-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #162232;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  margin-bottom: 1px;
}

.versus-swap-btn:hover {
  background: #1f2f44;
  color: #38bdf8;
  border-color: #38bdf8;
  transform: rotate(180deg);
}

.versus-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: all 0.22s ease;
  height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

.versus-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  filter: brightness(1.1);
}

/* Common Servers Filter Bar */
.versus-common-servers-wrapper {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.common-servers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.common-servers-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.common-servers-pills-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 240px;
}

.server-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.server-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  font-weight: 700;
}

.pill-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pill-fallback-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.common-servers-none {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.84rem;
  font-style: italic;
}

/* Active Server Banner */
.active-server-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 24px;
}

.top-active-server-banner {
  margin-top: -14px;
  margin-bottom: 18px;
}

.active-server-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e0f2fe;
  font-size: 0.92rem;
  font-weight: 700;
}

.active-server-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.btn-clear-server-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-clear-server-filter:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ==========================================================================
   THE ARENA: FIGHTER CARDS & CENTRAL CLASH
   ========================================================================== */
.versus-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 30px;
}

.versus-fighter-card {
  background: #131d2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px 22px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  min-width: 0;
}

.fighter-1 {
  border-top: 4px solid #38bdf8;
}

.fighter-2 {
  border-top: 4px solid #f43f5e;
}

/* Champion Winner Glow & Ribbon */
.versus-fighter-card.fighter-winner {
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow: 0 0 36px rgba(250, 204, 21, 0.22), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.fighter-champion-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #f59e0b, #eab308, #f59e0b);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 0;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  z-index: 2;
}

.fighter-avatar-wrapper {
  position: relative;
  margin-top: 8px;
  margin-bottom: 14px;
}

.fighter-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.fighter-1 .fighter-avatar {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.fighter-2 .fighter-avatar {
  border-color: rgba(244, 63, 94, 0.7);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
}

.fighter-winner .fighter-avatar {
  border-color: #facc15;
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.45);
}

.fighter-player-tag {
  position: absolute;
  bottom: 0;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 900;
  color: #ffffff;
  border: 2px solid #131d2a;
}

.tag-1 {
  background: #38bdf8;
}

.tag-2 {
  background: #f43f5e;
}

.fighter-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
  max-width: 100%;
}

.fighter-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fighter-1 .fighter-name a:hover {
  color: #38bdf8;
}

.fighter-2 .fighter-name a:hover {
  color: #f43f5e;
}

.fighter-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fighter-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fighter-rank-badge {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.rank-total {
  font-size: 0.72rem;
  color: #64748b;
}

.fighter-level-badge {
  background: rgba(88, 101, 242, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.fighter-members-badge {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.fighter-score-display {
  margin-top: auto;
  border-radius: 14px;
  padding: 10px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.display-1 {
  border-color: rgba(56, 189, 248, 0.3);
}

.display-2 {
  border-color: rgba(244, 63, 94, 0.3);
}

.fighter-winner .fighter-score-display {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.4);
}

.score-number {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
}

.display-1 .score-number {
  color: #38bdf8;
}

.display-2 .score-number {
  color: #f43f5e;
}

.fighter-winner .score-number {
  color: #facc15;
}

.score-text {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-top: 4px;
}

/* Central Clash Pillar */
.versus-center-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 180px;
}

.versus-neon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #ef4444 0%, #991b1b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.35);
  animation: pulseVs 2.5s infinite ease-in-out;
}

@keyframes pulseVs {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.65);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 45px rgba(239, 68, 68, 0.9);
  }
}

.duel-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  line-height: 1;
}

.score-digit {
  font-size: 2.4rem;
  font-weight: 900;
  color: #64748b;
}

.digit-1.win {
  color: #38bdf8;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.digit-2.win {
  color: #f43f5e;
  text-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
}

.score-sep {
  font-size: 1.8rem;
  font-weight: 700;
  color: #475569;
}

.duel-outcome-wrapper {
  text-align: center;
}

.duel-outcome-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.winner-pill-1 {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.winner-pill-2 {
  background: rgba(244, 63, 94, 0.16);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

.tie-pill {
  background: rgba(250, 204, 21, 0.16);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

/* ==========================================================================
   DETAILED METRICS BREAKDOWN
   ========================================================================== */
.versus-metrics-container {
  padding: 24px;
  margin-bottom: 30px;
  background: #111a24;
}

.versus-metrics-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.versus-metrics-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.metrics-count-badge {
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.versus-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.versus-metric-row {
  background: #152230;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.versus-metric-row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.metric-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.metric-side-val {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.12rem;
  font-weight: 700;
  color: #cbd5e1;
}

.side-left {
  justify-content: flex-start;
}

.side-right {
  justify-content: flex-end;
}

.metric-side-val.is-winner {
  color: #facc15;
  font-weight: 900;
}

.metric-win-crown {
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.metric-center-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 10px;
}

.metric-category-icon {
  font-size: 1.1rem;
}

/* Gauge Bar */
.metric-gauge-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 12px;
}

.gauge-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
}

.gauge-bar-left {
  display: flex;
  justify-content: flex-end;
}

.gauge-bar-right {
  display: flex;
  justify-content: flex-start;
}

.gauge-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-1 {
  background: #38bdf8;
  opacity: 0.75;
}

.fill-1.win-fill {
  background: linear-gradient(90deg, #38bdf8, #facc15);
  opacity: 1;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.fill-2 {
  background: #f43f5e;
  opacity: 0.75;
}

.fill-2.win-fill {
  background: linear-gradient(90deg, #facc15, #f43f5e);
  opacity: 1;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.gauge-divider-pin {
  width: 4px;
  height: 16px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Chart Card & Canvas Wrapper */
.versus-chart-card {
  padding: 24px;
  background: #111a24;
}

.versus-chart-wrapper {
  position: relative;
  height: 380px;
  width: 100%;
}

/* Empty Arena */
.versus-empty-arena {
  text-align: center;
  padding: 60px 20px;
}

.empty-swords-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}

.empty-arena-title {
  color: #94a3b8;
  font-size: 1.15rem;
  font-weight: 600;
}

/* ==========================================================================
   VERSUS RESPONSIVE DESIGN (TABLETS & PHONES)
   ========================================================================== */

/* Medium devices (Tablets <= 860px) */
@media (max-width: 860px) {
  .versus-container {
    padding: 18px 12px 40px;
  }

  .versus-title {
    font-size: clamp(1.75rem, 5vw, 2.3rem);
  }

  .versus-subtitle {
    font-size: 0.94rem;
  }

  .versus-arena {
    gap: 14px;
  }

  .versus-fighter-card {
    padding: 24px 14px 18px;
  }

  .fighter-avatar {
    width: 80px;
    height: 80px;
  }
}

/* Mobile Devices (Phones <= 720px) */
@media (max-width: 720px) {
  .versus-container {
    padding: 8px 0 35px;
    width: 100%;
  }

  .versus-hero {
    margin-bottom: 16px;
  }

  .versus-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 8px;
  }

  .versus-icon-badge svg {
    width: 22px;
    height: 22px;
  }

  .versus-title {
    font-size: 1.55rem;
    margin-bottom: 4px;
  }

  .versus-subtitle {
    font-size: 0.85rem;
    line-height: 1.35;
    padding: 0 4px;
  }

  /* Form & Selectors on phone */
  .versus-selector-box {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 14px;
  }

  .versus-selector-box + .versus-arena,
  .versus-selector-box + .active-server-banner,
  .versus-selector-box + .versus-empty-arena {
    margin-top: 0 !important;
  }

  /* Page search forms on phone (users / servers) */
  .page-search-form {
    margin-bottom: 8px;
  }

  .page-search-form + .gray-box {
    margin-top: 0 !important;
  }

  .versus-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .versus-input-group {
    width: 100%;
    flex: 1 1 100%;
  }

  .page-search-bar {
    padding: 9px 12px;
    border-radius: 12px;
  }

  .page-search-input {
    font-size: 16px; /* Prevents auto-zoom on iOS */
  }

  .versus-swap-btn {
    align-self: center;
    margin: 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    transform: rotate(90deg);
  }

  .versus-swap-btn:hover {
    transform: rotate(270deg);
  }

  .versus-submit-btn {
    width: 100%;
    height: 44px;
    font-size: 0.92rem;
    margin-top: 2px;
  }

  /* Search Dropdown on phone */
  .page-search-dropdown {
    border-radius: 12px;
  }

  .page-search-dropdown-inner {
    max-height: 250px;
    padding: 6px;
  }

  .page-search-dropdown-footer {
    display: none;
  }

  .search-result-item {
    padding: 8px 10px;
    gap: 10px;
    border-radius: 10px;
  }

  .search-item-name {
    font-size: 0.9rem;
  }

  .search-item-badge {
    padding: 2px 8px;
    font-size: 0.7rem;
  }

  /* Shared servers */
  .versus-common-servers-wrapper {
    margin-top: 12px;
    padding-top: 10px;
  }

  .common-servers-title {
    font-size: 0.75rem;
  }

  .server-pill {
    padding: 5px 10px;
    font-size: 0.78rem;
    max-width: 100%;
  }

  /* Active server banner */
  .active-server-banner,
  .top-active-server-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    margin-top: 0 !important;
  }

  .active-server-badge {
    font-size: 0.84rem;
  }

  .btn-clear-server-filter {
    align-self: flex-start;
  }

  /* ARENA: Side-by-side fighters with clash header */
  .versus-arena {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "center center"
      "f1     f2";
    gap: 8px;
    margin-bottom: 18px;
  }

  .versus-center-pillar {
    grid-area: center;
    width: 100%;
    min-width: unset;
    gap: 6px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 8px 10px;
  }

  .versus-neon-badge {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
  }

  .duel-scoreboard {
    gap: 8px;
  }

  .score-digit {
    font-size: 1.85rem;
  }

  .score-sep {
    font-size: 1.35rem;
  }

  .duel-outcome-pill {
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 14px;
    max-width: 100%;
    word-break: break-word;
    line-height: 1.3;
    text-align: center;
  }

  .fighter-1 {
    grid-area: f1;
  }

  .fighter-2 {
    grid-area: f2;
  }

  .versus-fighter-card {
    min-width: 0;
    padding: 22px 6px 12px;
    border-radius: 14px;
  }

  .fighter-champion-ribbon {
    font-size: 0.62rem;
    padding: 2px 0;
    letter-spacing: 0.02em;
  }

  .fighter-avatar-wrapper {
    margin-top: 4px;
    margin-bottom: 8px;
  }

  .fighter-avatar {
    width: 58px;
    height: 58px;
    border-width: 2px;
  }

  .fighter-player-tag {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    bottom: -2px;
    right: -2px;
  }

  .fighter-name {
    font-size: 0.94rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 2px;
  }

  .fighter-name a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fighter-meta {
    gap: 4px;
    margin-bottom: 8px;
  }

  .fighter-badge {
    padding: 2px 5px;
    font-size: 0.68rem;
    border-radius: 6px;
  }

  .fighter-score-display {
    padding: 5px 6px;
    width: 100%;
    min-width: unset;
    border-radius: 8px;
  }

  .score-number {
    font-size: 1.35rem;
  }

  .score-text {
    font-size: 0.62rem;
  }

  /* METRICS BREAKDOWN: Grid with Centered Category & Side-by-Side Values */
  .versus-metrics-container {
    padding: 14px 10px;
    margin-bottom: 18px;
    border-radius: 14px;
  }

  .versus-metrics-title-row {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .versus-metrics-title {
    font-size: 0.98rem;
  }

  .metrics-count-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  .versus-metrics-list {
    gap: 8px;
  }

  .versus-metric-row {
    padding: 10px 10px;
    border-radius: 10px;
  }

  .metric-row-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "cat cat"
      "v1  v2";
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
  }

  .metric-center-label {
    grid-area: cat;
    justify-self: center;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 8px;
    margin-bottom: 2px;
  }

  .side-left {
    grid-area: v1;
    justify-content: flex-start;
    text-align: left;
    font-size: 0.92rem;
    color: #93c5fd;
  }

  .side-right {
    grid-area: v2;
    justify-content: flex-end;
    text-align: right;
    font-size: 0.92rem;
    color: #fda4af;
  }

  .metric-win-crown {
    font-size: 0.88rem;
  }

  .metric-gauge-wrapper {
    height: 8px;
    gap: 6px;
  }

  .gauge-divider-pin {
    height: 12px;
    width: 3px;
  }

  /* Chart Card */
  .versus-chart-card {
    padding: 14px 10px;
    border-radius: 14px;
    margin-bottom: 18px;
  }

  .versus-chart-card .medium-bold-text {
    font-size: 1rem !important;
  }

  .versus-chart-wrapper {
    height: 260px;
  }

  /* Empty Arena */
  .versus-empty-arena {
    padding: 35px 12px;
  }

  .empty-swords-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }

  .empty-arena-title {
    font-size: 0.94rem;
  }
}

/* Extra Small Mobile Devices (Phones <= 480px) */
@media (max-width: 480px) {
  .versus-arena {
    gap: 6px;
  }

  .versus-center-pillar {
    padding: 6px 8px;
  }

  .versus-neon-badge {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .score-digit {
    font-size: 1.55rem;
  }

  .score-sep {
    font-size: 1.15rem;
  }

  .duel-outcome-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .versus-fighter-card {
    padding: 20px 4px 10px;
  }

  .fighter-avatar {
    width: 48px;
    height: 48px;
  }

  .fighter-player-tag {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }

  .fighter-name {
    font-size: 0.85rem;
  }

  .fighter-meta {
    gap: 3px;
    margin-bottom: 6px;
  }

  .fighter-badge {
    padding: 1.5px 4px;
    font-size: 0.62rem;
  }

  /* Hide / total in rank badge on small screens to prevent layout wrap */
  .fighter-rank-badge .rank-total {
    display: none;
  }

  .score-number {
    font-size: 1.15rem;
  }

  .score-text {
    font-size: 0.58rem;
  }

  .val-number {
    font-size: 0.84rem;
  }

  .metric-category-name {
    font-size: 0.74rem;
  }

  .side-left, .side-right {
    font-size: 0.85rem;
  }
}
