:root {
  --bg: #0f1624;
  --bg-elev: #172033;
  --bg-card: #1c263b;
  --bg-card-hover: #232f48;
  --border: #2a3752;
  --border-strong: #3a4a6a;
  --text: #e8edf5;
  --text-muted: #9aa7bc;
  --text-dim: #6b7a94;
  --accent: #f0b840;
  --accent-soft: #f0b84022;
  --accent-strong: #e0a320;
  --success: #4caf84;
  --danger: #e05555;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--text);
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
}

p {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 22, 36, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.brand-text h1 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.hero {
  padding: 60px 24px 48px;
  background: linear-gradient(180deg, #131c2f 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: center;
}

.hero-copy h2 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-copy p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  font-family: inherit;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-card);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hero-card {
  display: flex;
  justify-content: center;
}

.tv-frame {
  width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tv-screen {
  width: 260px;
  height: 180px;
  background: linear-gradient(135deg, #1a2340, #0d1525);
  border: 6px solid #2a3555;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(240, 184, 64, 0.08), var(--shadow);
}

.tv-static {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 3px);
  animation: static-move 8s linear infinite;
}

@keyframes static-move {
  from { transform: translateY(0); }
  to { transform: translateY(3px); }
}

.tv-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
}

.tv-time {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.tv-network {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.tv-show {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tv-base {
  width: 120px;
  height: 10px;
  background: #2a3555;
  border-radius: 0 0 8px 8px;
  margin-top: -2px;
}

.explore-section,
.lineup-section,
.about-section,
.era-section {
  padding: 56px 24px;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 28px;
}

.section-header h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  max-width: 640px;
}

.decade-tabs {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.decade-tab {
  padding: 8px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.decade-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.decade-tab.active {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
}

.filter-row {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.results-meta {
  max-width: var(--max-width);
  margin: 0 auto 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.show-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.show-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
}

.show-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.show-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.show-card h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.show-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.show-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.show-tag.genre {
  color: var(--accent);
  border-color: #f0b84040;
}

.show-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.show-card .star-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.show-card .star-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.show-card .star-btn.saved {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.show-card .details-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-align: left;
  margin-top: auto;
}

.empty-state {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.lineup-section {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lineup-actions {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lineup-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.lineup-empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.about-content,
.era-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.about-block,
.era-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.about-block h3,
.era-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.about-block p,
.era-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-note {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.modal-content {
  padding: 28px;
}

.modal-content h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.modal-content .modal-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.modal-content .modal-body {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.modal-content .modal-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-content .modal-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.modal-content .rec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-content .rec-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s;
}

.modal-content .rec-item:hover {
  border-color: var(--accent);
  color: var(--text);
}

.modal-content .rec-item strong {
  color: var(--text);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-card {
    order: -1;
  }
  .hero-copy h2 {
    font-size: 1.8rem;
  }
  .site-nav {
    gap: 14px;
  }
  .site-nav a {
    font-size: 0.82rem;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .hero {
    padding: 40px 16px 32px;
  }
  .explore-section,
  .lineup-section,
  .about-section,
  .era-section {
    padding: 40px 16px;
  }
  .filter-row {
    flex-direction: column;
    gap: 14px;
  }
  .tv-frame {
    width: 240px;
  }
  .tv-screen {
    width: 220px;
    height: 150px;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
