/* ========================================
   styles.css — Golden Road LoL 黄金之路
   Premium dark theme with gold accents
   ======================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --bg-primary: #060a14;
  --bg-secondary: #0c1220;
  --bg-card: rgba(14, 22, 40, 0.75);
  --bg-card-hover: rgba(20, 30, 56, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  --gold-start: #c9a227;
  --gold-mid: #dbb740;
  --gold-end: #f0d060;
  --gold-glow: rgba(201, 162, 39, 0.4);
  --gold-gradient: linear-gradient(135deg, var(--gold-start), var(--gold-end));

  --blue-accent: #2d6cdf;
  --blue-glow: rgba(45, 108, 223, 0.3);
  --blue-light: #5b9aff;

  --text-primary: #eaf0ff;
  --text-secondary: rgba(234, 240, 255, 0.65);
  --text-muted: rgba(234, 240, 255, 0.4);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-gold: rgba(201, 162, 39, 0.4);

  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 30px var(--gold-glow);
  --shadow-blue: 0 0 30px var(--blue-glow);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Font */
  --font-display: 'Orbitron', 'Inter', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-zh: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Set Chinese font when lang=zh */
html[lang="zh-CN"] body {
  font-family: var(--font-zh);
}

a {
  color: var(--gold-mid);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--gold-end);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* ---------- Background Effects ---------- */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-effects::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.08), transparent 70%);
  top: -200px;
  right: -100px;
  animation: float-glow 12s ease-in-out infinite;
}

.bg-effects::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 108, 223, 0.06), transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: float-glow 15s ease-in-out infinite reverse;
}

@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Animated grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
}

/* ---------- Layout ---------- */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-lg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Language Toggle ---------- */
.lang-toggle {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.lang-toggle:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-gold);
}
.lang-toggle .globe-icon {
  font-size: 1rem;
}

/* ---------- Screens (Page States) ---------- */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeSlideIn 0.5s ease forwards;
}
.screen.active {
  display: flex;
}

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

/* ---------- Start Screen / Hero ---------- */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
  max-width: 700px;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-mid);
  background: rgba(201, 162, 39, 0.1);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 162, 39, 0.2);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px var(--gold-glow));
  margin-bottom: var(--space-sm);
}
.hero-title span {
  font-size: 0.5em;
  -webkit-text-fill-color: var(--text-secondary);
  filter: none;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: var(--space-md) auto 0;
}

/* ---------- Mode Selection ---------- */
.mode-select {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 480px;
  margin-top: var(--space-lg);
}

.mode-card {
  position: relative;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-normal);
  text-align: left;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, var(--gold-start) 50%, transparent 70%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.mode-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.mode-card:hover::before {
  opacity: 1;
}

.mode-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-end);
  margin-bottom: var(--space-xs);
}
.mode-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.mode-card-icon {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-xl);
  font-size: 2rem;
  opacity: 0.6;
}

/* Start button */
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--bg-primary);
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-normal);
  cursor: pointer;
}
.btn-start:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 50px var(--gold-glow);
}
.btn-start:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- Draft Screen ---------- */
.draft-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
}

/* Draft Header */
.draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
}

.round-badge {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-mid);
  background: rgba(201, 162, 39, 0.1);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.back-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-gold);
}

/* Reroll Counters */
.reroll-bar {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.reroll-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.reroll-item:hover:not(.disabled) {
  border-color: var(--blue-accent);
  color: var(--blue-light);
  background: rgba(45, 108, 223, 0.1);
}
.reroll-item.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.reroll-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--blue-accent);
  color: white;
  border-radius: 50%;
}
.reroll-item.disabled .reroll-count {
  background: var(--text-muted);
}

/* ---------- Wheels Container ---------- */
.wheels-section {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 900px;
}

.wheel-wrapper {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.wheel-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wheel-box {
  width: 100%;
  aspect-ratio: 1;
  max-height: 200px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.wheel-box.spinning {
  border-color: var(--gold-start);
  box-shadow: var(--shadow-gold);
}
.wheel-box.landed {
  border-color: var(--gold-mid);
  box-shadow: 0 0 40px var(--gold-glow);
}

/* Wheel slot machine effect */
.wheel-reel {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.1s linear;
}

.wheel-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-end);
  text-align: center;
  padding: var(--space-sm);
  white-space: nowrap;
}
.wheel-value.placeholder {
  color: var(--text-muted);
  font-size: 2rem;
}

/* Decorative lines on wheel */
.wheel-box::before,
.wheel-box::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border-subtle);
}
.wheel-box::before { top: 30%; }
.wheel-box::after { bottom: 30%; }

/* ---------- Spin Button ---------- */
.btn-spin {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-3xl);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--bg-primary);
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.btn-spin::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-spin:hover::before {
  transform: translateX(100%);
}
.btn-spin:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 60px var(--gold-glow);
}
.btn-spin:active {
  transform: translateY(0) scale(0.97);
}
.btn-spin:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Player Selection ---------- */
.player-selection {
  width: 100%;
  max-width: 900px;
  animation: fadeSlideIn 0.4s ease forwards;
}

.selection-header {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-mid);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  text-align: center;
}

.spin-result-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(45, 108, 223, 0.05));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}
.spin-result-item {
  text-align: center;
}
.spin-result-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.spin-result-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-end);
}
.spin-result-divider {
  width: 1px;
  height: 36px;
  background: var(--border-gold);
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.player-card {
  position: relative;
  padding: var(--space-md) var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}
.player-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}
.player-card:hover::before {
  transform: scaleX(1);
}
.player-card.selected {
  border-color: var(--gold-mid);
  box-shadow: 0 0 25px var(--gold-glow);
  background: rgba(201, 162, 39, 0.08);
}
.player-card.selected::before {
  transform: scaleX(1);
}
.player-card.used {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.player-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.player-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.player-rating-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50%;
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Role buttons for assigning */
.role-assign {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.role-btn {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.role-btn:hover:not(.disabled) {
  border-color: var(--gold-start);
  color: var(--gold-end);
  background: rgba(201, 162, 39, 0.1);
}
.role-btn.active {
  border-color: var(--gold-mid);
  color: var(--gold-end);
  background: rgba(201, 162, 39, 0.15);
  box-shadow: 0 0 15px rgba(201, 162, 39, 0.2);
}
.role-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-confirm {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bg-primary);
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-normal);
}
.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--gold-glow);
}
.btn-confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Roster Panel ---------- */
.roster-panel {
  width: 100%;
  max-width: 900px;
  margin-top: var(--space-lg);
}

.roster-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  text-align: center;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}

.roster-slot {
  padding: var(--space-md) var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-normal);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}
.roster-slot.filled {
  border-color: var(--gold-start);
  background: rgba(201, 162, 39, 0.06);
}
.roster-slot.active-target {
  border-color: var(--blue-accent);
  box-shadow: var(--shadow-blue);
  animation: pulse-blue 1.5s ease infinite;
}

@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 15px var(--blue-glow); }
  50% { box-shadow: 0 0 30px var(--blue-glow); }
}

.slot-role {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.slot-player {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-end);
}
.slot-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Simulation Screen ---------- */
.sim-container {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding-top: var(--space-3xl);
}

.team-rating-display {
  text-align: center;
}
.team-rating-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.team-rating-value {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px var(--gold-glow));
  line-height: 1;
}
.team-rating-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  margin: var(--space-md) auto 0;
  overflow: hidden;
}
.team-rating-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  transition: width 1.5s ease;
}

/* Event Timeline */
.events-timeline {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.event-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
  opacity: 0.4;
  transform: translateX(-10px);
}
.event-card.active {
  opacity: 1;
  transform: translateX(0);
  border-color: var(--gold-start);
}
.event-card.completed {
  opacity: 1;
  transform: translateX(0);
}
.event-card.won {
  border-color: var(--success);
  background: rgba(52, 211, 153, 0.05);
}
.event-card.lost {
  border-color: var(--danger);
  background: rgba(248, 113, 113, 0.05);
}

.event-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 50px;
  text-align: center;
}

.event-info {
  flex: 1;
}
.event-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.event-result {
  font-size: 0.85rem;
  font-weight: 600;
}
.event-result.win {
  color: var(--success);
}
.event-result.lose {
  color: var(--danger);
}

.event-badge {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.event-badge.champion {
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-end);
  border: 1px solid var(--border-gold);
}
.event-badge.eliminated {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-sim-action {
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bg-primary);
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-normal);
}
.btn-sim-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--gold-glow);
}

/* ---------- Results Screen ---------- */
.result-container {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding-top: var(--space-3xl);
  text-align: center;
}

.result-banner {
  padding: var(--space-2xl) var(--space-xl);
  border-radius: var(--radius-xl);
  width: 100%;
}
.result-banner.golden {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.12), rgba(240, 208, 96, 0.06));
  border: 2px solid var(--gold-mid);
  box-shadow: 0 0 60px var(--gold-glow), inset 0 0 60px rgba(201, 162, 39, 0.05);
  animation: golden-pulse 2s ease-in-out infinite;
}
.result-banner.failed {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

@keyframes golden-pulse {
  0%, 100% { box-shadow: 0 0 40px var(--gold-glow), inset 0 0 40px rgba(201, 162, 39, 0.03); }
  50% { box-shadow: 0 0 80px var(--gold-glow), inset 0 0 80px rgba(201, 162, 39, 0.08); }
}

.result-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 900;
  margin-bottom: var(--space-md);
}
.result-title.golden {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

.result-stats {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}
.result-stat {
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}
.result-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-end);
}
.result-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

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

.btn-replay {
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bg-primary);
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-normal);
}
.btn-replay:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--gold-glow);
}

.btn-home {
  padding: var(--space-md) var(--space-2xl);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.btn-home:hover {
  color: var(--text-primary);
  border-color: var(--border-gold);
}

/* ---------- Share Section ---------- */
.share-section {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.share-card-frame {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-gold);
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.15);
  background: #0a1628;
}
.share-card-frame canvas {
  display: block;
  width: 100%;
  height: auto;
}

.share-buttons {
  display: flex;
  gap: var(--space-md);
  width: 100%;
}

.btn-share-action {
  flex: 1;
  padding: var(--space-md) var(--space-md);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  text-align: center;
}

.btn-share-copy {
  color: var(--blue-light);
  background: rgba(45, 108, 223, 0.12);
  border: 1px solid rgba(45, 108, 223, 0.3);
}
.btn-share-copy:hover {
  background: rgba(45, 108, 223, 0.2);
  border-color: var(--blue-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-share-image {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
}
.btn-share-image:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-share-post {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
}
.btn-share-post:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: var(--space-md) var(--space-xl);
  background: var(--success);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
  z-index: 500;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- About / Info Sections ---------- */
.info-sections {
  width: 100%;
  max-width: 700px;
  margin-top: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.info-section {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.info-section h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-mid);
  margin-bottom: var(--space-md);
}
.info-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.info-section p:last-child {
  margin-bottom: 0;
}
.info-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.info-section li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: var(--space-lg);
  position: relative;
}
.info-section li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--gold-start);
  font-size: 0.6rem;
  top: 0.35em;
}
.info-section li b {
  color: var(--text-primary);
}

/* HowTo Steps */
.howto-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.howto-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.howto-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-end);
  background: rgba(201, 162, 39, 0.12);
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.3);
}
.howto-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.howto-text p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--gold-mid);
}
.footer-dot {
  color: var(--text-muted);
}
.footer-disc {
  display: block;
  margin-top: var(--space-md);
  font-style: italic;
  color: var(--text-muted);
}

/* ---------- Modal (How to Play / About) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-gold);
}

/* ---------- Particles / Confetti for Golden Road win ---------- */
.confetti-container {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.text-gold { color: var(--gold-end); }
.text-center { text-align: center; }

/* Spinner animation for wheels */
@keyframes spin-blur {
  0% { filter: blur(0); }
  30% { filter: blur(4px); }
  70% { filter: blur(4px); }
  100% { filter: blur(0); }
}
/* ---------- Free Draft Layout Classes ---------- */
.free-draft-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.free-draft-roster {
  margin-top: 0;
}
.flex-start-mb20 {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.player-pool-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.pool-header {
  margin-top: 0;
  font-size: 1.1rem;
}
.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.search-input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-input:focus {
  border-color: var(--gold-mid);
  box-shadow: 0 0 15px var(--gold-glow);
  background: var(--bg-card);
}
.free-role-tabs {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.free-player-list {
  overflow-y: auto;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding-right: 5px;
  align-content: start;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .layout {
    padding: var(--space-md);
  }

  .hero {
    padding: var(--space-2xl) 0 var(--space-lg);
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .wheels-section {
    gap: var(--space-md);
  }

  .wheel-wrapper {
    min-width: 140px;
  }

  .wheel-box {
    max-height: 140px;
  }

  .roster-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-sm);
    gap: var(--space-sm);
  }

  .roster-slot {
    flex: 0 0 110px;
    scroll-snap-align: start;
    padding: var(--space-sm) var(--space-xs);
    min-height: 80px;
  }
  .slot-player {
    font-size: 0.8rem;
  }
  .slot-role {
    font-size: 0.65rem;
  }

  .free-draft-layout {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .player-pool-panel {
    max-height: 60vh;
    padding: var(--space-md);
  }

  .free-player-list {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  
  .player-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .spin-result-banner {
    flex-direction: column;
    gap: var(--space-sm);
  }
  .spin-result-divider {
    width: 50px;
    height: 1px;
  }

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

  .lang-toggle {
    top: var(--space-md);
    right: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {

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

  .wheels-section {
    flex-direction: column;
    align-items: center;
  }
  .wheel-wrapper {
    max-width: 100%;
  }

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}
