/* ============================================
   ReachAces – Theme (same palette, modern layout)
   ============================================ */
:root {
  --primary: #19C6FD;
  --primary-dark: #165AC9;
  --accent: #065DE6;
  --bg: #b8daff;
  --bg-card: #e6f2ff;
  --bg-card-hover: rgba(25, 198, 253, 0.25);
  --text: #065DE6;
  --text-muted: #165AC9;
  --border: rgba(22, 90, 201, 0.35);
  --shadow: 0 4px 24px rgba(6, 93, 230, 0.15);
  --glow: 0 0 40px rgba(25, 198, 253, 0.2);
}

@font-face {
  font-family: 'Jqkas Wild';
  src: url('../font/JqkasWild-w1YD6.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(25, 198, 253, 0.25), transparent),
    radial-gradient(ellipse 80% 50% at 80% 50%, rgba(6, 93, 230, 0.08), transparent);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Nav
   ============================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  margin-bottom: 0;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  position: relative;
  z-index: 2;
  background: #b8e4fc;
  border-radius: 2rem 2rem 0 0;
  box-shadow: 0 2px 12px rgba(6, 93, 230, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.nav a {
  font-family: 'Nunito', sans-serif;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-card);
}

.nav a.active {
  color: var(--accent);
  background: rgba(25, 198, 253, 0.25);
}

.nav a:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
  }
  .nav ul {
    justify-content: center;
  }
  .app {
    padding: 1.25rem 1rem 1.5rem;
  }
  .kick-mini-player {
    width: min(280px, calc(100vw - 1.5rem));
    left: 0.5rem;
    bottom: 0.5rem;
    border-radius: 10px;
  }
  .kick-mini-header {
    padding: 0.35rem 0.5rem;
    gap: 0.35rem;
  }
  .kick-mini-link {
    font-size: 0.75rem;
  }
  .kick-status {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
  }
}

/* Kick mini player – bottom left */
.kick-mini-player {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 10;
  width: 340px;
  background: var(--bg);
  border: 2px solid rgba(22, 90, 201, 0.4);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(6, 93, 230, 0.2);
}

.kick-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
}

.kick-mini-toggle {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 198, 253, 0.3);
  border: 1px solid rgba(25, 198, 253, 0.5);
  border-radius: 6px;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.kick-mini-toggle:hover {
  background: rgba(25, 198, 253, 0.5);
}

.kick-mini-player--closed .kick-mini-embed {
  display: none;
}

.kick-mini-link {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.kick-mini-link:hover {
  text-decoration: underline;
}

.kick-status {
  font-family: 'Nunito', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.kick-status-live {
  background: #22c55e;
  color: #fff;
}
.kick-status-offline {
  background: #dc2626;
  color: #fff;
}

.kick-mini-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
}
.kick-mini-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Reach Ace logo bottom right */
.logo-corner {
  position: fixed;
  bottom: -5px;
  right: -60px;
  z-index: 0;
  pointer-events: none;
  line-height: 0;
}

.logo-corner img {
  display: block;
  max-height: 35vh;
  width: auto;
  object-fit: contain;
  object-position: right bottom;
}

@media (max-width: 900px) {
  .logo-corner {
    display: none;
  }
}

/* ============================================
   Home – Hero
   ============================================ */
.main-content {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 60vh;
  background: #b8e4fc;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.hero {
  flex: 1;
  text-align: center;
  padding: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title {
  margin: 0 0 0 0;
  padding-top: 2rem;
  line-height: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-title-img {
  display: block;
  width: 100%;
  max-width: min(96vw, 680px);
  height: auto;
  margin: 0 auto;
}

@media (max-width: 1920px) and (max-height: 1080px) and (min-width: 901px) {
  .hero-title-img {
    max-width: min(96vw, 540px);
  }
}

@media (max-width: 768px) {
  .hero-title {
    padding: 2rem 1.25rem 1.5rem;
    box-sizing: border-box;
  }
  .hero-title-img {
    max-width: min(calc(100vw - 2.5rem), 680px);
  }
}

.hero-leaderboard-cta {
  text-align: center;
  margin: 1.5rem 0 2rem;
}

.hero-leaderboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Stake card – matches page palette */
/* One band from stake CTA down to footer – gradient starts at footer, fades up */
/* Fade from bottom (footer) up to same point below the logo – no border */
/* Fade starts a little above the stake card; connects to footer #b8e4fc */
.cta-footer-band {
  margin-top: 0;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, transparent 0%, rgba(230, 242, 255, 0.25) 20%, rgba(184, 228, 252, 0.55) 65%, #b8e4fc 100%);
}

.stake-cta {
  width: 100%;
  padding: 2rem 1rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stake-card {
  display: inline-block;
  text-align: left;
  max-width: 360px;
  padding: 1.5rem 1.75rem;
  background: rgba(230, 242, 255, 0.85);
  border-radius: 16px;
  border: 1px solid rgba(22, 90, 201, 0.2);
  box-shadow: 0 2px 16px rgba(6, 93, 230, 0.08), 0 0 0 1px rgba(255,255,255,0.6) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.stake-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(6, 93, 230, 0.12), 0 0 0 1px rgba(255,255,255,0.7) inset;
  border-color: rgba(22, 90, 201, 0.4);
  background: rgba(230, 242, 255, 0.95);
}

.stake-card-logo {
  display: block;
  width: 100%;
  max-width: 130px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: brightness(0) invert(1)
    drop-shadow(0 0 4px rgba(25, 198, 253, 0.5))
    drop-shadow(0 0 10px rgba(25, 198, 253, 0.35))
    drop-shadow(0 0 16px rgba(25, 198, 253, 0.2));
}

.stake-card-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.stake-card-list li {
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
  font-weight: 500;
}

.stake-card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.stake-card-list li::after {
  content: '';
  position: absolute;
  left: 10px;
  top: calc(0.22em + 10px);
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.stake-card-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 14px;
  border: none;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.2) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stake-card-join:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(25, 198, 253, 0.4), 0 0 0 1px rgba(255,255,255,0.25) inset;
}

/* Social card – beside Stake */
.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.25rem;
  padding: 2rem 1.75rem;
  min-width: 160px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.5) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.social-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(6, 93, 230, 0.22), 0 0 0 1px rgba(255,255,255,0.6) inset;
  border-color: var(--primary);
}

.social-card-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-card-item:hover {
  transform: scale(1.06);
  opacity: 0.9;
}

.social-card-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 10px;
}

.social-card-name {
  white-space: nowrap;
}

.social-card-logo {
  display: block;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.social-card-logo-kick { height: 42px; }
.social-card-logo-x { height: 48px; }
.social-card-logo-discord { height: 52px; }

.cta-button {
  font-family: 'Nunito', sans-serif;
  display: inline-block;
  padding: 1rem 2.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 14px;
  border: none;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.2) inset;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(25, 198, 253, 0.4), 0 0 0 1px rgba(255,255,255,0.15) inset;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  margin-top: 0;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
  background: #b8e4fc;
  border-radius: 0 0 2rem 2rem;
  box-shadow: 0 -2px 12px rgba(6, 93, 230, 0.08);
}

.footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  color: var(--text);
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.2s;
}

.footer-item:hover {
  opacity: 0.85;
  transform: scale(1.08);
}

.footer-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.footer-logo {
  display: block;
  width: auto;
  object-fit: contain;
}

.footer-name {
  white-space: nowrap;
}

.footer-logo-kick { height: 28px; }
.footer-logo-x { height: 34px; }
.footer-logo-discord { height: 40px; }

/* ============================================
   Leaderboard
   ============================================ */
.page-leaderboard .main-content {
  padding: 2rem 1.5rem 2.5rem;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.leaderboard-header-image {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
}

.leaderboard-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.leaderboard-view--hidden {
  display: none !important;
}

.leaderboard-countdown--ended .leaderboard-countdown-timer {
  display: none;
}

.leaderboard-countdown-ended {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: #dc2626;
  text-shadow: 0 0 12px rgba(220, 38, 38, 0.8), 0 0 24px rgba(220, 38, 38, 0.5), 0 0 36px rgba(220, 38, 38, 0.3);
  margin: 0;
}

.page-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 0 12px rgba(25, 198, 253, 0.7), 0 0 24px rgba(25, 198, 253, 0.5), 0 0 36px rgba(25, 198, 253, 0.3);
}

.page-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-weight: 600;
}

.rules-button {
  font-family: 'Nunito', sans-serif;
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.rules-button::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.3s ease;
}

.rules-button:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(25, 198, 253, 0.6);
  box-shadow: 0 8px 24px rgba(25, 198, 253, 0.25);
  background: var(--bg-card-hover);
}

.rules-button:hover::before {
  width: 100%;
}

.rules-button:active {
  transform: translateY(-1px) scale(1);
}

.rules-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.modal-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 29, 72, 0.7);
  cursor: pointer;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow), var(--glow);
}

/* Modal section slide-in */
.modal-section {
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.modal-section-left {
  transform: translateX(-60px);
}

.modal-section-right {
  transform: translateX(60px);
  transition-delay: 0.12s;
}

.modal-overlay.modal-open .modal-section {
  opacity: 1;
  transform: translateX(0);
}

.modal-overlay.modal-open .modal-section-right {
  transition-delay: 0.15s;
}

.modal-close {
  font-family: 'Nunito', sans-serif;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 2rem 1.25rem 0;
  color: var(--text);
  text-shadow: 0 0 10px rgba(25, 198, 253, 0.6), 0 0 20px rgba(25, 198, 253, 0.35);
}

.modal-body h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--primary);
}

.modal-section:first-child h3 {
  margin-top: 0;
}

.modal-section + .modal-section {
  margin-top: 1.5rem;
}

.modal-body p,
.modal-body ul {
  font-family: 'Nunito', sans-serif;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.modal-body ul {
  padding-left: 1.25rem;
}

.modal-body li {
  margin-bottom: 0.4rem;
}

.wager-rules-list li {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border-left: 4px solid;
}

.wager-100 {
  background: rgba(34, 197, 94, 0.15);
  border-left-color: #22c55e;
}

.wager-50 {
  background: rgba(234, 179, 8, 0.2);
  border-left-color: #eab308;
}

.wager-10 {
  background: rgba(239, 68, 68, 0.15);
  border-left-color: #ef4444;
}

.modal-note {
  font-family: 'Nunito', sans-serif;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Podium (top 3) */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: end;
  position: relative;
  z-index: 1;
}

.podium-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.podium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: rgba(25, 198, 253, 0.4);
}

.podium-1st {
  order: 0;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, #7dd3fc, var(--bg-card));
  border-color: rgba(25, 198, 253, 0.6);
}

.podium-2nd { order: -1; }
.podium-3rd { order: 1; }

.podium-place {
  font-family: 'Nunito', sans-serif;
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.podium-1st .podium-place { font-size: 1.5rem; }

.podium-avatar {
  font-family: 'Nunito', sans-serif;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid var(--border);
  overflow: hidden;
}

.podium-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.podium-1st .podium-avatar {
  width: 88px;
  height: 88px;
  font-size: 2rem;
}

.podium-username {
  font-family: 'Nunito', sans-serif;
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.podium-label {
  font-family: 'Nunito', sans-serif;
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  margin-bottom: 0.15rem;
}

.podium-label:first-of-type {
  margin-top: 0;
}

.podium-wager {
  font-family: 'Nunito', sans-serif;
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.podium-prize {
  font-family: 'Nunito', sans-serif;
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

/* Leaderboard countdown */
.leaderboard-countdown {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.leaderboard-countdown-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.leaderboard-countdown-timer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 1.5rem;
  margin-bottom: 0.5rem;
}

.leaderboard-countdown-timer .countdown-part {
  font-family: 'Nunito', sans-serif;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.5rem;
}

.leaderboard-countdown-timer .countdown-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(25, 198, 253, 0.5);
}

.leaderboard-countdown-timer .countdown-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Table */
.leaderboard-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-bottom: 2.5rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  font-family: 'Nunito', sans-serif;
  background: var(--primary-dark);
  color: #fff;
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leaderboard-table td {
  font-family: 'Nunito', sans-serif;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover td {
  background: var(--bg-card-hover);
}

.leaderboard-table td:first-child {
  font-weight: 700;
  color: var(--primary);
  width: 3rem;
}

/* Slightly smaller leaderboard panel on 1080p so top 10 is visible */
@media (max-height: 1080px) and (min-width: 901px) {
  .page-leaderboard .main-content {
    padding: 1.35rem 1.25rem 1.75rem;
  }
  .leaderboard-header {
    margin-bottom: 1.75rem;
  }
  .leaderboard-header-image {
    max-width: 240px;
  }
  .podium {
    margin-bottom: 1.25rem;
  }
  .podium-card {
    padding: 1.1rem 1rem;
  }
  .podium-1st {
    padding: 1.35rem 1rem;
  }
  .podium-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
  }
  .podium-1st .podium-avatar {
    width: 72px;
    height: 72px;
  }
  .podium-place {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .podium-1st .podium-place {
    font-size: 1.25rem;
  }
  .podium-username {
    font-size: 0.95rem;
  }
  .podium-wager,
  .podium-prize {
    font-size: 0.85rem;
  }
  .leaderboard-countdown {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.25rem;
  }
  .leaderboard-countdown-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  .leaderboard-countdown-timer .countdown-value {
    font-size: 1.5rem;
  }
  .leaderboard-table-wrap {
    margin-bottom: 1.5rem;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .page-leaderboard .main-content {
    padding: 1rem 0.75rem 1.25rem;
  }
  .leaderboard-header {
    margin-bottom: 1.25rem;
  }
  .leaderboard-header-image {
    max-width: 200px;
    margin-bottom: 0.5rem;
  }
  .leaderboard-header-actions {
    gap: 0.5rem;
  }
  .podium {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.6rem;
    margin-bottom: 1rem;
  }
  .podium-2nd { order: 0; }
  .podium-1st { order: -1; }
  .podium-3rd { order: 1; }
  .podium-card {
    padding: 0.65rem 0.5rem;
  }
  .podium-1st {
    padding: 0.85rem 0.5rem;
  }
  .podium-place {
    font-size: 1rem;
    margin-bottom: 0.35rem;
  }
  .podium-1st .podium-place {
    font-size: 1.15rem;
  }
  .podium-avatar {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.4rem;
  }
  .podium-1st .podium-avatar {
    width: 52px;
    height: 52px;
  }
  .podium-username {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  .podium-label {
    margin-top: 0.25rem;
    margin-bottom: 0.08rem;
    font-size: 0.6rem;
  }
  .podium-wager {
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
  }
  .podium-prize {
    font-size: 0.85rem;
  }
  .leaderboard-countdown {
    margin-bottom: 1rem;
    padding: 0.6rem 0.75rem;
  }
  .leaderboard-countdown-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  .leaderboard-countdown-timer {
    gap: 0.6rem 0.75rem;
    margin-bottom: 0;
  }
  .leaderboard-countdown-timer .countdown-part {
    min-width: 2.5rem;
  }
  .leaderboard-countdown-timer .countdown-value {
    font-size: 1.25rem;
  }
  .leaderboard-countdown-timer .countdown-unit {
    font-size: 0.65rem;
  }
  .leaderboard-table-wrap {
    margin-bottom: 1.25rem;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
  }
  .leaderboard-table td:first-child {
    width: 2rem;
  }
}
