/* ============================================
           ASDF GAME OF THE WEEK
           Fire-themed gaming platform
           ============================================ */

@import url('./design-tokens.css');

:root {
  /* Fire Palette */
  --bg-void: #0a0a0f;
  --bg-dark: #0c0c0c;
  --bg-charred: #2a1005;
  --bg-burnt: #451a03;
  --border-rust: #7c2d12;
  --border-orange: #9a3412;
  --accent-fire: #ea580c;
  --accent-bright: #fb923c;
  --accent-ember: #f97316;
  --text-cream: #ffedd5;
  --text-muted: #a8a29e;
  --green: #22c55e;
  --green-light: #4ade80;
  --purple: #a855f7;
  --blue: #3b82f6;
  --red: #ef4444;
  --gold: #fbbf24;
  --silver: #9ca3af;
  --bronze: #d97706;

  /* Typography */
  --font-display: 'Comic Neue', cursive;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --container-max: 1200px;
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: #020812;
}

/* Accessibility: Focus styles */
:focus-visible {
  outline: 2px solid var(--accent-fire);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
.skip-link:focus {
  left: 16px !important;
}

body {
  font-family: var(--font-mono);
  background: transparent;
  color: var(--text-cream);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Scrollbar styling - Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-rust) var(--bg-charred);
}

/* Scrollbar styling - Webkit (Chrome, Safari, Edge) */
/* Note: Firefox ignores ::-webkit-* selectors automatically */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-charred);
}
::-webkit-scrollbar-thumb {
  background: var(--border-rust);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-fire);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
           GAMES-SPECIFIC STYLES
           (Navigation handled by learn.css)
           ============================================ */

/* Dev Mode Button */
.dev-mode-btn {
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--font-bold);
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  background: transparent;
  color: var(--purple);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.dev-mode-btn:hover {
  background: var(--purple);
  color: #fff;
}

.dev-mode-btn.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* Wallet Button */
.wallet-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius);
  background: var(--bg-burnt);
  color: var(--text-cream);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  box-shadow: 3px 3px 0 var(--border-rust);
}

.wallet-btn:hover {
  background: var(--accent-fire);
  border-color: var(--accent-fire);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border-rust);
}

.wallet-btn.connected {
  background: var(--green);
  border-color: var(--green-light);
  color: #000;
}

.wallet-btn.connected:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.wallet-address {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Holder Badge */
.holder-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid var(--purple);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--purple);
  text-transform: uppercase;
}

.visitor-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(168, 162, 158, 0.2);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ============================================
           MAIN CONTENT
           Note: .main style removed to avoid conflict with learn.css in SPA mode
           Standalone games.html inherits from this file's body padding
           ============================================ */

/* ============================================
           HERO SECTION - GAME OF THE WEEK
           ============================================ */

.hero {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-3xl);
  position: relative;
  z-index: 5; /* Above fixed backgrounds */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(234, 88, 12, 0.2), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(124, 45, 18, 0.15), transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.gotw-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-charred);
  border: 2px solid var(--accent-fire);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  margin-bottom: var(--space-lg);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(234, 88, 12, 0.6);
  }
}

.hero-game-icon {
  font-size: var(--text-6xl);
  margin-bottom: var(--space-lg);
  filter: drop-shadow(0 0 30px rgba(234, 88, 12, 0.5));
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 64px);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-md);
  text-shadow: 4px 4px 0 var(--accent-fire);
}

.hero-description {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

.hero-countdown {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.countdown-item {
  text-align: center;
}

.countdown-value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  background: var(--bg-burnt);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  min-width: 70px;
  box-shadow: 0 0 15px rgba(234, 88, 12, 0.2);
}

.countdown-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-decoration: none;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: var(--bg-burnt);
  color: var(--text-cream);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  box-shadow: 4px 4px 0 var(--border-rust);
}

.btn:hover {
  background: var(--accent-fire);
  border-color: var(--gold);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--border-rust);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--border-rust);
}

.btn-primary {
  background: var(--accent-fire);
  border-color: var(--gold);
  font-size: var(--text-base);
  padding: var(--space-md) var(--space-2xl);
}

.btn-primary:hover {
  background: var(--accent-bright);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 4px 4px 0 var(--border-rust) !important;
}

/* ============================================
           ACCESS INFO BAR
           ============================================ */

.access-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-burnt);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  margin: var(--space-2xl) auto;
  max-width: 800px;
  box-shadow: 0 0 20px rgba(234, 88, 12, 0.15);
}

.access-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

.access-icon {
  font-size: var(--text-lg);
}

.access-item.locked {
  color: var(--text-muted);
}

.access-item.unlocked {
  color: var(--green);
}

/* ============================================
           GAMES GRID - RAGNAR EDITION
           ============================================ */

.games-section {
  padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
  position: relative;
  z-index: 5; /* Above fixed backgrounds */
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-family: 'Orbitron', var(--font-display), sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-md);
  color: #fff;
  text-shadow: 0 0 30px rgba(0, 245, 255, 0.4);
  letter-spacing: 0.05em;
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: 1000px;
  margin: 0 auto;
}

/* Game Card - Ragnar Edition */
.game-card {
  background: rgba(15, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--duration-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Neon border glow */
.game-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.15) 0%,
    rgba(255, 45, 149, 0.1) 50%,
    rgba(251, 191, 36, 0.15) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 245, 255, 0.4);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 245, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.game-card:hover::before {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.5) 0%,
    rgba(191, 0, 255, 0.3) 50%,
    rgba(251, 191, 36, 0.5) 100%
  );
}

/* Featured card - Game of the Week */
.game-card.featured {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.1) 0%,
    rgba(15, 15, 25, 0.8) 50%,
    rgba(251, 191, 36, 0.05) 100%
  );
}

.game-card.featured::before {
  opacity: 0.6;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.4) 0%,
    rgba(255, 150, 50, 0.2) 50%,
    rgba(251, 191, 36, 0.4) 100%
  );
}

.game-card.featured::after {
  content: 'GAME OF THE WEEK';
  position: absolute;
  top: 16px;
  right: -32px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #000;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  padding: 5px 40px;
  transform: rotate(45deg);
  z-index: 2;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.5);
}

/* Locked card */
.game-card.locked {
  opacity: 0.5;
}

.game-card.locked::after {
  content: 'HOLDER ONLY';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #a855f7;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.game-icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: all var(--duration-normal) ease;
}

.game-card:hover .game-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 20px rgba(0, 245, 255, 0.5));
}

.game-name {
  font-family: 'Orbitron', var(--font-display), sans-serif;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
  color: #fff;
  transition: all var(--duration-normal) ease;
  letter-spacing: 0.02em;
}

.game-card:hover .game-name {
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.game-type {
  font-size: var(--text-xs);
  color: rgba(0, 245, 255, 0.8);
  margin-bottom: var(--space-md);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.game-highscore {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--gold);
  margin-bottom: var(--space-md);
  font-weight: var(--font-semibold);
  transition: all var(--duration-normal) ease;
}

.game-card:hover .game-highscore {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.game-play-btn {
  width: 100%;
  padding: var(--space-md);
  font-family: 'Orbitron', var(--font-mono), sans-serif;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(0, 245, 255, 0.1));
  border: 1px solid rgba(0, 245, 255, 0.4);
  color: #00f5ff;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) ease;
}

.game-play-btn:hover {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.4), rgba(0, 245, 255, 0.2));
  border-color: rgba(0, 245, 255, 0.8);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
  transform: translateY(-2px);
}

.game-card.featured .game-play-btn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.15));
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

.game-card.featured .game-play-btn:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(251, 191, 36, 0.3));
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

/* ============================================
           LEADERBOARD SECTION
           ============================================ */

.leaderboard-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-burnt);
  position: relative;
  border: 4px solid var(--gold);
  border-radius: var(--radius-2xl);
  margin: var(--space-lg) auto;
  max-width: 1150px;
  box-shadow: var(--shadow-lg);
}

.leaderboard-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .leaderboard-container {
    grid-template-columns: 1fr;
  }
}

.leaderboard-card {
  background: var(--bg-charred);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-burnt);
  border-bottom: 2px solid var(--gold);
}

.leaderboard-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.leaderboard-tabs {
  display: flex;
  gap: var(--space-2xs);
}

.leaderboard-tab {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  background: transparent;
  border: 1px solid var(--border-rust);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.leaderboard-tab.active {
  background: var(--accent-fire);
  border-color: var(--accent-fire);
  color: #fff;
}

.leaderboard-list {
  padding: var(--space-md);
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  background: var(--bg-burnt);
  border: 1px solid var(--border-rust);
}

.leaderboard-item:last-child {
  margin-bottom: 0;
}

.leaderboard-item.you {
  border-color: var(--accent-fire);
  background: rgba(234, 88, 12, 0.1);
}

.leaderboard-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  border-radius: 50%;
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
}

.leaderboard-rank.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}

.leaderboard-rank.silver {
  background: var(--silver);
  border-color: var(--silver);
  color: #000;
}

.leaderboard-rank.bronze {
  background: var(--bronze);
  border-color: var(--bronze);
  color: #000;
}

.leaderboard-player {
  flex: 1;
  font-size: var(--text-sm);
}

.leaderboard-score {
  font-weight: var(--font-bold);
  color: var(--accent-bright);
}

/* ============================================
           REWARD INFO SECTION
           ============================================ */

.reward-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-charred);
  margin-top: var(--space-2xl);
}

.reward-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-burnt);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-2xl);
  text-align: center;
}

.reward-icon {
  font-size: var(--text-6xl);
  margin-bottom: var(--space-md);
}

.reward-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-md);
  color: var(--gold);
}

.reward-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.reward-countdown {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.reward-countdown .countdown-value {
  font-size: var(--text-xl);
  min-width: 60px;
  padding: var(--space-sm) var(--space-md);
  border-color: var(--gold);
}

.reward-rules {
  text-align: left;
  background: var(--bg-charred);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.reward-rules h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: var(--space-md);
  color: var(--text-cream);
}

.reward-rules ul {
  list-style: none;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.reward-rules li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-rust);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.reward-rules li:last-child {
  border-bottom: none;
}

.reward-rules .rule-icon {
  font-size: var(--text-base);
}

/* ============================================
           TICKETS INFO
           ============================================ */

.tickets-bar {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-elevated);
}

.tickets-count {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--gold);
}

.buy-tickets-btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
}

/* ============================================
           GAME MODAL
           ============================================ */

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden;
}

.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--duration-normal) ease,
    visibility var(--duration-normal) ease;
}

.game-modal.active {
  opacity: 1;
  visibility: visible;
}

.game-modal-content {
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius);
  width: 100%;
  max-width: 1100px;
  max-height: 95vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform var(--duration-normal) ease;
}

.game-modal.active .game-modal-content {
  transform: scale(1);
}

.game-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-burnt);
  border-bottom: 2px solid var(--border-rust);
}

.game-modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.game-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius-md);
  color: var(--text-cream);
  font-size: var(--text-xl);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.game-modal-close:hover {
  background: var(--red);
  border-color: var(--red);
}

.game-modal-body {
  flex: 1;
  padding: var(--space-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-arena {
  background: var(--bg-burnt);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius);
  flex: 1;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-burnt);
  border-top: 2px solid var(--border-rust);
}

.game-stats {
  display: flex;
  gap: var(--space-lg);
}

.game-stat {
  text-align: center;
}

.game-stat-value {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
}

.game-stat-label {
  font-size: var(--text-2xs);
  color: var(--text-muted);
  text-transform: uppercase;
}

.game-mode-toggle {
  display: flex;
  gap: var(--space-sm);
}

.mode-btn {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.mode-btn.active {
  background: var(--accent-fire);
  border-color: var(--accent-fire);
  color: #fff;
}

.mode-btn:hover:not(.active) {
  border-color: var(--accent-fire);
  color: var(--text-cream);
}

/* Game Start Overlay */
.game-start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: 10;
}

.game-start-overlay.hidden {
  display: none;
}

.game-instructions {
  text-align: center;
  max-width: 300px;
}

.game-instructions h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.game-instructions p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
           RESPONSIVE
           ============================================ */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-countdown {
    gap: var(--space-md);
  }

  .countdown-value {
    font-size: var(--text-xl);
    min-width: 55px;
    padding: var(--space-sm) var(--space-md);
  }

  .access-bar {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .tickets-bar {
    bottom: var(--space-sm);
    right: var(--space-sm);
    left: var(--space-sm);
    justify-content: space-between;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
           DENSITY: DETAILED — More context & guides
           ============================================ */
.density-detailed {
  display: none;
}
[data-density='detailed'] .density-detailed,
[data-density='full'] .density-detailed {
  display: block;
}

.density-full {
  display: none;
}
[data-density='full'] .density-full {
  display: block;
}

/* ============================================
           VARIANT 2: NEON — Magenta + Cyan cyberpunk
           ============================================ */
[data-variant='2'] {
  --accent-fire: #e879f9;
  --accent-bright: #f0abfc;
  --accent-ember: #d946ef;
  --bg-charred: #1a0025;
  --bg-burnt: #2d004a;
  --border-rust: #7e22ce;
  --border-orange: #a855f7;
  --gold: #06b6d4;
  --neon-cyan: #06b6d4;
  --neon-pink: #e879f9;
}

[data-variant='2'] html {
  background: #0a0012;
}

[data-variant='2'] .hero::before {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 121, 249, 0.2), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.15), transparent 40%);
}

[data-variant='2'] .gotw-badge {
  border-color: #e879f9;
  color: #f0abfc;
  background: #2d004a;
}

[data-variant='2'] .game-card {
  background: rgba(15, 0, 25, 0.7);
}

[data-variant='2'] .game-card:hover {
  border-color: rgba(232, 121, 249, 0.4);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(232, 121, 249, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-variant='2'] .game-card:hover .game-name {
  text-shadow: 0 0 20px rgba(232, 121, 249, 0.5);
}

[data-variant='2'] .game-type {
  color: rgba(6, 182, 212, 0.8);
}

[data-variant='2'] .game-play-btn {
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.2), rgba(6, 182, 212, 0.1));
  border-color: rgba(232, 121, 249, 0.4);
  color: #e879f9;
}

[data-variant='2'] .game-play-btn:hover {
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.4), rgba(6, 182, 212, 0.2));
  border-color: rgba(232, 121, 249, 0.8);
  box-shadow: 0 0 20px rgba(232, 121, 249, 0.3);
}

[data-variant='2'] .section-title {
  text-shadow: 0 0 30px rgba(232, 121, 249, 0.4);
}

[data-variant='2'] .leaderboard-section {
  border-color: #e879f9;
}

[data-variant='2'] .leaderboard-tab.active {
  background: linear-gradient(135deg, #e879f9, #d946ef);
  border-color: #f0abfc;
}

/* ============================================
           VARIANT 3: PIXEL — Green + White retro 8-bit
           ============================================ */
[data-variant='3'] {
  --accent-fire: #22c55e;
  --accent-bright: #4ade80;
  --accent-ember: #16a34a;
  --bg-charred: #0a0a0a;
  --bg-burnt: #111111;
  --border-rust: #1a1a1a;
  --border-orange: #22c55e;
  --gold: #ffffff;
  --neon-cyan: #22c55e;
  --neon-pink: #22c55e;
}

[data-variant='3'] html {
  background: #0a0a0a;
}

[data-variant='3'] .hero::before {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(34, 197, 94, 0.08), transparent 40%);
}

[data-variant='3'] .gotw-badge {
  border-color: #22c55e;
  color: #4ade80;
  background: #111111;
}

[data-variant='3'] .hero h1 {
  text-shadow: 3px 3px 0 #22c55e;
  font-family: 'JetBrains Mono', monospace;
}

[data-variant='3'] .game-card {
  background: rgba(10, 10, 10, 0.8);
  border-color: rgba(34, 197, 94, 0.15);
  border-radius: 4px;
}

[data-variant='3'] .game-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(34, 197, 94, 0.1);
}

[data-variant='3'] .game-card:hover .game-name {
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

[data-variant='3'] .game-type {
  color: rgba(34, 197, 94, 0.7);
}

[data-variant='3'] .game-play-btn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
  border-radius: 2px;
}

[data-variant='3'] .game-play-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

[data-variant='3'] .section-title {
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

[data-variant='3'] .leaderboard-section {
  border-color: #22c55e;
  border-radius: 4px;
}

[data-variant='3'] .leaderboard-tab.active {
  background: #22c55e;
  border-color: #4ade80;
  color: #000;
}

[data-variant='3'] .countdown-value {
  border-color: #22c55e;
  color: #4ade80;
}

/* ============================================
           ANIMATIONS
           ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--duration-slow) ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake var(--duration-normal) ease;
}

/* Pack Opening Animation */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  }
  50% {
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.8);
  }
}

.pack-card {
  animation: glow 2s infinite;
}

.pack-card:hover {
  transform: scale(1.05) rotateY(10deg);
}

.pack-card.flip {
  animation: packFlip 0.6s forwards;
}

@keyframes packFlip {
  0% {
    transform: rotateY(0deg) scale(1);
  }
  50% {
    transform: rotateY(90deg) scale(1.1);
  }
  100% {
    transform: rotateY(180deg) scale(0);
    opacity: 0;
  }
}

.pack-win {
  animation: winPop 0.5s ease-out;
}

@keyframes winPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
           UTILITY CLASSES
           ============================================ */

.hidden {
  display: none !important;
}
.text-gold {
  color: var(--gold);
}
.text-green {
  color: var(--green);
}
.text-red {
  color: var(--red);
}
.text-muted {
  color: var(--text-muted);
}

/* ============================================
           GAME ENGINE UI COMPONENTS
           Replaces inline styles for CSP compliance
           ============================================ */

/* Game Container Base */
.game-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Game Backgrounds */
.game-bg-purple {
  background: linear-gradient(180deg, #1a0a2e 0%, #2d1b4e 50%, #1a1a2e 100%);
}

.game-bg-dark {
  background: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 100%);
}

.game-bg-space {
  background: #1a1a2e;
}

.game-bg-trading {
  background: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 100%);
}

.game-bg-green {
  background: linear-gradient(180deg, #0a1a0a 0%, #1a3a1a 100%);
}

/* Game HUD - Stats Container */
.game-hud {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: flex;
  gap: var(--space-lg);
  z-index: 10;
}

.game-hud-compact {
  top: var(--space-sm);
  left: var(--space-sm);
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Game Stat Box */
.game-stat-box {
  background: rgba(0, 0, 0, 0.5);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
}

.game-stat-box-compact {
  background: rgba(0, 0, 0, 0.7);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
}

.game-stat-label {
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.game-stat-value {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.game-stat-value-gold {
  color: var(--gold);
}
.game-stat-value-fire {
  color: var(--accent-fire);
}
.game-stat-value-purple {
  color: var(--purple);
}
.game-stat-value-green {
  color: var(--green);
}
.game-stat-value-blue {
  color: var(--blue);
}

/* Game Instructions/Hints */
.game-hint {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-align: center;
  z-index: 10;
}

/* Game Canvas Container */
.game-canvas-wrapper {
  width: 100%;
  height: 100%;
}

.game-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
}

/* Game Zone - Safe/Target Areas */
.game-zone {
  position: absolute;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-zone-safe {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), rgba(251, 191, 36, 0.3));
  border: 2px solid var(--gold);
}

/* Game Buttons in Arena */
.game-action-btn {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-transform: uppercase;
}

.game-action-btn-pump {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.game-action-btn-dump {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.game-action-btn:hover {
  transform: scale(1.05);
}

.game-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Trading Chart Container */
.game-chart {
  position: relative;
  width: 100%;
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Game Token Display */
.game-token-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
}

.game-token-icon {
  font-size: var(--text-3xl);
}

.game-token-name {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-cream);
}

/* Game Price Display */
.game-price {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.game-price-up {
  color: var(--green);
}
.game-price-down {
  color: var(--red);
}
.game-price-neutral {
  color: var(--text-cream);
}

/* Game Round/Timer Display */
.game-round-display {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  gap: var(--space-md);
  z-index: 10;
}

/* Game Result Overlay */
.game-result-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.game-result-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-lg);
}

.game-result-win {
  color: var(--green);
}
.game-result-lose {
  color: var(--red);
}

/* Game Shop/Upgrade Buttons */
.game-shop {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
  z-index: 10;
}

.game-shop-btn {
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-rust);
  border-radius: var(--radius-sm);
  color: var(--text-cream);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.game-shop-btn:hover {
  background: var(--accent-fire);
  border-color: var(--accent-fire);
}

.game-shop-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Game Crosshair Cursor */
.game-crosshair {
  cursor: crosshair;
}

/* Game Entity Styles */
.game-entity {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  transition: transform 0.1s ease;
}

/* Game Health Bar */
.game-health-bar {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  overflow: hidden;
}

.game-health-fill {
  height: 100%;
  background: var(--green);
  transition: width var(--duration-fast) ease;
}

.game-health-fill.low {
  background: var(--red);
}

/* Pump Arena Specific */
.pump-arena-layout {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  box-sizing: border-box;
  height: 100%;
}

.pump-arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.pump-arena-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-top: var(--space-md);
}

/* ============================================
           GAME OVER OVERLAY
           ============================================ */

.game-over-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  z-index: var(--z-overlay);
}

.game-over-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
}

.game-over-score {
  font-size: var(--text-xl);
  color: var(--gold);
}

.game-over-new-best {
  font-size: var(--text-lg);
  color: var(--green);
  animation: pulse var(--duration-slow) infinite;
}

.game-over-rank {
  font-size: var(--text-base);
  color: var(--purple);
}

.game-over-error {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.game-over-restart {
  margin-top: var(--space-sm);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ============================================
           GAME-SPECIFIC UI ELEMENTS
           ============================================ */

/* Tower Shop Button (Hold Hero) */
.tower-shop-btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
}

/* Rug Pull Warning */
.rug-warning {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  animation: pulse var(--duration-slow);
}

/* Whale Watch Button */
.whale-btn {
  width: 100px;
  height: 100px;
  font-size: var(--text-5xl);
  background: rgba(0, 0, 0, 0.3);
  border-width: 3px;
  border-style: solid;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.whale-btn:hover {
  transform: scale(1.05);
}

/* ============================================
   COMPETITIVE MODE TIMER
   ============================================ */

.competitive-timer-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--bg-burnt), rgba(234, 88, 12, 0.2));
  border: 1px solid var(--accent-fire);
  border-radius: var(--radius-md);
}

.timer-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.timer-value {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  font-family: var(--font-mono);
}

.timer-value.time-low {
  color: var(--gold);
  animation: pulse 1s infinite;
}

.timer-value.time-exhausted {
  color: var(--red);
  animation: none;
}

/* Timer in game modal */
#timer-stat-container .game-stat-value.time-low,
.game-stat-value.time-low {
  color: var(--gold) !important;
  animation: pulse 1s infinite;
}

.game-stat-value.time-exhausted {
  color: var(--red) !important;
}

/* ============================================
   GLOBAL LEADERBOARD SECTION
   ============================================ */

.leaderboard-global-section {
  padding: var(--space-3xl) var(--space-lg);
  background: transparent;
}

.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.leaderboard-tab {
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.leaderboard-tab:hover {
  border-color: var(--accent-fire);
  color: var(--text-cream);
}

.leaderboard-tab.active {
  background: linear-gradient(135deg, var(--accent-fire), var(--accent-ember));
  border-color: var(--accent-bright);
  color: white;
}

.leaderboard-content {
  max-width: 600px;
  margin: 0 auto;
}

.leaderboard-list {
  display: none;
  flex-direction: column;
  gap: var(--space-sm);
}

.leaderboard-list.active {
  display: flex;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  background: var(--bg-charred);
  border: 1px solid var(--border-rust);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.leaderboard-item:hover {
  border-color: var(--accent-fire);
  transform: translateX(4px);
}

.leaderboard-item.you {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.2), rgba(251, 146, 60, 0.1));
  border-color: var(--accent-fire);
}

.leaderboard-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  background: var(--bg-burnt);
  border-radius: 50%;
}

.leaderboard-rank.gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
}

.leaderboard-rank.silver {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  color: #000;
}

.leaderboard-rank.bronze {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #000;
}

.leaderboard-player {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-cream);
}

.leaderboard-score {
  font-weight: var(--font-bold);
  font-size: var(--text-base);
  color: var(--accent-bright);
}

.leaderboard-loading,
.leaderboard-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ============================================
   MINI LEADERBOARD IN GAME MODAL
   ============================================ */

.game-leaderboard-mini {
  padding: var(--space-md);
  background: var(--bg-charred);
  border-top: 1px solid var(--border-rust);
  max-height: 200px;
  overflow-y: auto;
}

.mini-leaderboard-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-md);
  text-align: center;
}

.mini-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mini-leaderboard-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-burnt);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.mini-leaderboard-item.you {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.3), rgba(251, 146, 60, 0.15));
  border: 1px solid var(--accent-fire);
}

.mini-rank {
  font-weight: var(--font-bold);
  width: 28px;
  color: var(--text-muted);
}

.mini-rank.gold {
  color: var(--gold);
}
.mini-rank.silver {
  color: var(--silver);
}
.mini-rank.bronze {
  color: var(--bronze);
}

.mini-player {
  flex: 1;
  color: var(--text-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-score {
  font-weight: var(--font-bold);
  color: var(--accent-bright);
}

/* Competitive mode button active state */
.mode-btn[data-action='toggle-competitive'].active,
#competitive-btn-tokencatcher.active,
#competitive-btn-burnrunner.active,
#competitive-btn-scamblaster.active,
#competitive-btn-cryptoheist.active,
#competitive-btn-pumparena.active,
#competitive-btn-whalewatch.active,
#competitive-btn-stakestacker.active,
#competitive-btn-dexdash.active,
#competitive-btn-burnorhold.active,
#competitive-btn-liquiditymaze.active {
  background: linear-gradient(135deg, var(--accent-fire), var(--accent-ember)) !important;
  border-color: var(--accent-bright) !important;
  color: white !important;
}

/* ============================================
   ASDF ENGAGE - XP & TIER SYSTEM
   ============================================ */

/* Engage tier colors */
:root {
  --tier-ember: #78716c;
  --tier-spark: #fbbf24;
  --tier-flame: #f97316;
  --tier-blaze: #ef4444;
  --tier-inferno: #dc2626;
  --accent-spark: var(--tier-spark);
  --accent-flame: var(--tier-flame);
  --accent-blaze: var(--tier-blaze);
  --accent-inferno: var(--tier-inferno);
}

/* XP Notification Container */
.xp-notification-container {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

/* XP Notification */
.xp-notification {
  background: var(--bg-burnt);
  border: 2px solid var(--accent-fire);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  box-shadow:
    0 4px 20px rgba(234, 88, 12, 0.4),
    0 0 15px rgba(234, 88, 12, 0.2);
  transform: translateX(120%);
  opacity: 0;
  transition: all var(--duration-normal) ease-out;
}

.xp-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.xp-notification.fade {
  transform: translateX(120%);
  opacity: 0;
}

.xp-notification .xp-source {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--font-normal);
}

/* Tier Up Overlay */
.tier-up-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: calc(var(--z-toast) + 1);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.tier-up-overlay.show {
  opacity: 1;
}

.tier-up-modal {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-charred));
  border: 2px solid var(--accent-fire);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-3xl);
  text-align: center;
  animation: tierUpPulse var(--duration-slow) ease-out;
}

@keyframes tierUpPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.tier-up-icon {
  font-size: var(--text-6xl);
  margin-bottom: var(--space-md);
  animation: tierUpBounce var(--duration-slower) ease infinite;
}

@keyframes tierUpBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.tier-up-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  text-shadow: 0 0 20px var(--accent-fire);
  margin-bottom: var(--space-lg);
}

.tier-up-progression {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-xl);
}

.tier-from {
  color: var(--text-muted);
}

.tier-arrow {
  color: var(--accent-fire);
}

.tier-to {
  text-shadow: 0 0 10px currentColor;
}

.tier-up-benefits {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  color: var(--text-cream);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
}

.tier-up-close {
  background: linear-gradient(135deg, var(--accent-fire), var(--accent-ember));
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: white;
  cursor: pointer;
  transition:
    transform var(--duration-fast),
    box-shadow var(--duration-fast);
}

.tier-up-close:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.4);
}

/* Game Over XP Display */
.game-over-xp {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  margin: var(--space-md) 0 var(--space-sm);
  text-shadow: 0 0 10px var(--accent-fire);
}

.game-over-tier {
  font-size: var(--text-sm);
  color: var(--text-cream);
  margin-bottom: var(--space-md);
}

.game-over-tier .tier-name {
  font-weight: var(--font-bold);
}

.game-over-tier .tier-progress {
  color: var(--text-muted);
  margin-left: var(--space-sm);
}

/* Engage Stats Bar */
.engage-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-charred);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-rust);
}

.engage-tier-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}

.engage-xp-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
}

.engage-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-fire), var(--accent-bright));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.engage-xp-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  min-width: 80px;
  text-align: right;
}

/* ============================================
   ASDF SHOP - COSMETIC SYSTEM
   ============================================ */

/* Shop tier colors */
.tier-common {
  color: #808080;
}
.tier-uncommon {
  color: #1eff00;
}
.tier-rare {
  color: #0070dd;
}
.tier-epic {
  color: #a855f7;
}
.tier-legendary {
  color: #ff8000;
}
.tier-mythic {
  color: #e6cc80;
}
.tier-divine {
  color: #00ccff;
}
.tier-cosmic {
  color: #ff00ff;
}
.tier-eternal {
  color: #ffffff;
  text-shadow: 0 0 5px white;
}
.tier-transcendent {
  color: #ff4500;
  text-shadow: 0 0 10px #ff4500;
}

/* Shop Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg);
}

/* Shop Item Card */
.shop-item {
  background: var(--bg-charred);
  border: 1px solid var(--border-rust);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.shop-item:hover {
  border-color: var(--accent-fire);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.2);
}

.shop-item.owned {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.shop-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.shop-item-preview {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.shop-item-preview img,
.shop-item-preview canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-item-name {
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2xs);
}

.shop-item-tier {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-sm);
}

.shop-item-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
}

.shop-item-price.discounted {
  color: var(--green);
}

.shop-item-price .original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.shop-item-owned {
  color: var(--green);
  font-weight: var(--font-bold);
}

/* Avatar Display */
.avatar-display {
  position: relative;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.avatar-canvas {
  display: block;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-5xl);
  color: var(--text-muted);
}

/* Avatar Editor */
.avatar-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
}

.avatar-editor-preview {
  display: flex;
  justify-content: center;
  padding: var(--space-lg);
  background: var(--bg-charred);
  border-radius: var(--radius-lg);
}

.avatar-editor-tabs {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.avatar-tab {
  background: var(--bg-charred);
  border: 1px solid var(--border-rust);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.avatar-tab:hover {
  border-color: var(--accent-fire);
  color: var(--text-cream);
}

.avatar-tab.active {
  background: var(--accent-fire);
  border-color: var(--accent-fire);
  color: white;
}

.avatar-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--space-md);
}

.avatar-item {
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.avatar-item:hover {
  border-color: var(--accent-fire);
}

.avatar-item.equipped {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.avatar-item.avatar-item-locked {
  opacity: 0.5;
}

.avatar-item-unequip {
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 12px;
}

.avatar-item-name {
  font-size: var(--text-2xs);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.avatar-item-price {
  font-size: var(--text-2xs);
  color: var(--accent-bright);
}

/* Layer Preview */
.layer-preview {
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer-preview canvas {
  display: block;
}

.layer-empty,
.layer-error {
  font-size: var(--text-xl);
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .xp-notification-container {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
  }

  .xp-notification {
    font-size: var(--text-sm);
    padding: var(--space-sm) var(--space-md);
  }

  .tier-up-modal {
    padding: var(--space-2xl) var(--space-lg);
    margin: var(--space-lg);
  }

  .tier-up-title {
    font-size: var(--text-xl);
  }

  .tier-up-progression {
    font-size: var(--text-lg);
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .avatar-editor-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   DAILY CHALLENGES SYSTEM
   ============================================ */

.challenges-widget {
  background: var(--bg-charred);
  border: 2px solid var(--border-rust);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.challenges-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-cream);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.challenge-icon {
  font-size: var(--text-xl);
}

.challenges-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.challenge-card {
  background: var(--bg-burnt);
  border: 1px solid var(--border-rust);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--duration-fast) ease;
}

.challenge-card:hover {
  border-color: var(--accent-fire);
}

.challenge-card.challenge-complete {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.challenge-name {
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  color: var(--text-cream);
}

.challenge-description {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.challenge-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.progress-bar-container {
  flex: 1;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-fire), var(--accent-bright));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.challenge-complete .progress-bar-fill {
  background: linear-gradient(90deg, var(--green), var(--green-light));
}

.progress-text {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  min-width: 60px;
  text-align: right;
}

.challenge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.challenge-reward {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.xp-icon {
  color: var(--gold);
}

.challenge-timer {
  font-size: var(--text-2xs);
  color: var(--text-muted);
}

.challenge-timer.timer-urgent {
  color: var(--red);
  animation: pulse 1s infinite;
}

.claim-reward-btn {
  margin-top: var(--space-md);
  width: 100%;
}

/* Challenge difficulty badges */
.badge {
  display: inline-block;
  padding: var(--space-2xs) var(--space-sm);
  font-size: var(--text-2xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  letter-spacing: var(--tracking-wide);
}

.badge-secondary {
  background: rgba(156, 163, 175, 0.2);
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid var(--green);
  color: var(--green);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--red);
  color: var(--red);
}

.badge-legendary {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(168, 85, 247, 0.3));
  border: 1px solid var(--gold);
  color: var(--gold);
  animation: legendaryPulse 2s infinite;
}

@keyframes legendaryPulse {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  }
}

/* Button variants */
.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  border-color: var(--gold);
  color: #000;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fcd34d, var(--gold));
  transform: translate(-2px, -2px);
}

/* ============================================
   ACHIEVEMENT NOTIFICATIONS
   ============================================ */

.achievement-notification-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: calc(var(--z-toast) + 2);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.achievement-notification {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-charred));
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow:
    0 4px 30px rgba(251, 191, 36, 0.4),
    0 0 20px rgba(251, 191, 36, 0.2);
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.achievement-notification.fade {
  transform: translateY(-50px);
  opacity: 0;
}

.achievement-icon {
  font-size: var(--text-4xl);
  filter: drop-shadow(0 0 10px var(--gold));
  animation: achievementBounce var(--duration-slower) ease infinite;
}

@keyframes achievementBounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.achievement-content {
  flex: 1;
}

.achievement-unlocked {
  font-size: var(--text-2xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--gold);
  margin-bottom: var(--space-2xs);
}

.achievement-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-cream);
  margin-bottom: var(--space-2xs);
}

.achievement-description {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.achievement-xp {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--gold);
}

/* Game Over Achievements Section */
.game-over-achievements {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  max-width: 300px;
}

.game-over-achievements-title {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--gold);
  margin-bottom: var(--space-md);
  text-align: center;
}

.game-over-achievement-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.game-over-achievement-item:last-child {
  margin-bottom: 0;
}

.game-over-achievement-icon {
  font-size: var(--text-xl);
}

.game-over-achievement-info {
  flex: 1;
}

.game-over-achievement-name {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-cream);
}

.game-over-achievement-xp {
  font-size: var(--text-2xs);
  color: var(--accent-bright);
}

/* ============================================
   STREAK DISPLAY
   ============================================ */

.streak-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.2), rgba(251, 146, 60, 0.1));
  border: 1px solid var(--accent-fire);
  border-radius: var(--radius-md);
}

.streak-icon {
  font-size: var(--text-xl);
}

.streak-count {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--accent-bright);
}

.streak-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.streak-bonus {
  font-size: var(--text-2xs);
  color: var(--green);
  font-weight: var(--font-semibold);
}

/* ============================================
   COMBO NOTIFICATION
   ============================================ */

.combo-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: calc(var(--z-max) - 1);
  pointer-events: none;
}

/* ============================================
   RESPONSIVE CHALLENGES
   ============================================ */

@media (max-width: 768px) {
  .challenges-widget {
    padding: var(--space-md);
  }

  .challenge-card {
    padding: var(--space-md);
  }

  .challenge-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .achievement-notification-container {
    left: var(--space-sm);
    right: var(--space-sm);
    transform: none;
  }

  .achievement-notification {
    padding: var(--space-md) var(--space-md);
    flex-wrap: wrap;
  }

  .achievement-icon {
    font-size: var(--text-3xl);
  }

  .achievement-name {
    font-size: var(--text-base);
  }

  .game-over-achievements {
    max-width: 100%;
  }
}
