/* ═══════════════════════════════════════════════════════════════
   NEON DODGE — game page styles
   Inherits design tokens from the parent portfolio's :root.
   All game-specific layout and chrome lives here.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Base reset for game page ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg, #0A0C10);
  color: var(--text, #EDEEF0);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav (identical markup to main site) ─────────────────────── */
nav#nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px 20px 10px 14px;
  background: var(--glass-bg, rgba(18,21,28,0.42));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.16));
  box-shadow: var(--glass-shadow, 0 8px 32px rgba(0,0,0,0.3));
  border-radius: 999px;
  width: min(90vw, 840px);
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text, #EDEEF0);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-logo-icon { display: flex; width: 28px; height: 28px; }
.nav-logo-icon svg { width: 100%; height: 100%; }
.nav-mark-dot {
  width: 6px; height: 6px;
  background: var(--kotlin, #7F52FF);
  border-radius: 50%;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted, #8A8F98);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.25s, background 0.25s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text, #EDEEF0);
  background: rgba(255,255,255,0.07);
}
.nav-link.active { color: var(--kotlin, #7F52FF); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--kotlin, #7F52FF);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.88; transform: scale(1.03); }

/* hide hamburger on game page (no mobile menu JS here) */
.nav-hamburger { display: none; }

/* ─── Page layout ─────────────────────────────────────────────── */
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--nav-h, 80px) + 40px) 24px 80px;
}

/* ─── BIG "BEAT THIS RECORD" BANNER ───────────────────────────── */
.beat-record-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 24px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--glass-bg, rgba(18, 21, 28, 0.85));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid #FFD700;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.25), 0 0 20px rgba(127, 82, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #EDEEF0);
  animation: gold-banner-pulse 4s infinite ease-in-out;
}

.record-crown {
  font-size: 1.25rem;
}

.record-label {
  color: #FFD700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.record-holder {
  color: #FFFFFF;
  font-weight: 800;
}

.record-badge {
  background: linear-gradient(135deg, #FFE066 0%, #D4AF37 50%, #996515 100%);
  color: #111111;
  padding: 3px 14px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

@keyframes gold-banner-pulse {
  0%, 100% {
    border-color: #FFD700;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.25), 0 0 20px rgba(127, 82, 255, 0.3);
  }
  50% {
    border-color: #FFE566;
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.5), 0 0 30px rgba(19, 185, 253, 0.4);
  }
}

/* ─── Section header ──────────────────────────────────────────── */
.game-header {
  text-align: center;
  margin-bottom: 36px;
}
.game-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--kotlin, #7F52FF);
  background: var(--glass-bg, rgba(18, 21, 28, 0.42));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.16));
  box-shadow: var(--glass-shadow, 0 8px 32px rgba(0, 0, 0, 0.3));
  margin-bottom: 14px;
}

.game-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flutter, #13B9FD);
  box-shadow: 0 0 8px var(--flutter, #13B9FD);
  flex-shrink: 0;
}
.game-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--kotlin, #7F52FF) 0%, var(--flutter, #13B9FD) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}
.game-subtitle {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-muted, #8A8F98);
  max-width: 420px;
  margin-inline: auto;
}

/* ─── Game shell (2x bigger container) ───────────────────────── */
#game-shell {
  position: relative;
  width: min(94vw, 85vh, 880px);
  max-width: 880px;
  min-width: 300px;
  margin: 0 auto;
}

/* All three game panels stack in the same grid cell */
#screen-start,
#screen-playing,
#screen-gameover {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
#screen-start.active,
#screen-playing.active,
#screen-gameover.active { display: flex; }

/* ─── Canvas wrapper ──────────────────────────────────────────── */
#canvas-wrapper {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--glass-border, rgba(255,255,255,0.16)),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(127,82,255,0.12);
}
#game-canvas {
  display: block;
  width: 100%;
  /* height determined by aspect ratio 1:1 */
  border-radius: 18px;
  cursor: none;
}

/* ─── Live score overlay ──────────────────────────────────────── */
#live-score {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(127,82,255,0.7);
  pointer-events: none;
  white-space: nowrap;
  transition: color 0.2s;
}

/* 10-Second Milestone Timer Pop Animation */
#live-score.timer-pop-10s {
  animation: timer-pop-bounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes timer-pop-bounce {
  0% {
    transform: translateX(-50%) scale(1);
  }
  40% {
    transform: translateX(-50%) scale(1.7);
    color: #FFE066;
    text-shadow: 0 0 25px rgba(255, 224, 102, 0.95), 0 0 45px rgba(19, 185, 253, 0.85);
  }
  75% {
    transform: translateX(-50%) scale(0.92);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

/* ─── Funny Fail Overlay ───────────────────────────────────────── */
.fail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.84);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fail-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fail-overlay-content {
  text-align: center;
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90%;
}

.fail-overlay.active .fail-overlay-content {
  transform: scale(1);
}

.fail-emoji {
  font-size: 3.8rem;
  line-height: 1;
  margin-bottom: 12px;
  display: inline-block;
  animation: fail-emoji-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fail-emoji-bounce {
  0% { transform: scale(0.3) rotate(-15deg); }
  50% { transform: scale(1.25) rotate(10deg); }
  75% { transform: scale(0.95) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.fail-headline {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: #EDEEF0;
  text-shadow: 0 4px 20px rgba(127, 82, 255, 0.5);
  margin-bottom: 10px;
}

.fail-score-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--text-muted, #8A8F98);
  letter-spacing: 0.03em;
}

/* ─── Start screen ────────────────────────────────────────────── */
#screen-start {
  gap: 24px;
  padding: 40px 32px;
  background: var(--glass-bg, rgba(18,21,28,0.42));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.16));
  border-radius: 18px;
  box-shadow: var(--glass-shadow, 0 8px 32px rgba(0,0,0,0.3));
  width: 100%;
  min-height: 300px;
  justify-content: center;
}

.start-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--kotlin, #7F52FF) 0%, var(--flutter, #13B9FD) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.start-instructions {
  font-size: 0.875rem;
  color: var(--text-muted, #8A8F98);
  text-align: center;
  line-height: 1.6;
}

#start-highscore {
  font-size: 0.85rem;
  color: var(--flutter, #13B9FD);
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  min-height: 1.2em;
}

/* ─── Game Over screen ────────────────────────────────────────── */
#screen-gameover {
  gap: 20px;
  padding: 36px 28px;
  background: var(--glass-bg, rgba(18,21,28,0.42));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.16));
  border-radius: 18px;
  box-shadow: var(--glass-shadow, 0 8px 32px rgba(0,0,0,0.3));
  width: 100%;
}

.gameover-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  color: var(--text, #EDEEF0);
}

#final-score-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--kotlin, #7F52FF) 0%, var(--flutter, #13B9FD) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ─── Name input ──────────────────────────────────────────────── */
.submit-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.submit-row label {
  font-size: 0.8rem;
  color: var(--text-muted, #8A8F98);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}
#player-name-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.16));
  border-radius: 10px;
  color: var(--text, #EDEEF0);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
#player-name-input:focus {
  border-color: var(--kotlin, #7F52FF);
  box-shadow: 0 0 0 3px rgba(127,82,255,0.2);
}
#player-name-input::placeholder { color: rgba(255,255,255,0.25); }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.25s;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--kotlin, #7F52FF) 0%, var(--flutter, #13B9FD) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(127,82,255,0.4);
}
.btn-primary,
.btn-primary *,
.btn-primary:hover,
.btn-primary:hover * {
  color: #ffffff !important;
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(127,82,255,0.55);
}

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text, #EDEEF0);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.16));
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.10);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.28);
}

.btn-danger {
  background: rgba(255,60,80,0.15);
  color: #FF6B7A;
  border: 1px solid rgba(255,60,80,0.3);
}
.btn-danger:hover {
  background: rgba(255,60,80,0.25);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* disabled submit state */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ─── Action row ──────────────────────────────────────────────── */
.action-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.action-row .btn { flex: 1; }

/* ─── Leaderboard ─────────────────────────────────────────────── */
#leaderboard-panel {
  width: 100%;
  margin-top: 4px;
}
.leaderboard-container {
  width: min(94vw, 880px);
  max-width: 880px;
  margin: 40px auto 0;
  padding: 24px 28px;
  background: var(--glass-bg, rgba(18, 21, 28, 0.42));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.16));
  box-shadow: var(--glass-shadow, 0 16px 40px rgba(0, 0, 0, 0.4));
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

/* Ambient Table Shimmer Sweep Beam (Runs 2 times on load then stops) */
.leaderboard-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 42%,
    rgba(255, 255, 255, 0.03) 47%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.03) 53%,
    transparent 58%
  );
  transform: rotate(25deg);
  animation: table-shimmer-sweep 2.2s 2 ease-in-out forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes table-shimmer-sweep {
  0% { transform: translateX(-100%) rotate(25deg); opacity: 1; }
  85% { transform: translateX(100%) rotate(25deg); opacity: 1; }
  100% { transform: translateX(100%) rotate(25deg); opacity: 0; }
}

.leaderboard-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text, #EDEEF0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-align: center;
}
/* ─── Leaderboard Structured Table ───────────────────────────── */
.lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin-top: 10px;
}

.lb-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #8A8F98);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lb-table th.th-score { text-align: right; }

.lb-table-row {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lb-table-row td {
  padding: 10px 14px;
  font-size: 0.875rem;
}
.lb-table-row td:first-child { border-radius: 12px 0 0 12px; }
.lb-table-row td:last-child  { border-radius: 0 12px 12px 0; }

.lb-table-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lb-table-row.is-mine {
  background: rgba(127, 82, 255, 0.15) !important;
  border: 1px solid rgba(127, 82, 255, 0.4) !important;
  box-shadow: 0 0 16px rgba(127, 82, 255, 0.25);
}

/* Smashing Impact Effect on Submitted Row */
.lb-table-row.is-newly-submitted,
.lb-table-row.smash-impact-active {
  animation: smash-drop-impact 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
  position: relative;
  z-index: 10;
  border: 1px solid var(--flutter, #13B9FD) !important;
  background: rgba(19, 185, 253, 0.25) !important;
}

@keyframes smash-drop-impact {
  0% {
    transform: scale(2.2) translateY(-40px);
    opacity: 0;
    box-shadow: 0 0 80px rgba(19, 185, 253, 1), 0 0 120px rgba(127, 82, 255, 1);
    filter: brightness(2);
  }
  40% {
    transform: scale(0.92) translateY(4px);
    opacity: 1;
    box-shadow: 0 0 50px rgba(19, 185, 253, 0.9), inset 0 0 30px rgba(19, 185, 253, 0.6);
  }
  70% {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 0 35px rgba(127, 82, 255, 0.6);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    box-shadow: 0 0 25px rgba(127, 82, 255, 0.5), inset 0 0 15px rgba(19, 185, 253, 0.35);
  }
}

/* Ellipsis Row Styling */
.lb-table-row.lb-ellipsis-row {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.td-ellipsis {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.775rem;
  color: var(--text-muted, #8A8F98);
  padding: 14px 0;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

/* Rank Badges: Gold Crown, Silver, Bronze */
.lb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.775rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lb-badge-gold {
  background: linear-gradient(135deg, #FFE066 0%, #D4AF37 50%, #996515 100%);
  color: #1A1000 !important;
  border: 1px solid #FFF0A6;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
}

.lb-badge-silver {
  background: linear-gradient(135deg, #F0F0F0 0%, #C0C0C0 50%, #707070 100%);
  color: #111111 !important;
  border: 1px solid #FFFFFF;
  box-shadow: 0 0 14px rgba(220, 220, 220, 0.35);
}

.lb-badge-bronze {
  background: linear-gradient(135deg, #F4A460 0%, #CD7F32 50%, #8B4513 100%);
  color: #FFFFFF !important;
  border: 1px solid #FFC89B;
  box-shadow: 0 0 14px rgba(205, 127, 50, 0.35);
}

.lb-badge-normal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #8A8F98);
}

.lb-crown { font-size: 0.95rem; }
.lb-medal { font-size: 0.9rem; }

.td-name {
  color: var(--text, #EDEEF0);
  font-weight: 600;
}

/* Top 3 Player Name Shimmer Gradient Texts (Gold, Silver, Bronze) */
.rank-first .lb-name-text {
  font-weight: 800;
  font-size: 0.95rem;
  background: linear-gradient(110deg, #FFE066 0%, #FFF8D6 25%, #D4AF37 50%, #FFF0A6 75%, #AA771C 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent !important;
  animation: gold-text-shimmer 3s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

@keyframes gold-text-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 250% center; }
}

.rank-second .lb-name-text {
  font-weight: 700;
  font-size: 0.92rem;
  background: linear-gradient(110deg, #FFFFFF 0%, #E8E8E8 25%, #A8B2C1 50%, #FFFFFF 75%, #8892A0 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent !important;
  animation: silver-text-shimmer 3.5s linear infinite;
  filter: drop-shadow(0 0 8px rgba(220, 220, 220, 0.4));
}

@keyframes silver-text-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 250% center; }
}

.rank-third .lb-name-text {
  font-weight: 700;
  font-size: 0.92rem;
  background: linear-gradient(110deg, #F4A460 0%, #FFD2A6 25%, #CD7F32 50%, #FFC89B 75%, #8B4513 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent !important;
  animation: bronze-text-shimmer 4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(205, 127, 50, 0.4));
}

@keyframes bronze-text-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 250% center; }
}

.lb-dev-tag {
  margin-left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--kotlin, #7F52FF), var(--flutter, #13B9FD));
  color: #FFFFFF;
}

.td-score {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--flutter, #13B9FD);
}

/* ─── Status / error message ──────────────────────────────────── */
#status-msg {
  font-size: 0.825rem;
  color: var(--text-muted, #8A8F98);
  text-align: center;
  min-height: 1.2em;
  transition: color 0.25s;
}
#status-msg.error { color: #FF8A8A; }
#status-msg.success { color: var(--flutter, #13B9FD); }

/* ─── Divider ─────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--glass-border, rgba(255,255,255,0.08));
}

/* ─── Footer ──────────────────────────────────────────────────── */
footer#footer {
  margin-top: 48px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted, #8A8F98);
  padding-bottom: 32px;
}
footer#footer a {
  color: var(--kotlin, #7F52FF);
  text-decoration: none;
}
footer#footer a:hover { text-decoration: underline; }

/* ─── Background orbs (same as main site) ────────────────────── */
.liquid-orbs {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
  animation: orb-float 22s ease-in-out infinite alternate;
}
.orb-kotlin {
  width: 520px; height: 520px;
  background: var(--kotlin, #7F52FF);
  opacity: 0.18;
  top: -120px; left: -100px;
  animation-duration: 25s;
}
.orb-flutter {
  width: 580px; height: 580px;
  background: var(--flutter, #13B9FD);
  opacity: 0.14;
  bottom: 5%; right: -140px;
  animation-duration: 28s;
  animation-delay: -8s;
}
@keyframes orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(70px, 90px) scale(1.1); }
  100% { transform: translate(-60px, -50px) scale(0.95); }
}

/* ─── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 520px) {
  nav#nav .nav-links { display: none; }
  .action-row { flex-direction: column; }
  #screen-start,
  #screen-gameover { padding: 28px 18px; }
  .game-title { font-size: 1.9rem; }
}
