:root {
  color-scheme: dark;
  --bg-color: #0a0c10;
  --card-bg: #121620;
  --card-border: #1e2535;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --sidebar-w: 320px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  touch-action: manipulation;
  user-select: none;
}

/* Canvas Confetti */
#confetti-canvas {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* App Header */
.header {
  border-bottom: 1px solid var(--card-border);
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.brand-icon {
  font-size: 1.8rem;
  animation: pulse-slow 3s infinite ease-in-out;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #fff;
  background: var(--card-bg);
  border-color: var(--card-border);
}

.sponsor-nav-btn {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
}

.sponsor-nav-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  color: #fff;
}

.stats-pills {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.dot-cyan {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.btn-icon {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

/* ========================================= */
/* 1. ARCADE HUB STYLES (COMPACT SANS SCROLL) */
/* ========================================= */
.hub-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.hub-hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hub-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
}

.hub-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 720px;
}

.hub-stats-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 760px;
  margin-top: 0.25rem;
  align-items: stretch;
}

.hub-stat-card {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hub-stat-card .val {
  font-size: 1.45rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.1;
}

.hub-stat-card .lbl {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.hub-stat-sponsor-cta {
  flex: 1.3;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hub-stat-sponsor-cta:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

.hub-stat-sponsor-cta .cta-icon {
  font-size: 1.4rem;
}

.hub-stat-sponsor-cta .cta-text {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.hub-stat-sponsor-cta .cta-text strong {
  font-size: 0.82rem;
  color: #fff;
}

.hub-stat-sponsor-cta .cta-text small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.hub-stat-sponsor-cta .cta-arrow {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

/* Arcade Grid Section (The only scrollable section on Hub) */
.arcade-grid-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-header .sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 0.65rem;
  padding: 6px 6px 2.5rem 6px;
  align-content: start;
  grid-auto-rows: max-content;
}

.game-card {
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.96) 0%, rgba(11, 14, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: radial-gradient(circle at 50% 0%, var(--card-glow, rgba(245, 158, 11, 0.18)) 0%, transparent 75%);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.game-card:hover {
  border-color: var(--card-accent, #f59e0b);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 22px var(--card-glow, rgba(245, 158, 11, 0.28));
}

.game-card:hover::before {
  opacity: 1;
}

/* Card Header with Artwork Showcase */
.game-card-art-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0 0.5rem;
}

.game-card-badges {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  z-index: 2;
}

.game-card-round {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  letter-spacing: 0.04em;
}

.game-card-online {
  font-size: 0.72rem;
  color: var(--accent-green);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.game-card-emblem-wrap {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card:hover .game-card-emblem-wrap {
  transform: scale(1.1) rotate(2deg);
}

.game-card-emblem-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px var(--card-glow, rgba(245, 158, 11, 0.35)));
}

.game-card-custom-emblem {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-custom-emblem svg {
  width: 100%;
  height: 100%;
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px var(--card-glow, rgba(245, 158, 11, 0.35)));
}

.game-card-emblem-emoji {
  font-size: 2.8rem;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

/* Card Body */
.game-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 2;
}

.game-card-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.game-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Redesigned Cash Prize Banner (ZERO OVERFLOW) */
.card-prize-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.game-card:hover .card-prize-banner {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 182, 212, 0.12) 100%);
}

.prize-pill-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.prize-gift-icon {
  font-size: 1.25rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.prize-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prize-mini-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #6ee7b7;
  text-transform: uppercase;
}

.card-prize-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #10b981;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.prize-guarantee-pill {
  font-size: 0.66rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Damage Progress Section */
.card-damage-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

.card-damage-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.card-damage-val {
  color: var(--card-accent, #f59e0b);
  font-weight: 900;
}

.card-damage-section .damage-track {
  width: 100%;
  height: 7px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.card-damage-section .damage-bar {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--card-accent, #f59e0b) 0%, #10b981 100%);
  box-shadow: 0 0 10px var(--card-glow, rgba(245, 158, 11, 0.5));
  transition: width 0.3s ease;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Card Footer */
.game-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
  z-index: 2;
}

.game-card-taps-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.game-card-counter {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
}

.game-card-speed {
  font-size: 0.72rem;
  color: var(--accent-gold);
  font-weight: 800;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.game-card-play-btn {
  background: linear-gradient(135deg, var(--card-accent, #f59e0b) 0%, #d97706 100%);
  color: #000;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.game-card:hover .game-card-play-btn {
  filter: brightness(1.15);
  box-shadow: 0 4px 18px var(--card-glow, rgba(245, 158, 11, 0.4));
}

/* Live Hub SSE Styles & Animations */
.live-badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-dot 1.8s infinite ease-in-out;
  margin-right: 5px;
  vertical-align: middle;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes live-card-flash {
  0% { border-color: rgba(245, 158, 11, 0.8); box-shadow: 0 0 20px rgba(245, 158, 11, 0.35); }
  100% { border-color: var(--card-border); box-shadow: none; }
}

.game-card.card-live-tap {
  animation: live-card-flash 0.4s ease-out;
}

.game-card-speed {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 700;
  margin-left: 2px;
}

.game-card-round.status-broken {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-weight: 900;
  animation: pulse-broken 1.5s infinite ease-in-out;
}

@keyframes pulse-broken {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Hub Sponsor CTA */
.hub-sponsor-cta {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 16px;
  padding: 1.5rem 2rem;
}

.sponsor-cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.sponsor-cta-content .icon {
  font-size: 2.5rem;
}

.sponsor-cta-content .text h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.sponsor-cta-content .text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ========================================= */
/* 2. LIVE GAME VIEW STYLES (COMPACT SANS SCROLL) */
/* ========================================= */
.main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex: 1;
  padding: 0.75rem 1.25rem;
  gap: 1.25rem;
  min-height: 0;
}

.game-column {
  flex: 1.2;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  gap: 0.5rem;
  background: rgba(18, 22, 32, 0.55);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
}

/* Compact Arena Header */
.game-arena-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.game-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-back-hub-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-hub-mini:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.title-and-round {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-title-compact {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.game-round-pill {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.game-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prize-badge-compact {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.btn-sponsor-compact {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  border: none;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-sponsor-compact:hover {
  transform: translateY(-1px);
}

/* Dynamic Interactive Relic Stage */
.egg-stage {
  position: relative;
  width: 270px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  flex-shrink: 0;
  margin: 0.5rem auto;
  transition: width 0.25s ease, height 0.25s ease;
}

/* 3D Realtime WebGL Canvas - Expansive framing & seamless background blend */
.egg-stage.has-three-3d,
.egg-stage:has(.three-monster-viewport) {
  width: 100%;
  max-width: 580px;
  height: clamp(340px, 46vh, 440px);
  margin: 0.25rem auto;
}

.egg-stage.has-three-3d .egg-container,
.egg-stage:has(.three-monster-viewport) .egg-container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.egg-stage.has-three-3d #relic-visual-slot,
.egg-stage:has(.three-monster-viewport) #relic-visual-slot {
  width: 100%;
  height: 100%;
}

/* Hide 2D CSS decorations when 3D WebGL engine is active for seamless blend */
.egg-stage.has-three-3d .relic-pedestal,
.egg-stage:has(.three-monster-viewport) .relic-pedestal,
.egg-stage.has-three-3d .egg-glow,
.egg-stage:has(.three-monster-viewport) .egg-glow {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.egg-stage.has-three-3d .three-monster-viewport,
.egg-stage:has(.three-monster-viewport) .three-monster-viewport {
  width: 100%;
  height: 100%;
  background: transparent !important;
}

.egg-stage.has-three-3d canvas,
.egg-stage:has(.three-monster-viewport) canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: transparent !important;
}

/* Multi-Tab Lock Overlay */
.multitab-overlay {
  position: absolute;
  inset: -12px;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s ease-out;
}

.multitab-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 250px;
}

.multitab-icon {
  font-size: 2.2rem;
  animation: pulse-warn 1.5s infinite;
}

.multitab-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: 0.04em;
  margin: 0;
}

.multitab-desc {
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.35;
  margin: 0;
}

.btn-takeover {
  margin-top: 0.35rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-size: 0.78rem;
  font-weight: 900;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-takeover:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* Anti-Autoclicker / Overheat Cooldown Badge */
.cooldown-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  border: 1px solid rgba(254, 202, 202, 0.4);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.55);
  backdrop-filter: blur(6px);
  padding: 0.32rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 60;
  pointer-events: none;
  white-space: nowrap;
  animation: bounceIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulse-warn {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8)); }
}

@keyframes bounceIn {
  0% { transform: translate(-50%, -10px) scale(0.85); opacity: 0; }
  100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

.relic-pedestal {
  position: absolute;
  bottom: 12px;
  width: 210px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.4) 0%, rgba(245, 158, 11, 0.12) 50%, transparent 75%);
  border-bottom: 2px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 20px var(--accent-gold-glow);
  pointer-events: none;
  animation: pedestal-pulse 3s infinite ease-in-out;
}

@keyframes pedestal-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.egg-glow {
  position: absolute;
  width: 260px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-gold-glow) 0%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
  transition: transform 0.1s ease, background 0.3s ease;
}

.egg-container {
  position: relative;
  width: 250px;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Click animations live in animations.css */

/* Generic / Fallback Squish */
.egg-container.squish,
.test-monster-target.squish {
  animation: anim-squish-kf 0.28s cubic-bezier(0.25, 1.6, 0.5, 1);
}

.egg-container.shake {
  animation: egg-shake 0.35s ease-in-out;
}

/* Dynamic Click Shockwave & Particle Bursts */
.shockwave-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0.95;
  animation: shockwave-expand 0.55s ease-out forwards;
  z-index: 20;
}

@keyframes shockwave-expand {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

.click-particle {
  position: absolute;
  pointer-events: none;
  font-size: 1.1rem;
  z-index: 55;
  animation: particle-fly 0.65s ease-out forwards;
  user-select: none;
}

@keyframes particle-fly {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.3) rotate(var(--rot)); opacity: 0; }
}

/* Relic Visual Slot */
#relic-visual-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.relic-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
}

.custom-relic-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-relic-container > svg:not(.relic-crack-overlay) {
  width: 100%;
  height: 100%;
  max-width: 260px;
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.8));
}

.custom-relic-container > svg.svg-3d-viewport,
.custom-relic-container > svg#viewport3D {
  max-width: 360px;
  max-height: 360px;
  overflow: visible;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.custom-relic-container > svg.svg-3d-viewport:active,
.custom-relic-container > svg#viewport3D:active {
  cursor: grabbing;
}

@keyframes holo-spin {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 200; }
}

@keyframes holo-spin-reverse {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -200; }
}

.holo-spin {
  animation: holo-spin 12s linear infinite;
}

.holo-spin-reverse {
  animation: holo-spin-reverse 8s linear infinite;
}

/* Floating Click Popups */
.click-popup {
  position: absolute;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px var(--accent-gold);
  pointer-events: none;
  animation: float-fade 0.8s forwards ease-out;
  z-index: 50;
}

/* Compact Click Counter */
.counter-box-compact {
  text-align: center;
  flex-shrink: 0;
}

.counter-box-compact .counter-value {
  font-size: 2.1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}

.counter-sub-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.counter-box-compact .counter-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.tap-speed-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

/* Compact Damage Progress Bar */
.damage-meter-compact {
  width: 100%;
  flex-shrink: 0;
}

.damage-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.damage-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.damage-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 60%, #ef4444 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Sleek 1-line Ticker */
.compact-ticker {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
  flex-shrink: 0;
}

.ticker-label {
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ticker-msg {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Broken Status Banner */
.broken-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  display: none;
  width: 100%;
}

.broken-banner.active {
  display: block;
}

/* ========================================= */
/* 3. RIGHT SIDEBAR: 2 ADS MAX & LIVE CHAT   */
/* ========================================= */
.game-sidebar {
  width: 390px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
}

/* Exactly 2 Ads Maximum */
.game-ads-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
}

.sidebar-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ad-badge-compact {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ad-badge-compact.badge-sponsor {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.35);
}

.ad-sessions-badge {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.ads-two-slots {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Ad slot: solid, readable card with a subtle accent edge and a corner label */
.ad-slot-item {
  position: relative;
  width: 100%;
  min-height: 118px;
  max-height: 132px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 55%),
    rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.75rem 0.6rem;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ad-slot-item::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.75), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.ad-slot-item::after {
  content: 'SPONSORED';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #64748b;
  pointer-events: none;
  line-height: 1;
}

/* Third-party iframe creatives: let the creative use the whole card */
.ad-slot-item:has(> iframe) {
  padding: 0.3rem;
}

.ad-slot-item:has(> iframe)::after {
  display: none;
}

.ad-slot-item:hover {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 20px rgba(6, 182, 212, 0.14);
  transform: translateY(-1px);
}

.ad-slot-item iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: 116px !important;
  border: 0 !important;
  border-radius: 6px;
  background: transparent;
}

/* Fallback "slot available" banner */
.promo-mini-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 100%;
}

.promo-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
}

.promo-tag.partner {
  background: rgba(6, 182, 212, 0.14);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.promo-mini-banner h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}

.promo-mini-banner p {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin: 0;
}

.mini-sponsor-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 0.32rem 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  margin-top: 0.2rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

.mini-sponsor-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.mini-sponsor-btn.btn-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.3);
}

/* Sponsor & Partner Banner within Ad Slots (server-rendered markup) */
.promo-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  gap: 0.22rem;
  padding: 0.1rem 0.2rem 0;
  overflow: hidden;
  box-sizing: border-box;
}

.promo-banner .promo-icon {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(6, 182, 212, 0.35));
}

.promo-banner .promo-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: 0.01em;
}

.promo-banner .promo-desc {
  font-size: 0.74rem;
  color: #a5b4c8;
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.promo-banner .promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%) !important;
  color: #fff !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.32rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.22rem;
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.promo-banner .promo-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.ad-footer-note-compact {
  font-size: 0.66rem;
  color: #7c8aa5;
  text-align: center;
  letter-spacing: 0.01em;
}

/* Short desktop viewports: keep the chat usable */
@media (min-width: 1024px) and (max-height: 780px) {
  .ad-slot-item {
    min-height: 104px;
    max-height: 112px;
  }

  .ad-slot-item iframe {
    max-height: 98px !important;
  }

  .promo-banner .promo-desc {
    -webkit-line-clamp: 1;
  }
}

/* Ephemeral Game Chat Panel (Max 20 Messages) */
.game-chat-panel {
  flex: 1;
  min-height: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-tab-header {
  display: flex;
  border-bottom: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.chat-tab-btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.chat-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.chat-tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.05);
}

.chat-count-pill {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  color: #94a3b8;
}

.chat-body-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-messages-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-msg {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  animation: fade-in 0.2s ease;
}

.chat-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
}

.chat-msg-author {
  font-weight: 800;
  color: var(--accent-cyan);
}

.chat-msg-time {
  color: #64748b;
  font-size: 0.65rem;
}

.chat-msg-text {
  font-size: 0.8rem;
  color: #e2e8f0;
  word-break: break-word;
  line-height: 1.3;
}

/* Operator messages posted from the admin console */
.chat-msg.chat-msg-admin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.05));
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: inset 3px 0 0 var(--accent-gold);
}

.chat-msg-admin .chat-msg-text {
  color: #fff7e6;
  font-weight: 600;
}

.chat-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--accent-gold);
  color: #1a1200;
  font-weight: 900;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 0.08rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.chat-empty-hint {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
  padding: 1rem;
}

.chat-input-row {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-top: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.chat-author-field {
  width: 85px;
  flex-shrink: 0;
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  outline: none;
}

.chat-author-field:focus {
  border-color: var(--accent-cyan);
}

.chat-text-field {
  flex: 1;
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #fff;
  font-size: 0.78rem;
  outline: none;
}

.chat-text-field:focus {
  border-color: var(--accent-gold);
}

.chat-send-btn {
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: 6px;
  width: 34px;
  height: 32px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

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

.hof-body-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem;
}

.hof-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hof-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hof-winner-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
}

.hof-winner-msg {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-style: italic;
}

.hof-round {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
}

/* ========================================= */
/* 3.3 LIVE ROUND LEADERBOARD (TOP TAPS)     */
/* ========================================= */
.leaderboard-body-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.leaderboard-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
  gap: 0.5rem;
}

.user-handle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #e0f2fe;
  max-width: 70%;
}

.user-avatar {
  font-size: 0.95rem;
  line-height: 1;
}

.user-name {
  font-weight: 700;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-tag {
  font-size: 0.62rem;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.leaderboard-round-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.leaderboard-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.leaderboard-empty-hint {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
  padding: 1.2rem;
}

.leaderboard-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.leaderboard-row.is-current-user {
  background: rgba(14, 165, 233, 0.09);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.12);
}

.leaderboard-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.leaderboard-rank {
  font-weight: 900;
  font-size: 0.8rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  flex-shrink: 0;
}

.leaderboard-rank.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.leaderboard-rank.rank-2 {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #000;
}

.leaderboard-rank.rank-3 {
  background: linear-gradient(135deg, #b45309, #78350f);
  color: #fff;
}

.leaderboard-avatar {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.leaderboard-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.leaderboard-handle-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.leaderboard-handle {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-row.is-current-user .leaderboard-handle {
  color: #38bdf8;
}

.leaderboard-you-badge {
  font-size: 0.6rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.2);
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.leaderboard-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 0.15rem;
}

.leaderboard-taps-count {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.leaderboard-pct-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.leaderboard-pct-bar {
  width: 44px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.leaderboard-pct-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
  border-radius: 2px;
}

.leaderboard-pct-text {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

/* ========================================= */
/* 4. MODALS (Winner & Sponsor Booking)       */
/* ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #141824;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 50px var(--accent-gold-glow);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 90vh;
  overflow-y: auto;
}

.sponsor-modal-box {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 50px var(--accent-cyan-glow);
  max-width: 520px;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.4rem;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

/* Winner claim modal: locked until the claim is recorded */
.modal-overlay.locked .modal-close-btn {
  display: none;
}

.modal-lock-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.modal-overlay:not(.locked) .modal-lock-hint {
  display: none;
}

.modal-box.modal-shake {
  animation: modal-refuse-kf 0.4s ease;
}

@keyframes modal-refuse-kf {
  0%, 100% { transform: scale(1) translateX(0); }
  20% { transform: scale(1.015) translateX(-8px); }
  40% { transform: scale(1.015) translateX(8px); }
  60% { transform: scale(1.01) translateX(-5px); }
  80% { transform: scale(1.005) translateX(4px); }
}

.modal-header {
  text-align: center;
}

.modal-badge {
  display: inline-block;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.form-input, .form-textarea {
  background: #0b0e14;
  border: 1px solid #2d3748;
  color: #fff;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

#claim-form, #sponsor-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

#sponsor-form {
  gap: 0.6rem;
}

.sponsor-modal-box .form-input:focus {
  border-color: var(--accent-cyan);
}

.form-textarea {
  min-height: 70px;
  resize: vertical;
}

.token-badge {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  word-break: break-all;
  letter-spacing: 0.02em;
}

.token-badge::before {
  content: '🔐 ';
}

.token-badge.token-missing {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.token-badge.token-missing::before {
  content: '⚠ ';
}

/* Real-time Slot Availability & Advance Booking Alert */
.slot-availability-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.45rem;
  transition: all 0.25s ease;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.slot-availability-alert.available {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.slot-availability-alert.available .slot-avail-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.slot-availability-alert.full {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.slot-availability-alert.full .slot-avail-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.slot-avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.slot-avail-text {
  line-height: 1.35;
  flex: 1;
}

.package-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  width: 100%;
  margin: 0.35rem 0 0.2rem;
}

.package-card {
  position: relative;
  background: linear-gradient(180deg, #131926 0%, #0c101a 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  overflow: visible;
}

.package-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.package-card input {
  display: none;
}

/* Checked / Selected State */
.package-card:has(input:checked) {
  border-color: var(--accent-cyan);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.18) 0%, rgba(12, 16, 26, 0.95) 100%);
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.35), inset 0 0 12px rgba(6, 182, 212, 0.12);
  transform: translateY(-2px);
}

.package-card:has(input:checked) .pkg-select-tag {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 900;
  border-color: var(--accent-cyan);
}

.package-card:has(input:checked) .pkg-select-tag::before {
  content: '✓ ';
}

.pkg-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
}

/* Floating top badges */
.pkg-badge-popular {
  position: absolute;
  top: -9px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-size: 0.58rem;
  font-weight: 900;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.pkg-badge-vip {
  position: absolute;
  top: -9px;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.pkg-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pkg-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.pkg-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pkg-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 1;
  margin: 0.1rem 0;
}

.pkg-amount {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.pkg-currency {
  font-size: 0.9rem;
  font-weight: 800;
  color: #10b981;
  margin-left: 0.15rem;
}

.pkg-sessions {
  font-size: 0.78rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
}

.pkg-sessions small {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 500;
  display: block;
}

.pkg-cpm {
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 600;
}

.pkg-cpm.saving {
  color: #10b981;
  font-weight: 700;
}

.pkg-select-tag {
  margin-top: 0.25rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.btn-submit {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-size: 0.95rem;
  font-weight: 900;
  padding: 0.85rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px var(--accent-gold-glow);
  transition: all 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px var(--accent-gold-glow);
}

.btn-submit:disabled {
  cursor: progress;
  opacity: 0.65;
  filter: saturate(0.6);
  box-shadow: none;
}

.modal-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  width: 100%;
}

.btn-cancel {
  background: none;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: #64748b;
}

/* Animations */
@keyframes float-fade {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-90px) scale(1.3); }
}

@keyframes egg-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-5deg) scale(0.96); }
  40% { transform: rotate(5deg) scale(0.96); }
  60% { transform: rotate(-3deg) scale(0.98); }
  80% { transform: rotate(3deg) scale(0.98); }
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.85; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom sleek dark scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: #2d3748;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4a5568;
}

.footer {
  border-top: 1px solid var(--card-border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* ========================================= */
/* DESKTOP NO-SCROLL GUARANTEE (>= 1024px)   */
/* (Only Games list in Hub & Chat in arena scroll) */
/* ========================================= */
@media (min-width: 1024px) {
  html, body {
    height: 100vh;
    overflow: hidden;
  }

  .header {
    height: 54px;
    flex-shrink: 0;
    padding: 0.45rem 1.5rem;
  }

  .hub-wrapper {
    height: calc(100vh - 54px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .arcade-grid {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    margin-top: 0.5rem;
    padding: 8px 10px 3rem 8px;
    align-content: start;
    grid-auto-rows: max-content;
  }

  .game-card {
    min-height: max-content;
  }

  .main-wrapper {
    height: calc(100vh - 54px);
    overflow: hidden;
    display: flex;
    flex-direction: row;
  }

  .game-column {
    height: 100%;
    overflow: hidden;
  }

  .game-sidebar {
    height: 100%;
    overflow: hidden;
  }

  .chat-messages-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }

  .footer {
    display: none;
  }
}

/* ========================================= */
/* MOBILE & TABLET RESPONSIVE (< 1024px)     */
/* ========================================= */
@media (max-width: 1023px) {
  * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body {
    min-height: 100vh;
    overflow-y: auto;
    -webkit-tap-highlight-color: transparent;
  }

  /* --- Top Header Navigation (Mobile) --- */
  .header {
    height: auto;
    padding: 0.5rem 0.85rem;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
  }

  .brand {
    gap: 0.45rem;
  }

  .brand-icon {
    font-size: 1.45rem;
  }

  .brand-name {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
  }

  .stats-pills {
    gap: 0.35rem;
  }

  .pill {
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    gap: 0.3rem;
  }

  /* Hide the clk/s pill on mobile header to preserve horizontal space */
  .pill:nth-child(2) {
    display: none;
  }

  .btn-icon {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
  }

  /* Segmented Navigation bar on mobile */
  .nav-links {
    width: 100%;
    display: flex;
    gap: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-btn {
    flex: 1;
    padding: 0.35rem 0.45rem;
    font-size: 0.74rem;
    text-align: center;
    white-space: nowrap;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .sponsor-nav-btn {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.25);
    color: var(--accent-cyan);
  }

  /* --- 1. Meta Arcade Hub (Mobile) --- */
  .hub-wrapper {
    height: auto;
    overflow: visible;
    padding: 0.75rem 0.85rem;
    gap: 0.85rem;
  }

  .hub-hero {
    gap: 0.4rem;
    padding: 0.25rem 0;
  }

  .hub-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.6rem;
    letter-spacing: 0.1em;
  }

  .hub-title {
    font-size: 1.35rem;
    line-height: 1.25;
    text-align: center;
    padding: 0 0.25rem;
  }

  .hub-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    padding: 0 0.5rem;
  }

  /* 2x2 Clean Balanced Stats Grid on Mobile */
  .hub-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
  }

  .hub-stat-card {
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
  }

  .hub-stat-card .val {
    font-size: 1.3rem;
  }

  .hub-stat-card .lbl {
    font-size: 0.62rem;
  }

  .hub-stat-sponsor-cta {
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    gap: 0.45rem;
  }

  .hub-stat-sponsor-cta .cta-icon {
    font-size: 1.15rem;
  }

  .hub-stat-sponsor-cta .cta-text strong {
    font-size: 0.78rem;
  }

  .hub-stat-sponsor-cta .cta-text small {
    font-size: 0.65rem;
  }

  .hub-stat-sponsor-cta .cta-arrow {
    display: none;
  }

  .section-header h2 {
    font-size: 1.1rem;
  }

  .section-header .sub {
    font-size: 0.74rem;
  }

  .arcade-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    overflow: visible;
  }

  .game-card {
    padding: 1rem;
    gap: 0.75rem;
    border-radius: 16px;
  }

  .game-card-title {
    font-size: 1.05rem;
  }

  .game-card-desc {
    font-size: 0.76rem;
  }

  .card-prize-banner {
    padding: 0.5rem 0.7rem;
  }

  .card-prize-val {
    font-size: 0.98rem;
  }

  .game-card-counter {
    font-size: 0.95rem;
  }

  .game-card-play-btn {
    font-size: 0.82rem;
    padding: 0.6rem;
    border-radius: 8px;
  }

  /* --- 2. Game Arena View (Mobile) --- */
  .main-wrapper {
    height: auto;
    overflow: visible;
    flex-direction: column;
    padding: 0.6rem 0.65rem;
    gap: 0.75rem;
  }

  .game-column {
    height: auto;
    overflow: visible;
    padding: 0.75rem;
    gap: 0.65rem;
    border-radius: 12px;
  }

  /* Dedicated 2-Row Clean Arena Header on Mobile */
  .game-arena-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .game-title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }

  .btn-back-hub-mini {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
  }

  .title-and-round {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .game-title-compact {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .game-round-pill {
    font-size: 0.65rem;
    padding: 0.12rem 0.45rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .game-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.45rem;
  }

  .prize-badge-compact {
    flex: 1;
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-sponsor-compact {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }

  /* Damage Meter on Mobile */
  .damage-meter-compact {
    width: 100%;
  }

  .damage-labels {
    font-size: 0.68rem;
    margin-bottom: 0.2rem;
  }

  .damage-track {
    height: 7px;
  }

  /* Dynamic Relic Stage on Mobile */
  .egg-stage {
    width: 240px;
    height: 255px;
    margin: 0.2rem auto;
  }

  .egg-glow {
    width: 220px;
    height: 230px;
  }

  .egg-container {
    width: 220px;
    height: 240px;
  }

  .relic-pedestal {
    width: 180px;
    height: 24px;
    bottom: 6px;
  }

  /* Click Counter & Speed on Mobile */
  .counter-box-compact .counter-value {
    font-size: 1.9rem;
    line-height: 1.1;
  }

  .counter-sub-row {
    margin-top: 0.2rem;
    gap: 0.45rem;
  }

  .counter-box-compact .counter-label {
    font-size: 0.62rem;
  }

  .tap-speed-pill {
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
  }

  /* 1-Line Ticker on Mobile */
  .compact-ticker {
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
  }

  /* --- 3. Sidebar (2 Ads & Live Chat) on Mobile --- */
  .game-sidebar {
    width: 100%;
    height: auto;
    overflow: visible;
    gap: 0.65rem;
  }

  /* 2 Ads side-by-side on mobile to save vertical space */
  .game-ads-box {
    padding: 0.5rem;
    border-radius: 10px;
    gap: 0.35rem;
  }

  .sidebar-header-compact {
    font-size: 0.68rem;
  }

  .ads-two-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    overflow: hidden;
  }

  .ad-slot-item {
    min-height: 104px;
    max-height: 104px;
    height: 104px;
    padding: 0.55rem 0.5rem 0.45rem;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ad-slot-item::after {
    font-size: 0.48rem;
    top: 5px;
    right: 6px;
  }

  .ad-slot-item iframe {
    width: 100% !important;
    height: 92px !important;
    max-height: 92px !important;
    border: none !important;
    overflow: hidden !important;
  }

  /* Sponsor promo banner on mobile: icon + title + CTA, description hidden */
  .promo-banner {
    gap: 0.2rem;
    padding: 0;
    height: 100%;
    justify-content: center;
  }

  .promo-banner .promo-icon {
    font-size: 1.2rem;
  }

  .promo-banner .promo-title {
    font-size: 0.8rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .promo-banner .promo-desc {
    display: none !important;
  }

  .promo-banner .promo-btn {
    font-size: 0.66rem;
    padding: 0.26rem 0.6rem;
    margin-top: 0.1rem;
  }

  /* Mini banner on mobile */
  .promo-mini-banner {
    gap: 0.2rem;
  }

  .promo-mini-banner h4 {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .promo-mini-banner p {
    display: none !important;
  }

  .mini-sponsor-btn {
    font-size: 0.66rem;
    padding: 0.26rem 0.6rem;
    margin-top: 0.1rem;
  }

  .ad-footer-note-compact {
    font-size: 0.6rem;
  }

  /* Live Chat Panel on Mobile */
  .game-chat-panel {
    height: 350px;
    border-radius: 10px;
  }

  .chat-tab-btn {
    padding: 0.45rem 0.35rem;
    font-size: 0.72rem;
    gap: 0.2rem;
    white-space: nowrap;
  }

  .chat-messages-list {
    padding: 0.5rem;
    gap: 0.35rem;
  }

  .chat-msg {
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
  }

  .chat-msg-header {
    font-size: 0.68rem;
  }

  .chat-msg-author {
    font-size: 0.7rem;
  }

  .chat-msg-time {
    font-size: 0.62rem;
  }

  .chat-msg-text {
    font-size: 0.78rem;
  }

  .chat-input-row {
    padding: 0.4rem 0.5rem;
    gap: 0.3rem;
  }

  .chat-author-field {
    width: 75px;
    font-size: 0.72rem;
    padding: 0.35rem 0.45rem;
  }

  .chat-text-field {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }

  .chat-send-btn {
    width: 32px;
    height: 30px;
    font-size: 0.85rem;
  }

  /* --- 4. Modals on Mobile --- */
  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-box {
    padding: 1.25rem 1rem;
    max-width: 100%;
    border-radius: 12px;
    gap: 1rem;
  }

  .modal-title {
    font-size: 1.35rem;
  }

  .modal-subtitle {
    font-size: 0.78rem;
  }

  .package-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin: 0.35rem 0 0.15rem;
  }

  .package-card {
    padding: 0.65rem 0.25rem 0.45rem;
    border-radius: 10px;
  }

  .pkg-badge-popular, .pkg-badge-vip {
    font-size: 0.5rem;
    padding: 0.06rem 0.35rem;
    top: -8px;
  }

  .pkg-icon {
    font-size: 0.85rem;
  }

  .pkg-name {
    font-size: 0.66rem;
  }

  .pkg-amount {
    font-size: 1.15rem;
  }

  .pkg-currency {
    font-size: 0.75rem;
  }

  .pkg-sessions {
    font-size: 0.66rem;
  }

  .pkg-sessions small {
    font-size: 0.55rem;
  }

  .pkg-cpm {
    font-size: 0.54rem;
  }

  .pkg-select-tag {
    font-size: 0.55rem;
    padding: 0.08rem 0.35rem;
    margin-top: 0.15rem;
  }

  .btn-submit {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
}

/* Extra Tweaks for Ultra-Compact Mobile (< 380px) */
@media (max-width: 380px) {
  .brand-name {
    font-size: 0.9rem;
  }

  .game-title-compact {
    font-size: 0.98rem;
  }

  .egg-stage {
    width: 215px;
    height: 230px;
  }

  .ads-two-slots {
    grid-template-columns: 1fr;
  }
}

/* ========================================= */
/* 5. PAYMENT FLOW & WEBHOOK STYLES          */
/* ========================================= */
.payment-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.25rem 0;
  text-align: left;
  font-size: 0.9rem;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
  margin-bottom: 0.5rem;
}

.pay-row .pay-key {
  color: #94a3b8;
  white-space: nowrap;
}

.pay-order-id {
  font-family: monospace;
  color: #f8fafc;
  font-size: 0.82rem;
  word-break: break-all;
  text-align: right;
  margin-left: auto;
}

.pay-row-status {
  margin-bottom: 0;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(245, 158, 11, 0.3);
}

#btn-submit-sponsor {
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .payment-card {
    padding: 1rem 0.85rem;
    font-size: 0.85rem;
  }

  .pay-order-id {
    font-size: 0.74rem;
  }

  .modal-form-actions .btn-submit {
    flex: 1 1 auto;
    padding: 0.75rem 1rem !important;
    font-size: 0.82rem;
  }
}

.pay-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pay-status-pill.paid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse-glow 1.4s infinite ease-in-out;
}

.pay-status-pill.paid .pulse-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: none;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Anti-cheat v2: claim deadline countdown + manual review note in the winner modal */
.claim-countdown {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.02em;
  min-height: 1.1em;
}
.claim-countdown.urgent { color: #f87171; animation: claim-urgent-kf 1s ease-in-out infinite; }
@keyframes claim-urgent-kf { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.modal-review-note {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}
.modal-review-note a { color: #38bdf8; text-decoration: underline dotted; }
.btn-rules-compact { text-decoration: none; display: inline-flex; align-items: center; background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.45); color: #fbbf24; }
.btn-rules-compact:hover { background: rgba(245,158,11,0.22); }
