/* ═══════════════════════════════════════════
   VIRTUALS CARD GAME — v4
   Loading overlay added
   ═══════════════════════════════════════════ */

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
}

.loading-content {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

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

:root {
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg: #000000;
  --surface: #0d1117;
  --card-bg: #151b28;
  --border: #1e2736;
  --border-light: #2a3548;

  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-faint: #484f58;

  /* Tier palette */
  --common-border: #3b4a63;
  --common-bg: #151b28;
  --common-header: #1c2333;
  --common-badge: #3b4a63;

  --epic-border: #9333ea;
  --epic-bg: #1a0a2e;
  --epic-header: #2d1065;
  --epic-glow: rgba(147, 51, 234, 0.5);
  --epic-badge: #7c3aed;

  --rare-border: #d97706;
  --rare-bg: #2a1a00;
  --rare-header: #422006;
  --rare-glow: rgba(217, 119, 6, 0.5);
  --rare-badge: #d97706;

  --prismatic-pink: #ec4899;
  --prismatic-cyan: #06b6d4;
  --prismatic-bg: #0f0720;
  --prismatic-header: #1a0a2e;
  --prismatic-glow: rgba(236, 72, 153, 0.4);
  --prismatic-badge-bg: linear-gradient(90deg, #ec4899, #8b5cf6, #06b6d4);

  --radius: 12px;
  --radius-sm: 6px;
  --card-width: 340px;
  --card-height: 520px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

.view { display: none; }
.view.active { display: flex; justify-content: center; width: 100%; }

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo { font-size: 22px; }

.header-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.header-badge {
  font-size: 10px;
  font-weight: 700;
  background: #3b82f6;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.header-nav {
  display: flex;
  gap: 6px;
}

.nav-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-pill.active {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.nav-pill.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-pill:not(.disabled):hover {
  color: var(--text);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Wallet Connect Button */
.btn-connect-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-connect-wallet:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.wallet-icon { font-size: 14px; }

/* Wallet Connected State */
.wallet-connected {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.wallet-chain-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.wallet-address {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text);
}

.wallet-balance {
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  font-family: var(--font-mono);
}

.btn-disconnect {
  font-size: 12px;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color 0.2s;
}

.btn-disconnect:hover { color: #f87171; }

/* ═══════════════════════════════════════════
   SHOP VIEW — Booster pack design
   ═══════════════════════════════════════════ */
.shop-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 50px);
  padding: 40px 20px;
  gap: 16px;
}

.booster-pack {
  width: 220px;
  position: relative;
  margin-bottom: 8px;
}

.booster-top-edge {
  height: 20px;
  background: #7c3aed;
  border-radius: 12px 12px 0 0;
  position: relative;
  overflow: hidden;
}

.booster-top-edge::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: radial-gradient(circle 10px at 10px 0, transparent 10px, #7c3aed 10px);
  background-size: 20px 14px;
}

.booster-body {
  background: linear-gradient(180deg, #1a1040, #0d0820);
  border: 2px solid #3730a3;
  border-top: none;
  padding: 30px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.booster-chevron {
  width: 60px;
  height: 40px;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.booster-text { text-align: center; }

.booster-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: white;
}

.booster-sub {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: #818cf8;
  margin-top: 2px;
}

.booster-season {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.booster-label {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  padding: 8px 0;
  background: linear-gradient(180deg, #151030, #0d0820);
  border: 2px solid #3730a3;
  border-top: none;
  border-radius: 0 0 12px 12px;
}

.shop-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.shop-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.rarity-pills {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.rarity-pill {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.rarity-pill small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.rarity-pill.rarity-epic { border-color: var(--epic-border); }
.rarity-pill.rarity-epic small { color: #a78bfa; }
.rarity-pill.rarity-rare { border-color: var(--rare-border); }
.rarity-pill.rarity-rare small { color: #fbbf24; }
.rarity-pill.rarity-prismatic { border-color: var(--prismatic-pink); }
.rarity-pill.rarity-prismatic small { color: #f472b6; }

.btn-open-pack {
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 8px;
}

.btn-open-pack:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.btn-collection-link {
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-collection-link:hover { color: var(--text); }

/* ═══════════════════════════════════════════
   REVEAL VIEW
   ═══════════════════════════════════════════ */
.reveal-stage {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 200;
  gap: 20px;
}

/* Progress dots */
.progress-dots {
  display: flex;
  gap: 8px;
  position: absolute;
  top: 60px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.3s;
}

.dot.current {
  width: 24px;
  border-radius: 5px;
  background: #6366f1;
}

.dot.done {
  background: #22c55e;
}

/* Card container */
.reveal-card-container {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  perspective: 1200px;
}

.reveal-card-container .prismatic-wrap {
  width: 100%;
  height: 100%;
}

.reveal-card-container .prismatic-wrap .game-card {
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════
   CARD BACK
   ═══════════════════════════════════════════ */
.card-back {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #0f1729, #0a0f1a);
  border: 2px solid #2a3a5c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.15), 0 0 80px rgba(99, 102, 241, 0.05);
  animation: card-back-pulse 2s ease-in-out infinite;
}

@keyframes card-back-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.15), 0 0 60px rgba(99, 102, 241, 0.05); }
  50% { box-shadow: 0 0 50px rgba(99, 102, 241, 0.25), 0 0 100px rgba(99, 102, 241, 0.1); }
}

/* Diagonal lines pattern */
.card-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(99, 102, 241, 0.03) 8px,
    rgba(99, 102, 241, 0.03) 9px
  );
  pointer-events: none;
}

/* Concentric rings */
.card-back-rings {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  animation: ring-pulse 3s ease-in-out infinite;
}

.ring:nth-child(1) { width: 120px; height: 120px; animation-delay: 0s; }
.ring:nth-child(2) { width: 90px; height: 90px; animation-delay: 0.3s; }
.ring:nth-child(3) { width: 60px; height: 60px; animation-delay: 0.6s; }

@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.ring-icon {
  font-size: 24px;
  position: relative;
  z-index: 2;
}

.card-back-text {
  text-align: center;
}

.card-back-tap {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.card-back-sub {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════
   CARD FRONT — v3 class names
   ═══════════════════════════════════════════ */
.game-card {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.5s;
}

/* Tier-specific card styles */
.game-card.tier-common {
  background: var(--common-bg);
  border: 2px solid var(--common-border);
  box-shadow: 0 0 20px rgba(59, 74, 99, 0.2);
}

.game-card.tier-epic {
  background: var(--epic-bg);
  border: 2px solid var(--epic-border);
  box-shadow: 0 0 40px var(--epic-glow), 0 0 80px rgba(147, 51, 234, 0.2);
}

.game-card.tier-rare {
  background: var(--rare-bg);
  border: 2px solid var(--rare-border);
  box-shadow: 0 0 40px var(--rare-glow), 0 0 80px rgba(217, 119, 6, 0.2);
}

.prismatic-wrap {
  position: relative;
  border-radius: calc(var(--radius) + 3px);
  padding: 3px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #06b6d4, #ec4899);
  background-size: 300% 300%;
  animation: prismatic-border 3s linear infinite;
}

.game-card.tier-prismatic {
  background: var(--prismatic-bg);
  border: none;
  position: relative;
  box-shadow: 0 0 40px var(--prismatic-glow), 0 0 80px rgba(6, 182, 212, 0.15);
}

@keyframes prismatic-border {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Card header */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px 8px;
}

.card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.tier-common .card-name { color: #e6edf3; }
.tier-epic .card-name { color: #e9d5ff; }
.tier-rare .card-name { color: #fef3c7; }
.tier-prismatic .card-name { color: #fbcfe8; }

/* Tier badge (v3 uses .card-tier-badge) */
.card-tier-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.tier-common .card-tier-badge { background: var(--common-badge); color: #c9d1d9; }
.tier-epic .card-tier-badge { background: #581c87; color: #c084fc; }
.tier-rare .card-tier-badge { background: #713f12; color: #fde68a; }
.tier-prismatic .card-tier-badge { background: linear-gradient(90deg, #9333ea, #06b6d4); color: white; }

/* Card image area */
.card-image {
  margin: 0 14px;
  height: 170px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-common .card-image { background: linear-gradient(135deg, #1c2333, #253045); }
.tier-epic .card-image { background: linear-gradient(135deg, #2d1065, #4c1d95); }
.tier-rare .card-image { background: linear-gradient(135deg, #422006, #713f12); }
.tier-prismatic .card-image { background: linear-gradient(135deg, #1a0a2e, #0f172a, #042f2e); }

/* v3 uses .card-letter, .card-ticker, .card-stars */
.card-letter {
  font-size: 56px;
  font-weight: 800;
  opacity: 0.25;
}

.tier-epic .card-letter { color: #a78bfa; opacity: 0.4; }
.tier-rare .card-letter { color: #fbbf24; opacity: 0.4; }
.tier-prismatic .card-letter { color: #f472b6; opacity: 0.4; }

.card-ticker {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

.card-stars {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  color: #fbbf24;
}

/* ═══════════════════════════════════════════
   CARD METRICS — v3 new class names
   Fixed alignment: LABEL | VALUE | MULT | SCORE
   ═══════════════════════════════════════════ */
.m-header {
  display: grid;
  grid-template-columns: 1fr 70px 36px 56px;
  padding: 6px 14px 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  gap: 4px;
}

.m-header span:last-child { text-align: right; }

.m-body {
  padding: 0 14px;
  flex: 1;
}

.m-row {
  display: grid;
  grid-template-columns: 1fr 70px 36px 56px;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 4px;
}

.m-row:last-child { border-bottom: none; }

.m-label {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-val {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  color: var(--text);
  text-align: left;
}

/* Delta coloring */
.delta-pos { color: #4ade80; }
.delta-neg { color: #f87171; }

/* Multiplier pill */
.mult-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
}

.mult-pill.empty {
  visibility: hidden;
}

.tier-common .mult-pill { background: transparent; color: transparent; }
.tier-epic .mult-pill:not(.empty) { background: #581c87; color: #c084fc; }
.tier-rare .mult-pill:not(.empty) { background: #713f12; color: #fde68a; }
.tier-prismatic .mult-pill:not(.empty) { background: linear-gradient(90deg, #9333ea, #06b6d4); color: white; }

/* Score column */
.m-score {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.score-pos { color: #4ade80; }
.score-neg { color: #f87171; }

/* Ability box */
.card-ability {
  margin: 6px 14px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
}

.tier-rare .card-ability {
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.tier-prismatic .card-ability {
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.ability-head {
  font-weight: 700;
  color: var(--text);
  font-size: 11px;
}

.ability-tag {
  font-weight: 500;
  color: var(--text-faint);
  font-size: 10px;
}

.ability-desc {
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 11px;
}

/* Card footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px 10px;
  font-size: 10px;
  color: var(--text-faint);
  margin-top: auto;
}

/* v3 uses .card-dots */
.card-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-left: 2px;
}

.tier-common .card-dots span { background: var(--common-border); }
.tier-common .card-dots span.active { background: var(--text-muted); }
.tier-epic .card-dots span { background: rgba(147,51,234,0.3); }
.tier-epic .card-dots span.active { background: #9333ea; }
.tier-rare .card-dots span { background: rgba(217,119,6,0.3); }
.tier-rare .card-dots span.active { background: #d97706; }
.tier-prismatic .card-dots span { background: rgba(236,72,153,0.3); }
.tier-prismatic .card-dots span.active { background: #ec4899; }

/* Tier badge below card during reveal */
.tier-badge-below {
  font-size: 14px;
  font-weight: 700;
  padding: 8px 24px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tier-badge-below.visible { opacity: 1; }

.tier-badge-below.badge-common { background: var(--common-badge); color: #c9d1d9; }
.tier-badge-below.badge-epic { background: var(--epic-badge); color: white; }
.tier-badge-below.badge-rare { background: var(--rare-badge); color: white; }
.tier-badge-below.badge-prismatic { background: linear-gradient(90deg, #ec4899, #8b5cf6, #06b6d4); color: white; }

/* ═══════════════════════════════════════════
   SCREEN FLASH FX — MASSIVELY DIFFERENTIATED
   ═══════════════════════════════════════════ */
.screen-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 300;
  transition: opacity 0.1s;
}

/* EPIC: subtle short purple pulse */
.screen-flash.flash-epic {
  background: radial-gradient(circle at center, rgba(147, 51, 234, 0.25), transparent 60%);
  animation: flash-epic-anim 0.5s ease-out forwards;
}

@keyframes flash-epic-anim {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* RARE: Big golden explosion — longer, more intense */
.screen-flash.flash-rare {
  background: radial-gradient(circle at center,
    rgba(251, 191, 36, 0.6) 0%,
    rgba(217, 119, 6, 0.4) 25%,
    rgba(217, 119, 6, 0.15) 50%,
    transparent 75%
  );
  animation: flash-rare-anim 1.2s ease-out forwards;
}

@keyframes flash-rare-anim {
  0% { opacity: 1; transform: scale(0.8); }
  20% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* PRISMATIC: INSANE rainbow cascade — pulsing, multi-color, long */
.screen-flash.flash-prismatic {
  background:
    radial-gradient(circle at 30% 40%, rgba(236, 72, 153, 0.6), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.6), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.5), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.3), transparent 70%);
  animation: flash-prismatic-anim 2s ease-out forwards;
}

@keyframes flash-prismatic-anim {
  0% { opacity: 1; filter: hue-rotate(0deg) brightness(1.5); }
  25% { opacity: 0.9; filter: hue-rotate(60deg) brightness(1.3); }
  50% { opacity: 0.7; filter: hue-rotate(120deg) brightness(1.1); }
  75% { opacity: 0.4; filter: hue-rotate(180deg) brightness(1); }
  100% { opacity: 0; filter: hue-rotate(360deg) brightness(1); }
}

/* ═══════════════════════════════════════════
   SCREEN SHAKE ANIMATION
   ═══════════════════════════════════════════ */
.screen-shake {
  animation: shake-keyframes 0.15s ease-in-out infinite;
}

@keyframes shake-keyframes {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(3px, -3px); }
  75% { transform: translate(-2px, 4px); }
  100% { transform: translate(0, 0); }
}

/* ═══════════════════════════════════════════
   LIGHT RAYS (Prismatic only)
   ═══════════════════════════════════════════ */
.light-ray {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 300px;
  transform-origin: 50% 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8),
    rgba(236, 72, 153, 0.4) 30%,
    rgba(139, 92, 246, 0.2) 60%,
    transparent
  );
  border-radius: 2px;
  animation: ray-expand 1.5s ease-out forwards;
  pointer-events: none;
}

@keyframes ray-expand {
  0% { opacity: 0; height: 0; }
  20% { opacity: 1; height: 350px; }
  100% { opacity: 0; height: 500px; }
}

/* Particles */
.particle-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 250;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: particle-fly 1s ease-out forwards;
  opacity: 0;
}

@keyframes particle-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: var(--fly-dir) scale(0); }
}

/* Card flip animation */
.card-flip-enter {
  animation: card-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-enter {
  0% { opacity: 0; transform: scale(0.8) rotateY(90deg); }
  50% { opacity: 1; transform: scale(1.05) rotateY(0deg); }
  100% { opacity: 1; transform: scale(1) rotateY(0deg); }
}

.card-back-exit {
  animation: card-back-exit-anim 0.4s ease-in forwards;
}

@keyframes card-back-exit-anim {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9) rotateY(-30deg); }
}

/* ═══════════════════════════════════════════
   SUMMARY VIEW
   ═══════════════════════════════════════════ */
.summary-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: calc(100dvh - 50px);
  padding: 40px 20px;
  gap: 20px;
}

.summary-title {
  font-size: 28px;
  font-weight: 700;
}

.summary-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.summary-badge {
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.summary-badge.sb-common { background: var(--common-badge); color: #c9d1d9; }
.summary-badge.sb-epic { background: var(--epic-badge); color: white; }
.summary-badge.sb-rare { background: var(--rare-badge); color: white; }
.summary-badge.sb-prismatic { background: linear-gradient(90deg, #ec4899, #06b6d4); color: white; }

.summary-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1100px;
}

.summary-cards .game-card,
.summary-cards .prismatic-wrap .game-card {
  width: 190px;
  height: 290px;
  font-size: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.summary-cards .prismatic-wrap {
  width: 190px;
  cursor: pointer;
  transition: transform 0.2s;
}

.summary-cards .game-card:hover {
  transform: translateY(-6px);
}

.summary-cards .card-top { padding: 8px 8px 4px; }
.summary-cards .card-name { font-size: 10px; max-width: 100px; }
.summary-cards .card-tier-badge { font-size: 8px; padding: 2px 6px; }
.summary-cards .card-image { height: 80px; margin: 0 8px; }
.summary-cards .card-letter { font-size: 32px; }
.summary-cards .card-ticker { font-size: 8px; }
.summary-cards .card-stars { font-size: 8px; }
.summary-cards .m-header { padding: 4px 8px 2px; font-size: 7px; grid-template-columns: 1fr 50px 28px 40px; gap: 2px; }
.summary-cards .m-body { padding: 0 8px; }
.summary-cards .m-row { font-size: 9px; padding: 1px 0; grid-template-columns: 1fr 50px 28px 40px; gap: 2px; }
.summary-cards .row-val { font-size: 8px; }
.summary-cards .mult-pill { font-size: 7px; padding: 1px 3px; }
.summary-cards .m-score { font-size: 8px; }
.summary-cards .card-ability { margin: 4px 8px; padding: 4px 6px; font-size: 8px; }
.summary-cards .ability-head { font-size: 8px; }
.summary-cards .ability-desc { font-size: 7px; }
.summary-cards .card-footer { padding: 4px 8px 6px; font-size: 8px; }

.summary-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-open-another {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-open-another:hover { transform: translateY(-2px); }

.btn-go-collection {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-go-collection:hover { color: var(--text); border-color: var(--text-faint); }

/* ═══════════════════════════════════════════
   COLLECTION
   ═══════════════════════════════════════════ */
.collection-wrap {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
  min-height: calc(100dvh - 50px);
}

.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.collection-title {
  font-size: 22px;
  font-weight: 700;
}

.collection-stats-bar {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.collection-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover { color: var(--text); border-color: var(--text-faint); }
.filter-pill.active { background: #6366f1; color: white; border-color: #6366f1; }

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.collection-grid .game-card,
.collection-grid .prismatic-wrap .game-card {
  width: 100%;
  height: 320px;
  cursor: pointer;
  transition: transform 0.2s;
  font-size: 10px;
}

.collection-grid .prismatic-wrap {
  width: 100%;
  cursor: pointer;
  transition: transform 0.2s;
}

.collection-grid .game-card:hover { transform: translateY(-4px); }

/* Collection card sizing */
.collection-grid .card-top { padding: 8px 8px 4px; }
.collection-grid .card-name { font-size: 10px; max-width: 100px; }
.collection-grid .card-tier-badge { font-size: 8px; padding: 2px 6px; }
.collection-grid .card-image { height: 80px; margin: 0 8px; }
.collection-grid .card-letter { font-size: 32px; }
.collection-grid .card-ticker { font-size: 8px; }
.collection-grid .card-stars { font-size: 8px; }
.collection-grid .m-header { padding: 4px 8px 2px; font-size: 7px; grid-template-columns: 1fr 50px 28px 40px; gap: 2px; }
.collection-grid .m-body { padding: 0 8px; }
.collection-grid .m-row { font-size: 9px; padding: 1px 0; grid-template-columns: 1fr 50px 28px 40px; gap: 2px; }
.collection-grid .row-val { font-size: 8px; }
.collection-grid .mult-pill { font-size: 7px; padding: 1px 3px; }
.collection-grid .m-score { font-size: 8px; }
.collection-grid .card-ability { margin: 4px 8px; padding: 4px 6px; font-size: 8px; }
.collection-grid .ability-head { font-size: 8px; }
.collection-grid .ability-desc { font-size: 7px; }
.collection-grid .card-footer { padding: 4px 8px 6px; font-size: 8px; }

.collection-empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.collection-empty.visible { display: block; }
.collection-empty p { margin-bottom: 16px; }

.card-dupe-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.7);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-card-wrap {
  width: var(--card-width);
  height: var(--card-height);
}

.modal-card-wrap .prismatic-wrap {
  width: 100%;
  height: 100%;
}

.modal-card-wrap .prismatic-wrap .game-card {
  width: 100%;
  height: 100%;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 24px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 501;
}

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

/* ═════════════════════════════════════════════
   TOURNAMENT VIEW — v3 with score/join/leaderboard
   ═════════════════════════════════════════════ */
.tournament-wrap {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
  min-height: calc(100dvh - 50px);
}

/* Epoch timer bar */
.epoch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.epoch-info { display: flex; flex-direction: column; gap: 2px; }

.epoch-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.epoch-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.epoch-timer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.epoch-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.epoch-status.ended {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.epoch-countdown {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: 0.05em;
}

/* Slots header */
.slots-header {
  margin-bottom: 24px;
}

.slots-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.slots-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Metric slots grid */
.metric-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

.metric-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
}

.slot-card-area {
  aspect-ratio: 3 / 4;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.01);
}

.slot-card-area:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.04);
}

.slot-card-area.filled {
  border-style: solid;
  border-color: var(--border);
  cursor: pointer;
  padding: 12px;
  background: var(--surface);
}

.slot-card-area.filled:hover {
  border-color: #f87171;
}

.slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
}

.slot-plus {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.slot-card-area:hover .slot-plus {
  border-color: #6366f1;
  color: #6366f1;
}

.slot-hint {
  font-size: 11px;
  font-weight: 500;
}

/* ─── Filled slot content (v3 new classes) ─── */
.slot-filled-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  width: 100%;
  height: 100%;
}

.slot-agent-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.slot-agent-ticker {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.slot-score-big {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.1;
  margin: 4px 0;
}

.slot-tier-dot {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}

.tier-dot-common { background: var(--common-badge); color: #c9d1d9; }
.tier-dot-epic { background: #581c87; color: #c084fc; }
.tier-dot-rare { background: #713f12; color: #fde68a; }
.tier-dot-prismatic { background: linear-gradient(90deg, #9333ea, #06b6d4); color: white; }

/* Remove button overlay */
.slot-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: white;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.slot-card-area.filled:hover .slot-remove {
  display: flex;
}

/* ─── Tournament Join CTA ─── */
.tournament-join-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.join-cta-text { flex: 1; }

.join-cta-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.join-cta-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Lineup Modal ─── */
.lineup-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lineup-modal-overlay.open { display: flex; }

.lineup-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}

.lineup-modal-header {
  position: relative;
  margin-bottom: 24px;
}

.lineup-modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.lineup-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.lineup-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 20px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.lineup-modal-close:hover { color: var(--text); }

/* ─── Tournament Score & Join ─── */
.tournament-score-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(236, 72, 153, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius);
}

.tournament-score-block {
  text-align: center;
}

.tournament-score-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tournament-score-value {
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.btn-join-tournament {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-join-tournament:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-join-tournament:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lock-message {
  display: none;
  text-align: center;
  padding: 14px 20px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  color: #4ade80;
  font-size: 13px;
  font-weight: 600;
}

/* ─── Leaderboard ─── */
.leaderboard-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.leaderboard-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.leaderboard-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-row {
  display: grid;
  grid-template-columns: 48px 140px 1fr 80px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.lb-row.lb-player {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
}

.lb-rank {
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 14px;
}

.lb-row.lb-player .lb-rank { color: #818cf8; }

.lb-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-slots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.lb-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  gap: 1px;
}

.lb-slot-agent {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.lb-slot-score {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.lb-total {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  text-align: right;
}

/* Slot picker overlay */
.slot-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.slot-picker-overlay.open { display: flex; }

.slot-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

.picker-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.picker-title {
  font-size: 18px;
  font-weight: 700;
}

.picker-metric {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.picker-close {
  margin-left: auto;
  font-size: 20px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.picker-close:hover { color: var(--text); }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.picker-grid .game-card,
.picker-grid .prismatic-wrap .game-card {
  width: 100%;
  height: 280px;
  font-size: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.picker-grid .prismatic-wrap {
  width: 100%;
  cursor: pointer;
  transition: transform 0.2s;
}

.picker-grid .game-card:hover {
  transform: translateY(-4px);
}

.picker-grid .card-top { padding: 8px 8px 4px; }
.picker-grid .card-name { font-size: 10px; max-width: 90px; }
.picker-grid .card-tier-badge { font-size: 8px; padding: 2px 6px; }
.picker-grid .card-image { height: 65px; margin: 0 8px; }
.picker-grid .card-letter { font-size: 28px; }
.picker-grid .card-ticker { font-size: 8px; }
.picker-grid .card-stars { font-size: 8px; }
.picker-grid .m-header { padding: 4px 8px 2px; font-size: 7px; grid-template-columns: 1fr 50px 28px 40px; gap: 2px; }
.picker-grid .m-body { padding: 0 8px; }
.picker-grid .m-row { font-size: 9px; padding: 1px 0; grid-template-columns: 1fr 50px 28px 40px; gap: 2px; }
.picker-grid .row-val { font-size: 8px; }
.picker-grid .mult-pill { font-size: 7px; padding: 1px 3px; }
.picker-grid .m-score { font-size: 8px; }
.picker-grid .card-ability { margin: 4px 8px; padding: 4px 6px; font-size: 8px; }
.picker-grid .ability-head { font-size: 8px; }
.picker-grid .ability-desc { font-size: 7px; }
.picker-grid .card-footer { padding: 4px 8px 6px; font-size: 8px; }

.picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* Footer */
.app-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
}

.app-footer a {
  color: var(--text-faint);
  text-decoration: none;
}

.app-footer a:hover { color: var(--text-muted); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .header-nav { order: 3; width: 100%; justify-content: center; }

  .nav-pill { padding: 6px 10px; font-size: 11px; }

  :root {
    --card-width: 300px;
    --card-height: 460px;
  }

  .summary-cards .game-card {
    width: 150px;
    height: 230px;
  }

  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .metric-slots {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-slots .metric-slot:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  .epoch-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .epoch-info { align-items: center; }

  .picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .tournament-score-section {
    flex-direction: column;
    gap: 16px;
  }

  .tournament-join-cta {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .lineup-modal {
    padding: 16px;
  }

  .lineup-modal .metric-slots {
    grid-template-columns: repeat(2, 1fr);
  }

  .lb-row {
    grid-template-columns: 40px 100px 1fr 60px;
    gap: 8px;
    padding: 10px 12px;
    font-size: 11px;
  }

  .lb-slots { gap: 4px; }
  .lb-slot { min-width: 56px; }
  .lb-slot-agent { font-size: 8px; max-width: 56px; }
  .lb-slot-score { font-size: 9px; }
}
