@import url('https://fonts.googleapis.com/css2?family=Anton&family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,600&display=swap');

:root {
  --bg: #121212;
  --bg-raised: #1b1b1b;
  --bg-card: #202020;
  --line: #333333;
  --gold: #ffc72c;
  --gold-dim: #caa020;
  --crimson: #d7263d;
  --cream: #f5f1e6;
  --muted: #a39c8c;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --font-display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

body {
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 60px);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #151515 0%, #101010 100%);
  border-bottom: 4px solid var(--gold);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
}

.wordmark .logo-text {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--crimson);
  line-height: 1;
}

.wordmark .logo-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: none;
}

@media (min-width: 640px) {
  .wordmark .logo-sub { display: block; }
}

.search-wrap {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--bg-raised);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input::placeholder { color: var(--muted); }

.search-input:focus { border-color: var(--gold); }

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 340px;
  overflow-y: auto;
  display: none;
  z-index: 60;
}

.search-results.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover,
.search-result-item.active {
  background: rgba(255, 199, 44, 0.1);
}

.search-result-name {
  font-weight: 700;
  font-size: 14px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.search-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Winner toggle ---------- */

.winner-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}

.winner-toggle-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.switch input:checked ~ .switch-track {
  background: rgba(255, 199, 44, 0.18);
  border-color: var(--gold);
}

.switch input:checked ~ .switch-track .switch-thumb {
  transform: translateX(18px);
  background: var(--gold);
}

.winner-toggle:hover .winner-toggle-label { color: var(--cream); }

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 199, 44, 0.12), transparent 60%);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 64px);
  color: var(--cream);
  margin: 0 0 10px;
  letter-spacing: 1px;
}

.hero h1 span { color: var(--gold); }

.hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.trophy {
  font-size: 34px;
  margin-bottom: 6px;
}

/* ---------- Section heading ---------- */

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 44px 0 20px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--cream);
}

.section-heading .count {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Season grid ---------- */

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}

.season-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.season-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--crimson));
  opacity: 0;
  transition: opacity 0.15s ease;
}

.season-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dim);
  box-shadow: var(--shadow);
}

.season-card:hover::before { opacity: 1; }

.season-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.season-num strong {
  font-size: 34px;
  display: block;
  color: var(--cream);
  line-height: 1.1;
}

.season-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.season-contestants {
  font-size: 13px;
  line-height: 1.7;
  color: var(--cream);
}

.season-winner {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.season-winner.spoiler-hidden,
.episode-facts .fact-winner.spoiler-hidden {
  color: var(--muted);
  font-style: italic;
}

/* ---------- Season page ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.back-link:hover { color: var(--gold); }

.season-header {
  padding: 24px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.season-header .eyebrow {
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 1px;
  font-size: 14px;
}

.season-header h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 44px);
  margin: 4px 0 16px;
}

.contestant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  font-size: 13px;
}

.chip.winner {
  background: rgba(255, 199, 44, 0.12);
  border-color: var(--gold-dim);
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Episode grid ---------- */

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding-bottom: 70px;
}

.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.episode-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-ep-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 15, 15, 0.85);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.15s ease;
}

.episode-card:hover .play-overlay { background: rgba(0, 0, 0, 0.25); }

.play-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(215, 38, 61, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.episode-card:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

.play-icon svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }

.episode-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.episode-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

.episode-facts {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.episode-facts .fact-winner { color: var(--gold); font-weight: 600; }

.watch-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--crimson);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: background 0.15s ease;
}

.watch-btn:hover { background: #b81f34; }

.watch-btn svg { width: 14px; height: 14px; fill: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.site-footer a { color: var(--gold); }

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