/* ===== Celestial Cup 2026 — Pure CSS Theme ===== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Roboto+Mono:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/cn-fontsource-ding-talk-jin-bu-ti-regular@1.0.3/font.min.css');

/* --- CSS Variables --- */
:root {
  --primary: #B4611A;
  --primary-hover: #9C5214;
  --primary-light: rgba(184, 106, 35, 0.10);
  --primary-glow: rgba(232, 150, 60, 0.35);
  --accent: #6D5BC7;
  --accent-glow: rgba(124, 107, 217, 0.22);
  --gold: #B4791B;
  --gold-light: rgba(180, 121, 27, 0.10);
  --gold-glow: rgba(255, 200, 100, 0.35);

  --bg: #FAF7F1;
  --bg-alt: #F3EEE5;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFF8EE;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-glass-border: rgba(60, 48, 28, 0.10);

  --text: #2C2519;
  --text-secondary: #6B6250;
  --text-tertiary: #988D77;
  --text-muted: rgba(44, 37, 25, 0.45);

  --border: rgba(60, 48, 28, 0.12);
  --border-light: rgba(60, 48, 28, 0.06);

  --success: #1E7F58;
  --success-light: rgba(30, 127, 88, 0.10);
  --warning: #A96E0F;
  --warning-light: rgba(169, 110, 15, 0.10);
  --error: #C24040;
  --error-light: rgba(194, 64, 64, 0.10);
  --info: #6D5BC7;

  /* legacy tokens restored */
  --card-bg: #FFFFFF;
  --surface-alt: #F3EEE5;
  --shadow-sm: 0 1px 3px rgba(60, 48, 28, 0.08);
  --shadow-md: 0 10px 28px rgba(60, 48, 28, 0.12);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: "DingTalk JinBuTi", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Roboto Mono", "JetBrains Mono", monospace;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Background atmosphere --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(232, 150, 60, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(139, 123, 216, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(255, 200, 100, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(60, 48, 28, 0.03) 39px, rgba(60, 48, 28, 0.03) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(60, 48, 28, 0.03) 39px, rgba(60, 48, 28, 0.03) 40px);
  pointer-events: none;
}

/* --- Decorative top-right corner glow (accent) --- */
body .bg-corner-glow {
  position: fixed;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 150, 60, 0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* --- Layout --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(60, 48, 28, 0.05);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  transition: opacity 0.2s;
}

.nav-brand:hover { opacity: 0.85; }

.nav-brand i { color: var(--gold); }

.footer-brand img {
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  position: relative;
  font-family: var(--font-display);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(184, 106, 35, 0.08);
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-glow), 0 0 20px var(--primary-glow);
}

@media (max-width: 640px) {
  .nav-link span { display: none; }
  .nav-link { padding: 8px; }
  .nav-link.active::after { left: 8px; right: 8px; }
  .nav-brand { font-size: 1rem; }
}

/* --- Spacer --- */
.nav-spacer { height: 72px; }

/* --- Glass Card --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 16px rgba(60, 48, 28, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}

.card-hover {
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(60, 48, 28, 0.10);
}

/* --- Glow Effects --- */
.glow-primary {
  box-shadow: 0 0 24px var(--primary-glow), 0 4px 16px rgba(232, 150, 60, 0.22);
}
.glow-accent {
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(139, 123, 216, 0.16);
}
.glow-gold {
  box-shadow: 0 0 24px var(--gold-glow), 0 4px 16px rgba(232, 150, 60, 0.14);
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, #8A4A10 0%, #B4611A 40%, #D9782B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #B4791B 0%, #B4611A 55%, #8A4A10 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* hero headings stay bright over the deep-space image */
.hero .gradient-text {
  background: linear-gradient(135deg, #FFE9C7 0%, #FFC864 45%, #FF9E45 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.5));
}

/* --- Animations --- */
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.live-pulse { animation: live-pulse 1.5s ease-in-out infinite; }

@keyframes live-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 150, 60, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(232, 150, 60, 0); }
}
.live-dot { animation: live-dot 1.5s ease-in-out infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.bounce { animation: bounce 1.2s ease-in-out infinite; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in 0.5s ease-out forwards; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #E8963C, #D9782B);
  color: #2A1A08;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(232, 150, 60, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #F5A54E, #E08530);
  box-shadow: 0 8px 24px rgba(232, 150, 60, 0.40);
  transform: translateY(-2px);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--primary);
  border: 1.5px solid rgba(184, 106, 35, 0.45);
}

.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-body);
  white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success); border: 1px solid rgba(46, 125, 111, 0.25); }
.badge-warning { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(201, 162, 39, 0.25); }
.badge-info { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(232, 150, 60, 0.25); }
.badge-error { background: var(--error-light); color: var(--error); border: 1px solid rgba(192, 57, 43, 0.25); }

/* --- Page Header --- */
.page-header {
  padding: 100px 0 48px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1.2;
}

.page-header p {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 1.0625rem;
}

@media (min-width: 768px) {
  .page-header h1 { font-size: 3.5rem; }
}

/* --- Section Title --- */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .section-title h2 { font-size: 2rem; }
}

.section-title i { color: var(--primary); flex-shrink: 0; }

/* --- Match Card (schedule page) --- */
.match-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(60, 48, 28, 0.10);
  border-color: rgba(232, 150, 60, 0.15);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.match-card-group {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  letter-spacing: 0.3px;
}

.match-card-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.match-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-card-player { flex: 1; text-align: center; }
.match-card-player p { font-size: 0.9375rem; font-weight: 500; }

.match-card-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.match-card-score .score {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.match-card-score .status-text {
  font-size: 0.75rem;
  margin-top: 4px;
}

.match-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Player Card (enhanced) --- */
.player-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.player-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(60, 48, 28, 0.10);
  border-color: var(--accent);
}

.player-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 16px var(--primary-glow);
}

.player-avatar-gold {
  background: linear-gradient(135deg, var(--gold), #F0CE5A);
  box-shadow: 0 0 16px var(--gold-glow);
}

.player-info { flex: 1; min-width: 0; }

.player-card-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--text);
  display: block;
}

.player-card-qq {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.player-card-declaration {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.player-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}

.player-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.player-stat-label {
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.player-stat-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}

.player-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-light), #D4E0F5);
  color: var(--primary);
  border: 1px solid rgba(232, 150, 60, 0.15);
}

.player-rank-badge.gold {
  background: linear-gradient(135deg, var(--gold-light), #FFF0C0);
  color: var(--gold);
  border-color: rgba(255, 200, 100, 0.2);
}

/* --- Form --- */
.form-card {
  padding: 40px 32px;
}

@media (min-width: 640px) {
  .form-card { padding: 48px 56px; }
}

.form-group { margin-bottom: 24px; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrapper input,
.input-wrapper textarea {
  width: 100%;
  padding: 12px 16px 12px 46px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}

.input-wrapper textarea {
  padding-left: 16px;
  min-height: 112px;
  resize: vertical;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 150, 60, 0.3);
}

.input-wrapper.input-error input,
.input-wrapper.input-error textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.2);
}

.error-message { display: none; color: var(--error); font-size: 0.8125rem; margin-top: 6px; }
.error-message.show { display: block; }

.success-message {
  display: none;
  background: var(--success-light);
  border: 1px solid rgba(46, 125, 111, 0.3);
  color: var(--success);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-top: 20px;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.success-message.show { display: flex; }

.duplicate-error {
  display: none;
  background: var(--error-light);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: var(--error);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-top: 20px;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.duplicate-error.show { display: flex; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 0 24px var(--primary-glow);
}

.btn-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 36px var(--primary-glow), 0 0 72px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-submit:active { transform: translateY(0); }

/* --- Filter Pills --- */
.filter-pill {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-secondary);
}

.filter-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(232, 150, 60, 0.2);
}

/* --- Round Tabs --- */
.round-tab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.round-tab:hover { color: var(--text); background: rgba(232, 150, 60, 0.04); }

.round-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(232, 150, 60, 0.3);
}

/* --- Hero Section --- */
.hero .btn-outline {
  background: rgba(22, 18, 38, 0.55);
  color: #FFC864;
  border: 1.5px solid rgba(255, 200, 100, 0.55);
}

.hero .btn-outline:hover {
  background: rgba(232, 150, 60, 0.18);
  border-color: rgba(255, 200, 100, 0.8);
  transform: translateY(-2px);
}

.hero {
  /* dark-scoped tokens: hero keeps the deep-space look */
  --text: #F5F1E8;
  --text-secondary: #D9D2C4;
  --text-tertiary: #A99F92;
  --primary: #FFB25E;
  --primary-light: rgba(232, 150, 60, 0.16);
  --primary-glow: rgba(232, 150, 60, 0.45);
  --gold: #FFC864;
  --bg-glass: rgba(22, 18, 38, 0.55);
  --bg-glass-border: rgba(255, 200, 130, 0.20);
  --border: rgba(255, 200, 130, 0.18);
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(18, 16, 31, 0.10) 0%, rgba(18, 16, 31, 0.55) 100%), url('/static/assets/hero-bg.png') center/cover no-repeat;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 9999px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.1;
}

@media (min-width: 640px) { .hero h1 { font-size: 3.75rem; } }
@media (min-width: 768px) { .hero h1 { font-size: 4.5rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 5rem; } }

.hero p {
  margin-top: 24px;
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 672px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 640px) { .hero-actions { flex-direction: row; } }

/* --- Hero split layout --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.hero-left { text-align: left; }
.hero-left p { margin-left: 0; margin-right: 0; }
.hero-left .hero-actions { justify-content: flex-start; }
.hero-quicklinks {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}
.hero-quicklinks a { color: var(--text-secondary); transition: color 0.2s; }
.hero-quicklinks a:hover { color: var(--gold); }
.hero-aside { min-width: 0; }
.hero-card {
  background: rgba(22, 18, 38, 0.58);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 200, 130, 0.18);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: left;
}
.hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 200, 130, 0.14);
}
.hero-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--text);
}
.hero-card-title i { color: var(--gold); }
.hero-card-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.hero-card-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 14px;
}
.hero-card-player { text-align: center; min-width: 0; flex: 1; }
.hero-card-player p {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-card-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 150, 60, 0.14);
  border: 1px solid rgba(232, 150, 60, 0.28);
  color: #FFB25E;
}
.hero-card-vs { text-align: center; flex-shrink: 0; }
.hero-card-vs .font-mono {
  display: block;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gold);
}
.hero-card-ft {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  background: rgba(232, 150, 60, 0.14);
  color: #FFB25E;
}
.hero-card-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  padding-bottom: 16px;
}
.hero-card-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}
.hero-card-countdown { padding: 20px 0 16px; }
.hero-card-cd-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}
.hero-card-cd-label i { color: var(--gold); }
.hero-card-cd {
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.hero-card-cd .cd-cell {
  flex: 1;
  position: relative;
  padding: 2px 0;
  text-align: center;
}
.hero-card-cd .cd-cell + .cd-cell {
  border-left: 1px solid rgba(255, 200, 130, 0.16);
}
.hero-card-cd .cd-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFE9C7 0%, #FFC864 55%, #FF9E45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 158, 69, 0.35));
}
.hero-card-cd .cd-cell span {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
}
.hero-card-cd-sub {
  margin: 14px 0 0;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-tertiary);
}
.hero-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 200, 130, 0.14);
}
.hero-card-stats > div { text-align: center; }
.hero-card-stats strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFB25E;
}
.hero-card-stats span {
  display: block;
  margin-top: 2px;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-aside { max-width: 440px; margin: 0 auto; width: 100%; }
}

/* --- Stats Row --- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i { width: 26px; height: 26px; }

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
}

@media (min-width: 640px) { .stat-number { font-size: 2.25rem; } }

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Section Padding --- */
.section { padding: 64px 0; }
@media (min-width: 640px) { .section { padding: 80px 0; } }

/* --- Section shaded background (alternating) --- */
.section-shaded {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

/* --- Decorative corner glow --- */
.bg-corner-glow {
  position: fixed;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 150, 60, 0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* --- Decorative floating particles --- */
.bg-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.25;
}

@keyframes float-particle {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, -12px); }
}

.bg-particle-1 {
  width: 8px; height: 8px;
  top: 15%; left: 8%;
  background: rgba(232, 150, 60, 0.3);
  animation: float-particle 7s ease-in-out infinite;
}

.bg-particle-2 {
  width: 5px; height: 5px;
  top: 65%; left: 12%;
  background: rgba(139, 123, 216, 0.25);
  animation: float-particle 9s ease-in-out infinite 2s;
}

.bg-particle-3 {
  width: 7px; height: 7px;
  top: 25%; right: 10%;
  background: rgba(255, 200, 100, 0.2);
  animation: float-particle 8s ease-in-out infinite 1s;
}

.bg-particle-4 {
  width: 6px; height: 6px;
  top: 70%; right: 15%;
  background: rgba(232, 150, 60, 0.2);
  animation: float-particle 6s ease-in-out infinite 3s;
}

.bg-particle-5 {
  width: 9px; height: 9px;
  top: 45%; left: 5%;
  background: rgba(139, 123, 216, 0.15);
  animation: float-particle 10s ease-in-out infinite 0.5s;
}

/* --- Page-specific decorative elements --- */
.page-deco {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border: 1.5px solid rgba(232, 150, 60, 0.16);
}

.page-deco-1 {
  bottom: 20%;
  left: 3%;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transform: rotate(30deg);
}

.page-deco-2 {
  top: 50%;
  right: 2%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.page-deco-3 {
  top: 25%;
  left: 5%;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transform: rotate(60deg);
  border-color: rgba(255, 200, 100, 0.18);
}

/* --- Footer --- */
.footer {
  /* dark footer scope: mirrors the hero */
  --text: #F0EBE2;
  --text-secondary: #B9B1CC;
  --text-tertiary: #8A82A6;
  --primary: #E8963C;
  --primary-light: rgba(232, 150, 60, 0.16);
  --gold: #FFC864;
  --border: rgba(255, 200, 130, 0.14);
  background: #1C1830;
  border-top: 1px solid rgba(255, 200, 130, 0.12);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (min-width: 768px) { .footer-inner { flex-direction: row; } }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.footer-brand i { color: var(--gold); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.footer-links a:hover { color: var(--primary); transition: color 0.2s; }

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.footer-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.footer-copyright {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Grids --- */
.grid-5 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}
@media (min-width: 640px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-5 { grid-template-columns: repeat(5, 1fr); } }

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* --- Rules Section --- */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .rules-grid { grid-template-columns: repeat(2, 1fr); } }
.rules-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rules-card.rules-span { grid-column: 1 / -1; }
.rules-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rules-card h3 i { color: var(--primary); width: 20px; height: 20px; flex-shrink: 0; }
.rules-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rules-card li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.rules-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.45;
}
.rules-card li.rules-sub {
  padding-left: 0;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}
.rules-card li.rules-sub::before { display: none; }
.rules-card a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.rules-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}
.rules-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.rules-steps i { color: var(--text-tertiary); width: 16px; height: 16px; flex-shrink: 0; }

.founder-row {
  display: flex;
  margin-bottom: 4px;
}
.founder-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.founder-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  background: var(--surface-alt);
}
.founder-tag {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  white-space: nowrap;
}

/* --- Match Detail Page --- */
.match-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.vs-glow {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow), 0 0 60px var(--primary-glow);
}

.vs-score {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 640px) { .vs-score { font-size: 4.5rem; } }

.winner-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #FFE3A6, #FFC864);
  color: #5C3A05;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(255, 200, 100, 0.3);
}

.stat-label-sm {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-value-lg {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
}

/* --- Timeline (match detail) --- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
  padding-left: 24px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--bg);
  z-index: 1;
}

.timeline-dot.win {
  border-color: var(--gold);
  background: var(--gold-light);
  box-shadow: 0 0 8px var(--gold-glow);
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.timeline-time.win { color: var(--gold); }

.timeline-text {
  font-size: 0.875rem;
  color: var(--text);
}

.timeline-text.win {
  font-weight: 500;
  color: var(--gold);
}

.timeline-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* --- Search & Sort --- */
.search-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 16px 10px 40px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 150, 60, 0.3);
}

.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.sort-select {
  padding: 10px 36px 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23988D77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.sort-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 150, 60, 0.3);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(60, 48, 28, 0.30); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(60, 48, 28, 0.50); }

/* --- Utility --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
/* --- Mobile UI adaptation --- */
@media (max-width: 768px) {
  .page-header { padding: 80px 0 36px; }
  .page-header h1 { font-size: 2rem; }
  .section { padding: 48px 0; }
  .section-title h2, .section-title .font-display { font-size: 1.375rem; }
  .stat-card { padding: 16px 18px; }
  .glass-card { border-radius: var(--radius-md); }
}

@media (max-width: 640px) {
  /* nav: compact */
  .nav-inner { padding: 0 12px; gap: 8px; }
  .nav-brand span { display: none; }
  .nav-links { gap: 2px; }
  .nav-link { padding: 7px; font-size: 0.8125rem; }
  .hero-content h1 { font-size: 2.25rem; }
  .hero-badge { font-size: 0.6875rem; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 260px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* form rows wrap */
  .flex.gap-2 { flex-wrap: wrap; }
  .flex.gap-2 > .input-wrapper { flex: 1 1 100%; min-width: 0; }
  .flex.gap-2 > button { flex-shrink: 0; }

  /* tables scroll */
  table { font-size: 0.8125rem; }
  .player-card { padding: 14px; }
  .player-card-name { font-size: 0.9375rem; }
  .glass-card { padding: 20px 16px; }
  .grid-3 { gap: 12px; }

  /* page sections */
  .section-title { margin-bottom: 16px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
  .footer-copyright { font-size: 0.75rem; }

  /* match detail / schedule */
  .match-card-body { padding: 16px; }
  .vs-score { font-size: 2.75rem; }

  /* me page */
  .flex.items-center.gap-4 { flex-wrap: wrap; }
  input[type="file"] { max-width: 100%; }
}

/* --- Hero actions: 5 buttons + entrance animations --- */
.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
}

.btn-hero {
  animation: heroBtnIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform;
}
.btn-hero:nth-child(1) { animation-delay: 0.05s; }
.btn-hero:nth-child(2) { animation-delay: 0.15s; }
.btn-hero:nth-child(3) { animation-delay: 0.25s; }
.btn-hero:nth-child(4) { animation-delay: 0.35s; }
.btn-hero:nth-child(5) { animation-delay: 0.45s; }

@keyframes heroBtnIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.btn-lg {
  padding: 16px 44px;
  font-size: 1.125rem;
}

.btn-hero-main {
  background: linear-gradient(135deg, #E8963C, #D9782B);
  box-shadow: 0 0 32px var(--primary-glow), 0 8px 24px rgba(232, 150, 60, 0.28);
  border-radius: 999px;
}

.btn-hero-main:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 48px var(--primary-glow), 0 14px 32px rgba(232, 150, 60, 0.35);
}

/* Smooth interaction animation for all buttons */
.btn {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease,
              background 0.25s ease,
              color 0.25s ease,
              opacity 0.25s ease;
}
.btn:active { transform: scale(0.96); }
.btn-outline:hover { transform: translateY(-2px) scale(1.03); }

@media (max-width: 640px) {
  .hero-actions .btn { padding: 12px 18px; font-size: 0.875rem; }
  .hero-actions .btn-lg { padding: 14px 28px; font-size: 1rem; order: -1; width: 100%; }
  .hero-actions .btn-hero-main { order: -1; }
}

/* ============================================================
   UICraft polish layer: a11y + visual + motion + mobile + tokens
   ============================================================ */

/* --- A11y: visible keyboard focus --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- A11y: respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-hero, .hero-orb, .live-pulse, .live-dot { animation: none !important; }
}

/* --- Visual: hero refinements --- */
.hero { position: relative; }
/* smooth fade from the dark hero into the light content */
.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 5;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(232, 150, 60, 0.08), transparent 70%),
    radial-gradient(ellipse 40% 30% at 15% 20%, rgba(255, 200, 100, 0.06), transparent 70%);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 150, 60, 0.14);
}
.gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  letter-spacing: 0.01em;
}

/* --- Visual: cards & sections --- */
.glass-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(232, 150, 60, 0.22);
}
.section-shaded .section-title {
  position: relative;
}
.section-title h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

/* --- Visual: stat numbers --- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* --- Mobile: touch targets & details --- */
@media (max-width: 640px) {
  a, button, input, select, textarea {
    min-height: 44px;
  }
  .nav-link { min-height: 40px; }
  .stat-grid, .stats-grid { gap: 12px; }
  .hero-badge { font-size: 0.75rem; padding: 6px 12px; }
  .section-title h2 { font-size: 1.25rem; }
  .page-header p { font-size: 0.875rem; }
  .match-card-body .vs-score { font-size: 2.25rem; }
  .glass-card { padding: 18px 14px; }
  .player-stats { gap: 8px; }
}

/* --- Shared utility classes (inline-style convergence) --- */
.u-flex { display: flex; align-items: center; }
.u-flex-col { display: flex; flex-direction: column; }
.u-justify-between { justify-content: space-between; }
.u-gap-2 { gap: 8px; }
.u-gap-3 { gap: 12px; }
.u-wrap { flex-wrap: wrap; }
.u-text-center { text-align: center; }
.u-mt-1 { margin-top: 4px; }
.u-mt-2 { margin-top: 8px; }
.u-mt-3 { margin-top: 12px; }
.u-mb-2 { margin-bottom: 8px; }
.u-full { width: 100%; }
.u-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- language switcher dropdown --- */
.nav-lang-wrap {
    position: relative;
    display: inline-flex;
}
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    line-height: 1;
}
.lang-toggle:hover { color: var(--text); border-color: var(--primary); }
.nav-lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 70;
    min-width: 170px;
    padding: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 2px;
    max-height: 320px;
    overflow-y: auto;
}
.nav-lang-wrap:hover .nav-lang-menu,
.nav-lang-wrap:focus-within .nav-lang-menu { display: flex; }
.nav-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nav-lang-item:hover { background: var(--surface-alt); color: var(--text); }
.nav-lang-item.is-active { color: var(--text); background: var(--surface-alt); font-weight: 600; }
.nav-lang-item .lang-code {
    min-width: 30px;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    font-family: var(--font-display);
}
.nav-lang-item .lang-label { flex: 1; }
.nav-lang-item .lang-check { color: var(--primary); }
@media (max-width: 640px) {
    .nav-lang-menu { min-width: 150px; }
    .lang-toggle-label { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
