/* ============================================================================
   DROP THE THING — Complete Stylesheet (Modern Mode + Retro CRT Pixel Mode)
   Zero External Framework Dependencies • Mobile-Friendly Single-Page Layout
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Press+Start+2P&family=VT323&display=swap');

:root {
  --bg-page: #fffbeb;
  --bg-panel: #ffffff;
  --bg-panel-muted: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-main: #0f172a;
  --accent-yellow: #facc15;
  --accent-orange: #f97316;
  --accent-pink: #ec4899;
  --accent-purple: #8b5cf6;
  --accent-blue: #0ea5e9;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 28px -6px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  --shadow-bold: 0 5px 0 #0f172a;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-goofy: 'Fredoka', 'Plus Jakarta Sans', cursive, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================================
   MODERN MODE (Default) — Clean UI, Bright Colors, Bold Shapes, Soft Shadows
   ============================================================================ */
body.theme-modern {
  background: radial-gradient(circle at 15% 15%, #fef08a 0%, #fffbeb 38%, #e0f2fe 100%);
  background-attachment: fixed;
  color: #0f172a;
}

body.theme-modern .crt-overlay {
  display: none;
}

/* ============================================================================
   RETRO MODE — Pixel Art, Chiptune Aesthetic, CRT Scanline Overlay
   ============================================================================ */
body.theme-retro {
  --bg-page: #050e05;
  --bg-panel: #081808;
  --bg-panel-muted: #041004;
  --text-main: #33ff33;
  --text-muted: #22cc22;
  --border-main: #33ff33;
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;
  --font-body: 'VT323', monospace;
  --font-goofy: 'Press Start 2P', monospace;

  background-color: #050e05;
  color: #33ff33;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  image-rendering: pixelated;
  text-shadow: 0 0 2px rgba(51, 255, 51, 0.65);
}

/* CRT Scanline & Vignette Overlay for Retro Mode */
body.theme-retro .crt-overlay {
  display: block;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    linear-gradient(
      rgba(18, 16, 16, 0) 50%,
      rgba(0, 0, 0, 0.34) 50%
    ),
    radial-gradient(
      circle at center,
      transparent 68%,
      rgba(0, 14, 0, 0.55) 100%
    );
  background-size: 100% 4px, 100% 100%;
}

/* ============================================================================
   TOP HEADER BAR & MODE TOGGLE
   ============================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid #0f172a;
}

body.theme-retro .site-header {
  background: #040c04;
  border-bottom: 2px solid #33ff33;
  box-shadow: 0 0 14px rgba(51, 255, 51, 0.25);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
  border: 2.5px solid #0f172a;
  box-shadow: 0 3px 0 #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transform: rotate(-6deg);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-wrap:hover .brand-logo {
  transform: rotate(8deg) scale(1.08);
}

body.theme-retro .brand-logo {
  border-radius: 0;
  background: #081808;
  border: 2px solid #33ff33;
  box-shadow: 0 0 8px rgba(51, 255, 51, 0.4);
  transform: none;
}

.brand-title {
  font-family: var(--font-goofy);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

body.theme-retro .brand-title {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

body.theme-retro .brand-subtitle {
  font-size: 0.95rem;
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

/* Mode Toggle Switch */
.mode-toggle-group {
  display: inline-flex;
  background: #f1f5f9;
  border: 2px solid #0f172a;
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}

body.theme-retro .mode-toggle-group {
  background: #041004;
  border: 2px solid #33ff33;
  border-radius: 0;
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s ease;
}

.mode-btn.active {
  background: #facc15;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

body.theme-retro .mode-btn {
  border-radius: 0;
  color: #22cc22;
  font-size: 1rem;
}

body.theme-retro .mode-btn.active {
  background: #33ff33;
  color: #040c04;
  text-shadow: none;
}

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 2.5px solid #0f172a;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 3px 0 #0f172a;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #0f172a;
  background: #fef9c3;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f172a;
}

.btn-primary {
  background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
  color: #0f172a;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fde047 0%, #fb923c 100%);
}

.btn-drop-giant {
  width: 100%;
  padding: 0.95rem 1.4rem;
  font-family: var(--font-goofy);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 55%, #facc15 100%);
  color: #ffffff;
  text-shadow: 0 2px 0 #0f172a;
  border: 3px solid #0f172a;
  border-radius: 16px;
  box-shadow: 0 6px 0 #0f172a, 0 12px 24px rgba(239, 68, 68, 0.32);
}

.btn-drop-giant:hover {
  background: linear-gradient(135deg, #f87171 0%, #fb923c 55%, #fde047 100%);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 9px 0 #0f172a, 0 16px 28px rgba(239, 68, 68, 0.4);
}

.btn-drop-giant:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #0f172a;
}

body.theme-retro .btn,
body.theme-retro .btn-primary,
body.theme-retro .btn-drop-giant {
  border-radius: 0;
  border: 2px solid #33ff33;
  background: #061406;
  color: #33ff33;
  box-shadow: 4px 4px 0 #145214;
  text-shadow: none;
  font-size: 1.05rem;
}

body.theme-retro .btn-drop-giant {
  background: #33ff33;
  color: #040c04;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  padding: 1rem;
}

body.theme-retro .btn:hover,
body.theme-retro .btn-drop-giant:hover {
  background: #33ff33;
  color: #040c04;
  box-shadow: 0 0 14px rgba(51, 255, 51, 0.75);
}

/* ============================================================================
   MICRO-TAUNT TICKER BANNER & SHARED LINK BANNER
   ============================================================================ */
.taunt-banner {
  max-width: 1360px;
  margin: 0.85rem auto 0;
  padding: 0 1.25rem;
}

.taunt-pill {
  background: #0f172a;
  color: #facc15;
  border-radius: 14px;
  padding: 0.65rem 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-soft);
}

body.theme-retro .taunt-pill {
  background: #041004;
  color: #33ff33;
  border: 2px solid #33ff33;
  border-radius: 0;
}

.taunt-quote {
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

body.theme-retro .taunt-quote {
  font-size: 1.2rem;
}

.shared-challenge-banner {
  margin-top: 0.65rem;
  background: linear-gradient(90deg, #fef08a 0%, #fed7aa 100%);
  border: 2.5px solid #0f172a;
  border-radius: 14px;
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 0 #0f172a;
}

body.theme-retro .shared-challenge-banner {
  background: #0b240b;
  border: 2px dashed #33ff33;
  border-radius: 0;
  color: #33ff33;
  box-shadow: none;
}

.hidden {
  display: none !important;
}

/* ============================================================================
   MAIN 3-COLUMN SINGLE-PAGE WORKSPACE GRID
   ============================================================================ */
.main-grid {
  max-width: 1360px;
  margin: 0.85rem auto 2.5rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 350px minmax(340px, 1fr) 390px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1180px) {
  .main-grid {
    grid-template-columns: 1fr 1fr;
  }
  .col-leaderboard {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Panels */
.card-panel {
  background: var(--bg-panel);
  border: 3px solid var(--border-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), 0 6px 0 var(--border-main);
  padding: 1.15rem;
}

body.theme-retro .card-panel {
  background: #061406;
  border: 2px solid #33ff33;
  border-radius: 0;
  box-shadow: 0 0 16px rgba(51, 255, 51, 0.16), inset 0 0 10px rgba(51, 255, 51, 0.08);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px dashed rgba(15, 23, 42, 0.15);
}

body.theme-retro .panel-header {
  border-bottom: 1.5px dashed #33ff33;
}

.panel-title {
  font-family: var(--font-goofy);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

body.theme-retro .panel-title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ============================================================================
   OBJECT PICKER (12 OBJECTS GRID)
   ============================================================================ */
.object-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (max-width: 420px) {
  .object-picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.object-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.6rem 0.45rem;
  background: var(--bg-panel-muted);
  border: 2.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.object-card:hover {
  transform: translateY(-3px);
  border-color: #0f172a;
  background: #fefce8;
  box-shadow: 0 4px 0 #0f172a;
}

.object-card.selected {
  background: #fef08a;
  border-color: #0f172a;
  box-shadow: 0 4px 0 #0f172a;
  transform: translateY(-2px);
}

body.theme-retro .object-card {
  background: #041004;
  border: 1.5px solid #1e6b1e;
  border-radius: 0;
  box-shadow: none;
}

body.theme-retro .object-card:hover,
body.theme-retro .object-card.selected {
  background: #0d2e0d;
  border: 2px solid #33ff33;
  box-shadow: 0 0 10px rgba(51, 255, 51, 0.45);
}

.object-art-thumb {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
}

.object-art-thumb svg,
.object-art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.theme-retro .object-art-thumb svg,
body.theme-retro .object-art-thumb img {
  image-rendering: pixelated;
}

.object-card-name {
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

body.theme-retro .object-card-name {
  font-size: 1.05rem;
}

.object-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.stat-chip {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

body.theme-retro .stat-chip {
  border-radius: 0;
  background: #061b06;
  border: 1px solid #22cc22;
  color: #33ff33;
  font-size: 0.82rem;
}

.effect-badge {
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1.5px solid #0f172a;
}

.effect-splatter { background: #fecdd3; color: #881337; }
.effect-shatter  { background: #bae6fd; color: #0c4a6e; }
.effect-bounce   { background: #fef08a; color: #713f12; }
.effect-explode  { background: #fed7aa; color: #7c2d12; }
.effect-special  { background: #e9d5ff; color: #4c1d95; }

body.theme-retro .effect-badge {
  border-radius: 0;
  background: #33ff33;
  color: #040c04;
  border: none;
  font-size: 0.8rem;
  text-shadow: none;
}

/* Paging Bar (12 Objects Per Page) */
.catalog-pager {
  margin-top: 0.75rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg-panel-muted);
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

body.theme-retro .catalog-pager {
  background: #041004;
  border: 1.5px solid #33ff33;
  border-radius: 0;
}

.pager-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
}

body.theme-retro .pager-btn {
  font-size: 0.92rem;
}

.page-indicator-text {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--text-main);
  white-space: nowrap;
}

body.theme-retro .page-indicator-text {
  font-size: 1rem;
  color: #33ff33;
}

/* Selected Object Inspector Card */
.selected-inspector {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-panel-muted);
  border: 2px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.theme-retro .selected-inspector {
  background: #041004;
  border: 1.5px solid #33ff33;
}

/* ============================================================================
   CENTER COLUMN: TALL VERTICAL DROP ZONE
   ============================================================================ */
.drop-zone-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drop-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.drop-canvas-container {
  position: relative;
  width: 100%;
  height: 580px;
  flex-shrink: 0;
  border-radius: 16px;
  border: 3.5px solid #0f172a;
  overflow: hidden;
  background: #e0f2fe;
  box-shadow: inset 0 4px 12px rgba(15, 23, 42, 0.08);
  cursor: crosshair;
}

body.theme-retro .drop-canvas-container {
  border-radius: 0;
  border: 3px solid #33ff33;
  background: #071407;
  box-shadow: 0 0 18px rgba(51, 255, 51, 0.25);
}

#drop-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.drop-zone-overlay-hint {
  position: absolute;
  top: 22px;
  right: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

body.theme-retro .drop-zone-overlay-hint {
  background: #041004;
  color: #33ff33;
  border: 1px solid #33ff33;
  border-radius: 0;
  font-size: 0.9rem;
}

/* ============================================================================
   RIGHT COLUMN: BIG GOOFY SCORE HUD, NICKNAME, SHARE & TOP 50 LEADERBOARD
   ============================================================================ */
.score-hud-box {
  background: linear-gradient(135deg, #fef08a 0%, #fed7aa 100%);
  border: 3px solid #0f172a;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 5px 0 #0f172a;
  margin-bottom: 0.9rem;
  position: relative;
  overflow: hidden;
}

body.theme-retro .score-hud-box {
  background: #041004;
  border: 2px solid #33ff33;
  border-radius: 0;
  box-shadow: inset 0 0 14px rgba(51, 255, 51, 0.2);
}

.score-label {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c2d12;
}

body.theme-retro .score-label {
  color: #33ff33;
  font-size: 1rem;
}

/* Big Goofy Numbers */
.goofy-score-number {
  font-family: var(--font-goofy);
  font-size: 4.1rem;
  font-weight: 900;
  line-height: 1.05;
  color: #ef4444;
  text-shadow:
    3px 3px 0 #0f172a,
    -1.5px -1.5px 0 #0f172a,
    1.5px -1.5px 0 #0f172a,
    -1.5px 1.5px 0 #0f172a,
    0 6px 0 #0f172a;
  transform: rotate(-3deg);
  margin: 0.25rem 0;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-retro .goofy-score-number {
  font-family: 'Press Start 2P', monospace;
  font-size: 2.35rem;
  color: #33ff33;
  text-shadow: 0 0 10px rgba(51, 255, 51, 0.85);
  transform: none;
  margin: 0.5rem 0;
}

@keyframes goofyScorePop {
  0%   { transform: scale(0.6) rotate(-12deg); }
  50%  { transform: scale(1.24) rotate(6deg); }
  75%  { transform: scale(0.94) rotate(-4deg); }
  100% { transform: scale(1) rotate(-3deg); }
}

.goofy-score-pop {
  animation: goofyScorePop 0.48s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chaos-breakdown-pill {
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid #0f172a;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  margin-top: 0.35rem;
  color: #0f172a;
}

body.theme-retro .chaos-breakdown-pill {
  background: #061806;
  border: 1px solid #33ff33;
  border-radius: 0;
  color: #33ff33;
  font-size: 0.95rem;
}

/* Share Box */
.share-box {
  background: var(--bg-panel-muted);
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin-bottom: 0.9rem;
}

body.theme-retro .share-box {
  background: #041004;
  border: 1.5px solid #33ff33;
  border-radius: 0;
}

.share-url-preview {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #0f172a;
  overflow-x: auto;
  white-space: nowrap;
  margin-top: 0.4rem;
}

body.theme-retro .share-url-preview {
  background: #020802;
  border: 1px solid #33ff33;
  border-radius: 0;
  color: #33ff33;
  font-size: 0.95rem;
}

/* Nickname Input Panel */
.nickname-box {
  background: var(--bg-panel-muted);
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.9rem;
}

body.theme-retro .nickname-box {
  background: #041004;
  border: 1.5px solid #33ff33;
  border-radius: 0;
}

.input-text {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
}

.input-text:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

body.theme-retro .input-text {
  background: #020802;
  color: #33ff33;
  border: 2px solid #33ff33;
  border-radius: 0;
  font-size: 1.1rem;
}

.feedback-msg {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.feedback-error { color: #dc2626; }
.feedback-ok    { color: #16a34a; }

body.theme-retro .feedback-error,
body.theme-retro .feedback-ok {
  color: #33ff33;
  font-size: 0.95rem;
}

/* Top 50 Leaderboard Table */
.leaderboard-scroll {
  max-height: 360px;
  overflow-y: auto;
  border: 2px solid #0f172a;
  border-radius: 10px;
  background: #ffffff;
}

body.theme-retro .leaderboard-scroll {
  border: 1.5px solid #33ff33;
  border-radius: 0;
  background: #030a03;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

body.theme-retro .leaderboard-table {
  font-size: 1.02rem;
}

.leaderboard-table th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.55rem;
  text-align: left;
  border-bottom: 2px solid #0f172a;
}

body.theme-retro .leaderboard-table th {
  background: #082008;
  color: #33ff33;
  border-bottom: 1.5px solid #33ff33;
  font-size: 0.9rem;
}

.leaderboard-table td {
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
}

body.theme-retro .leaderboard-table td {
  border-bottom: 1px dashed #145214;
}

.leaderboard-table tr.is-player-row {
  background: #fef9c3;
}

body.theme-retro .leaderboard-table tr.is-player-row {
  background: #0f300f;
}

.you-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 0.64rem;
  font-weight: 900;
  background: #facc15;
  color: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 999px;
}

body.theme-retro .you-tag {
  background: #33ff33;
  color: #040c04;
  border-radius: 0;
  font-size: 0.8rem;
  text-shadow: none;
}

/* Active Chaos Environmental Effects Panel */
.active-effects-panel {
  margin-top: 0.15rem;
  padding: 0.6rem 0.75rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #f8fafc;
  border: 2.5px solid #2dd4bf;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.25);
}

body.theme-retro .active-effects-panel {
  background: #041204;
  border: 2px solid #33ff33;
  border-radius: 0;
  box-shadow: none;
  color: #33ff33;
}

.active-effects-header {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2dd4bf;
  margin-bottom: 0.4rem;
}

body.theme-retro .active-effects-header {
  color: #33ff33;
  font-size: 0.85rem;
}

.active-effects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.45rem;
}

.active-effect-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(45, 212, 191, 0.45);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.74rem;
  line-height: 1.35;
}

body.theme-retro .active-effect-item {
  background: #071f07;
  border: 1px solid #33ff33;
  border-radius: 0;
  font-size: 0.9rem;
}

.active-effect-title {
  font-weight: 900;
  color: #ffffff;
}

body.theme-retro .active-effect-title {
  color: #33ff33;
}

.active-effect-meta {
  font-weight: 700;
  color: #cbd5e1;
  font-size: 0.7rem;
}

body.theme-retro .active-effect-meta {
  color: #22cc22;
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}
