:root {
  --accent: #e63946;
  --accent-soft: rgba(230, 57, 70, 0.15);
  --accent-glow: rgba(230, 57, 70, 0.35);
  --bg: #0a0e17;
  --bg-elevated: #0f1524;
  --surface: #141b2d;
  --surface-hover: #1a2438;
  --text: #f0f4fc;
  --text-muted: #8b9bb8;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --header-h: 80px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  transition: background var(--transition);
}

.bg-orb--1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: var(--accent);
  opacity: 0.12;
}

.bg-orb--2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -100px;
  background: var(--accent);
  opacity: 0.08;
}

.bg-grid {
  position: absolute;
  inset: 0;
  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 at center, black 20%, transparent 75%);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.brand__tagline {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-right: 0.25rem;
  transition: background var(--transition), border-color var(--transition);
}

.nav__clock-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
  transition: color var(--transition);
}

.nav__clock-time {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav__theme-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform 0.15s;
}

.nav__theme-btn:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Main */
main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 5rem;
  padding-top: 1rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 1.25rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
  transition: background var(--transition);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
  transition: color var(--transition);
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 400px;
}

/* Player */
.player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: background var(--transition), border-color var(--transition);
}

.player-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, var(--bg));
}

.player-card__label {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.player-card__status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-card__status.is-live {
  color: var(--accent);
  font-weight: 600;
}

.player-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s;
  pointer-events: none;
}

.player-overlay.is-hidden {
  opacity: 0;
}

.play-btn {
  pointer-events: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px var(--accent-glow);
  transition: transform 0.2s, background var(--transition), box-shadow var(--transition);
}

.play-btn:hover {
  transform: scale(1.08);
}

/* Schedule */
.schedule-section {
  margin-bottom: 3rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 560px;
}

.schedule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.schedule-tab {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.schedule-tab:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.schedule-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.schedule-tab.is-today:not(.is-active) {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
}

.schedule-grid-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: background var(--transition), border-color var(--transition);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 0.9rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.schedule-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
}

.schedule-table td:first-child {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  width: 100px;
  transition: color var(--transition);
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table tr.is-current td {
  background: var(--accent-soft);
}

.schedule-table tr.is-current td:last-child {
  font-weight: 600;
}

.schedule-table tr:hover td {
  background: var(--surface-hover);
}

/* Week grid */
.schedule-full__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.schedule-week {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background var(--transition), border-color var(--transition);
}

.week-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.week-table th,
.week-table td {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.week-table th {
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: sticky;
  top: 0;
}

.week-table th.is-today {
  color: var(--accent);
  background: var(--accent-soft);
}

.week-table td.time-cell {
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--surface) 80%, var(--bg));
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.week-table td.is-today {
  background: var(--accent-soft);
}

.week-table td.is-current {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  font-weight: 600;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, var(--surface));
  transition: background var(--transition), border-color var(--transition);
}

.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__logo {
  height: 40px;
  opacity: 0.7;
}

/* Theme panel */
.theme-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.theme-panel.is-open {
  pointer-events: auto;
}

.theme-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition);
}

.theme-panel.is-open .theme-panel__backdrop {
  opacity: 1;
}

.theme-panel__drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  transition: transform var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.theme-panel.is-open .theme-panel__drawer {
  transform: translateX(0);
}

.theme-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.theme-panel__header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.theme-panel__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.theme-panel__close:hover {
  color: var(--text);
}

.theme-panel__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.theme-group label,
.theme-group__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.color-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.color-row input[type="color"] {
  width: 48px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  padding: 2px;
}

.color-row input[type="text"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: monospace;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  transition: background var(--transition), border-color var(--transition);
}

.theme-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.preset-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.15s;
}

.preset-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-1px);
}

.preset-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.reset-btn {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.reset-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .brand__tagline {
    font-size: 0.9rem;
  }

  .nav__link {
    display: none;
  }

  .nav__clock-label {
    display: none;
  }

  .nav__clock {
    padding: 0.4rem 0.65rem;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .header__inner {
    padding: 0 1rem;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  .brand__logo {
    height: 42px;
  }
}
