/* Zoka - Premier League Dark Theme with Coursera-level Refined Vietnamese Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800;900&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&subset=vietnamese,latin,latin-ext&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
  --color-orange: #ef4427;
  --color-orange-dark: #b82d15;
  --color-dark: #09090b;
  --color-panel: #121215;
  --color-neon-green: #00ff85;
  --color-coral-red: #eb003c;
  --color-cyan: #00e5ff;
  --color-gold: #ffd700;
  --scrollbar-track: #18181b;
  --scrollbar-thumb: #52525b;
  
  --font-body: 'Source Sans 3', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Source Sans 3', sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: #09090b;
  color: #f8fafc;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(239, 68, 39, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(239, 68, 39, 0.04) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 12V20M12 16H20' stroke='rgba(255,255,255,0.04)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-attachment: fixed;
  min-height: 100vh;
}

/* Refined Typography (Coursera style: crisp, balanced, no clipping of Vietnamese diacritics) */
.font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  font-weight: 800;
  text-rendering: optimizeLegibility;
}

.font-subheading {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  font-weight: 700;
}

/* Google Material Icons & Symbols styling */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', 'Material Icons Outlined', 'Material Icons', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.material-icons-outlined {
  font-family: 'Material Icons Outlined', 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

.material-icons { font-family: 'Material Icons', 'Material Symbols Outlined', sans-serif; font-feature-settings: 'liga'; }

/* Modern Tactical Plus (+) Grid Pattern */
.bg-pattern-plus,
.bg-speed-lines,
.bg-speed-lines-neon {
  background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 12V20M12 16H20' stroke='rgba(255,255,255,0.08)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 32px 32px;
}

.bg-pattern-plus-orange {
  background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 12V20M12 16H20' stroke='rgba(239,68,39,0.12)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 32px 32px;
}

/* Glow effects */
.glow-orange {
  box-shadow: 0 0 25px rgba(239, 68, 39, 0.35);
}

.glow-orange-sm {
  box-shadow: 0 0 10px rgba(239, 68, 39, 0.25);
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(18, 18, 21, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-hover {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-panel-hover:hover {
  background: rgba(24, 24, 28, 0.95);
  border-color: rgba(239, 68, 39, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbars */
html[data-theme="light"] {
  --scrollbar-track: #e5e7eb;
  --scrollbar-thumb: #9ca3af;
}

html {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ef4427;
}
::-webkit-scrollbar-thumb:active {
  background: #c93117;
}

/* Football Pitch Visualizer */
.pitch-container {
  background: #1b5e20;
  background-image: 
    repeating-linear-gradient(0deg, #1b5e20, #1b5e20 40px, #2e7d32 40px, #2e7d32 80px);
  position: relative;
  border: 4px solid #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.pitch-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* EA FC / FIFA Card Frame Style */
.fifa-card {
  width: 320px;
  height: 480px;
  background: linear-gradient(135deg, #1e0024 0%, #37003c 50%, #0a000c 100%);
  border: 2px solid #00ff85;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 133, 0.3);
  overflow: hidden;
}

.fifa-card.gold {
  background: linear-gradient(135deg, #443003 0%, #d4af37 50%, #291b00 100%);
  border-color: #ffd700;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 25px rgba(255, 215, 0, 0.4);
}

.fifa-card.special {
  background: linear-gradient(135deg, #09001f 0%, #4b0082 50%, #eb003c 100%);
  border-color: #00e5ff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 25px rgba(0, 229, 255, 0.4);
}

/* Responsive global navigation and theme switcher */
.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border-radius: 0.8rem;
  color: #d4d4d8;
  font-size: 0.92rem;
  font-weight: 700;
}
.mobile-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.mobile-nav-link.is-active { color: #EF4427; background: rgba(239,68,39,.12); }
.top-nav-link { color: #a1a1aa; }
.top-nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.top-nav-link.is-active { color: #EF4427; background: rgba(239,68,39,.12); }
.tournament-card__sport-label { color: #fff !important; }
.mobile-nav-primary { background: #ef4427; color: #fff; }
.mobile-nav-primary:hover { background: #d8381d; color: #fff; }
.mobile-theme-choice {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid rgba(161,161,170,.3);
  border-radius: .75rem;
  color: #d4d4d8;
  font-size: .78rem;
  font-weight: 700;
}
.theme-choice.is-theme-selected { background: rgba(239,68,39,.18); color: #ff7b63; }

/* A shared, class-compatible light palette for the Tailwind-built pages. */
html[data-theme="light"] body {
  background-color: #f3f5f8 !important;
  background-image: none !important;
  color: #1f2937 !important;
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] nav.sticky,
html[data-theme="light"] #mobile-menu-panel,
html[data-theme="light"] [class*="bg-[#0e0e11]"],
html[data-theme="light"] [class*="bg-[#09090b]"],
html[data-theme="light"] [class*="bg-[#0a0a0c]"],
html[data-theme="light"] [class*="bg-[#121215]"],
html[data-theme="light"] [class*="bg-[#141418]"],
html[data-theme="light"] [class*="bg-[#111114]"],
html[data-theme="light"] [class*="bg-zinc-950"],
html[data-theme="light"] [class*="bg-zinc-900"],
html[data-theme="light"] [class*="bg-zinc-800"] {
  background-color: #fff !important;
}
html[data-theme="light"] [class~="bg-[#EF4427]"] { background-color: #b8321d !important; }
html[data-theme="light"] [class~="bg-[#d8381d]"] { background-color: #a52a18 !important; }
html[data-theme="light"] [class*="text-white"],
html[data-theme="light"] [class*="text-zinc-100"],
html[data-theme="light"] [class*="text-zinc-200"],
html[data-theme="light"] [class*="text-zinc-300"],
html[data-theme="light"] [class*="text-slate-100"],
html[data-theme="light"] [class*="text-slate-200"],
html[data-theme="light"] [class*="text-slate-300"] {
  color: #202938 !important;
}
html[data-theme="light"] [class*="text-zinc-400"],
html[data-theme="light"] [class*="text-zinc-500"] {
  color: #596579 !important;
}
html[data-theme="light"] [class*="text-zinc-600"] {
  color: #6b7280 !important;
}
html[data-theme="light"] [class*="border-zinc-800"],
html[data-theme="light"] [class*="border-zinc-700"],
html[data-theme="light"] [class*="border-white/"] {
  border-color: #d9dee7 !important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #fff !important;
  color: #1f2937 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] [class~="text-white"][class~="bg-[#EF4427]"],
html[data-theme="light"] [class~="bg-[#EF4427]"] [class~="text-white"],
html[data-theme="light"] [class~="bg-[#d8381d]"] [class~="text-white"],
html[data-theme="light"] .tournament-hero-create-cta > i,
html[data-theme="light"] .mobile-nav-primary,
html[data-theme="light"] .mobile-nav-primary:hover {
  color: #fff !important;
}
html[data-theme="light"] .mobile-nav-link:hover { background: #fff1eb; color: #7c2d12 !important; }
html[data-theme="light"] .mobile-nav-link.is-active { color: #a52a18 !important; background: #fff0ed; }
html[data-theme="light"] .mobile-nav-link { color: #475467 !important; }
html[data-theme="light"] .top-nav-link { color: #475467; }
html[data-theme="light"] .top-nav-link:hover { color: #7c2d12; background: #fff1eb; }
html[data-theme="light"] .top-nav-link.is-active { color: #a52a18; background: #fff0ed; }
html[data-theme="light"] #user-profile-dropdown a:hover,
html[data-theme="light"] #user-profile-dropdown button:hover {
  color: #7c2d12 !important;
  background: #fff1eb !important;
  border-color: #f2b8a6 !important;
}
html[data-theme="light"] #user-profile-dropdown a:hover .material-symbols-outlined,
html[data-theme="light"] #user-profile-dropdown button:hover .material-symbols-outlined { color: #b8321d !important; }
html[data-theme="light"] .mobile-nav-primary { background: #b8321d; color: #fff !important; }
html[data-theme="light"] .mobile-nav-primary:hover { background: #a52a18; color: #fff !important; }
html[data-theme="light"] .theme-choice { color: #374151; }
html[data-theme="light"] .theme-choice.is-theme-selected { color: #c93117; background: #fff0ed; }

@media (max-width: 640px) {
  body { overflow-x: hidden; }
  main { min-width: 0; }
  table { font-size: .72rem; }
}

/* Shared type scale: both themes render each text utility at the same size. */
body {
  font-size: 16px !important;
  line-height: 1.55;
}
[class~="text-xs"] { font-size: .875rem !important; line-height: 1.35 !important; }
[class~="text-sm"] { font-size: .975rem !important; }
[class~="text-[9px]"] { font-size: .78rem !important; line-height: 1.25 !important; }
[class~="text-[10px]"] { font-size: .82rem !important; line-height: 1.3 !important; }
[class~="text-[11px]"] { font-size: .86rem !important; line-height: 1.35 !important; }
[class~="text-[8px]"] { font-size: .75rem !important; line-height: 1.25 !important; }

html[data-theme="light"] [class*="text-zinc-400"],
html[data-theme="light"] [class*="text-zinc-500"],
html[data-theme="light"] [class*="text-zinc-600"],
html[data-theme="light"] [class*="text-slate-400"],
html[data-theme="light"] [class*="text-slate-500"],
html[data-theme="light"] [class*="text-slate-600"],
html[data-theme="light"] [class*="text-gray-400"],
html[data-theme="light"] [class*="text-gray-500"] { color: #475467 !important; }
html[data-theme="light"] [class*="text-emerald-300"],
html[data-theme="light"] [class*="text-emerald-400"],
html[data-theme="light"] [class*="text-green-300"],
html[data-theme="light"] [class*="text-green-400"] { color: #067647 !important; }
html[data-theme="light"] [class*="text-amber-300"],
html[data-theme="light"] [class*="text-amber-200"],
html[data-theme="light"] [class*="text-amber-400"],
html[data-theme="light"] [class*="text-yellow-300"],
html[data-theme="light"] [class*="text-yellow-400"] { color: #854d0e !important; }
html[data-theme="light"] [class*="text-red-300"],
html[data-theme="light"] [class*="text-red-400"],
html[data-theme="light"] [class*="text-red-500"],
html[data-theme="light"] [class*="text-rose-300"],
html[data-theme="light"] [class*="text-rose-400"] { color: #b42318 !important; }
html[data-theme="light"] [class*="text-cyan-300"],
html[data-theme="light"] [class*="text-cyan-400"] { color: #006b80 !important; }
html[data-theme="light"] [class*="text-blue-400"],
html[data-theme="light"] [class*="text-sky-400"] { color: #175cd3 !important; }
html[data-theme="light"] [class*="text-purple-300"],
html[data-theme="light"] [class*="text-purple-400"] { color: #6941c6 !important; }
html[data-theme="light"] [class*="text-teal-400"] { color: #0f766e !important; }
html[data-theme="light"] [class*="text-orange-400"],
html[data-theme="light"] [class*="text-orange-200"],
html[data-theme="light"] [class*="text-[#EF4427]"] { color: #b8321d !important; }
html[data-theme="light"] [style*="color: white"],
html[data-theme="light"] [style*="color:white"],
html[data-theme="light"] [style*="color: #fff"],
html[data-theme="light"] [style*="color:#fff"],
html[data-theme="light"] [class*="text-[#fff]"],
html[data-theme="light"] [class*="text-[#f8fafc]"] { color: #202938 !important; }

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #596579 !important; opacity: 1; }
html[data-theme="light"] a:focus-visible,
html[data-theme="light"] button:focus-visible,
html[data-theme="light"] input:focus-visible,
html[data-theme="light"] select:focus-visible { outline: 2px solid #b8321d; outline-offset: 2px; }

/* Softer table separators in light mode. */
html[data-theme="light"] .divide-zinc-800 > :not([hidden]) ~ :not([hidden]),
html[data-theme="light"] .divide-zinc-800\/60 > :not([hidden]) ~ :not([hidden]) { border-color: #e6e9ee !important; }

/* The tournament landing page uses intentionally dark utility cards; restyle them with the page theme. */
html[data-theme="light"] body[data-page="index"] { background: #f5f7fa !important; color: #202938 !important; }
html[data-theme="light"] body[data-page="index"] section.bg-gradient-to-b,
html[data-theme="light"] body[data-page="index"] [class*="bg-gradient-to-br"] { background-image: none !important; background-color: #fff !important; }
html[data-theme="light"] body[data-page="index"] [class*="bg-[#09090b]"],
html[data-theme="light"] body[data-page="index"] [class*="bg-[#0c0c0e]"],
html[data-theme="light"] body[data-page="index"] [class*="bg-[#0a0a0c]"],
html[data-theme="light"] body[data-page="index"] [class*="bg-[#121215]"],
html[data-theme="light"] body[data-page="index"] [class*="bg-[#16161b]"],
html[data-theme="light"] body[data-page="index"] [class*="bg-[#141418]"],
html[data-theme="light"] body[data-page="index"] [class*="bg-zinc-900"],
html[data-theme="light"] body[data-page="index"] [class*="bg-zinc-800"] { background-color: #fff !important; }
html[data-theme="light"] body[data-page="index"] [class*="border-zinc-800"],
html[data-theme="light"] body[data-page="index"] [class*="border-zinc-700"] { border-color: #e1e5eb !important; }
html[data-theme="light"] body[data-page="index"] .bg-pattern-plus { opacity: .08 !important; }
html[data-theme="light"] body[data-page="index"] nav,
html[data-theme="light"] body[data-page="index"] #mobile-menu-panel { background-color: rgb(255 255 255 / .96) !important; border-color: #e1e5eb !important; }
html[data-theme="light"] body[data-page="index"] footer { background-color: #eef1f5 !important; border-color: #e1e5eb !important; }
html[data-theme="light"] .public-final-block { background-image: none !important; background-color: #fffaf0 !important; border-color: #e8c76b !important; }
html[data-theme="light"] .public-final-block [class*="bg-black/"] { background-color: #fff !important; }

/* Keep every orange action control readable in light mode, including hover-only and nested-label variants. */
html[data-theme="light"] :is(a, button, [role="button"]):is(
  [class*="bg-[#EF4427]"], [class*="bg-[#ef4427]"], [class*="bg-[#d8381d]"],
  [class*="bg-zoka-orange"], [class*="bg-orange-500"], [class*="bg-orange-600"], [class*="bg-orange-700"]
),
html[data-theme="light"] :is(a, button, [role="button"]):is(
  [class*="hover:bg-[#EF4427]"], [class*="hover:bg-[#ef4427]"], [class*="hover:bg-[#d8381d]"],
  [class*="hover:bg-zoka-orange"], [class*="hover:bg-orange-500"], [class*="hover:bg-orange-600"], [class*="hover:bg-orange-700"]
):hover {
  color: #fff !important;
}
html[data-theme="light"] :is(a, button, [role="button"]):is(
  [class*="bg-[#EF4427]"], [class*="bg-[#ef4427]"], [class*="bg-[#d8381d]"],
  [class*="bg-zoka-orange"], [class*="bg-orange-500"], [class*="bg-orange-600"], [class*="bg-orange-700"]
) *,
html[data-theme="light"] :is(a, button, [role="button"]):is(
  [class*="hover:bg-[#EF4427]"], [class*="hover:bg-[#ef4427]"], [class*="hover:bg-[#d8381d]"],
  [class*="hover:bg-zoka-orange"], [class*="hover:bg-orange-500"], [class*="hover:bg-orange-600"], [class*="hover:bg-orange-700"]
):hover * {
  color: #fff !important;
}

/* Reduce oversized page spacing while retaining the established responsive layout. */
body main > :is(div, section, header)[class*="py-"] {
  padding-block: clamp(1.5rem, 3.5vw, 2.75rem) !important;
}
body main [class*="gap-8"] { gap: 1.5rem !important; }
body main [class*="gap-10"] { gap: 1.75rem !important; }
body main [class*="gap-12"] { gap: 2.25rem !important; }
body main [class*="space-y-8"] > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem !important; }
body main [class*="space-y-10"] > :not([hidden]) ~ :not([hidden]) { margin-top: 1.75rem !important; }
body main [class*="space-y-12"] > :not([hidden]) ~ :not([hidden]) { margin-top: 2.25rem !important; }

.dual-range-control { position: relative; height: 1.5rem; margin-inline: .25rem; }
.dual-range-track { position: absolute; top: 50%; right: 0; left: 0; height: 4px; border-radius: 999px; background: linear-gradient(to right, #3f3f46 var(--range-start, 0%), #ef4427 var(--range-start, 0%), #ef4427 var(--range-end, 100%), #3f3f46 var(--range-end, 100%)); transform: translateY(-50%); }
.dual-range-control input[type="range"] { position: absolute; inset: 0; width: 100%; height: 1.5rem; margin: 0; appearance: none; background: transparent; pointer-events: none; }
.dual-range-control input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.dual-range-control input[type="range"]::-moz-range-track { height: 4px; background: transparent; }
.dual-range-control input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: #ef4427; box-shadow: 0 1px 5px #0008; pointer-events: auto; cursor: grab; }
.dual-range-control input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #ef4427; box-shadow: 0 1px 5px #0008; pointer-events: auto; cursor: grab; }
.dual-range-control input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid rgb(239 68 39 / .35); outline-offset: 2px; }
.dual-range-control input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid rgb(239 68 39 / .35); outline-offset: 2px; }
body main > section.sports-strip { padding-block: clamp(.75rem, 1.75vw, 1.375rem) !important; }
