:root {
  color-scheme: light;
  --bg: #0f172a;
  --surface: #111827;
  --card: rgba(255, 255, 255, 0.92);
  --muted: #94a3b8;
  --text: #0f172a;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 45%, #020617 100%);
  color: #f8fafc;
  min-height: 100vh;
}

#root {
  padding: 1.5rem 0 3rem;
}

.hero {
  position: relative;
  padding: 4.5rem 6vw 3rem;
  overflow: hidden;
}

.hero__content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  margin: 0 0 0.75rem;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: #cbd5f5;
  margin: 0;
}

.hero__glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45), transparent 70%);
  top: -80px;
  right: 10%;
  filter: blur(10px);
  z-index: 1;
}

.app {
  background: #f8fafc;
  color: var(--text);
  margin: 0 6vw 3rem;
  border-radius: 24px;
  padding: 2rem 2.5rem 3rem;
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: end;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.controls__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.controls__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}

select,
input[type="text"] {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.match-count {
  font-weight: 600;
  color: #1e293b;
  align-self: center;
}

#filtered-info {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #64748b;
}

.back-button {
  border: none;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.35);
}

.search-input {
  margin: 1.5rem 0 1rem;
  width: min(420px, 100%);
}

.episodes-list,
.shows-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.episode-card,
.show-card {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.episode-card:hover,
.show-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.show-card h2,
.episode-card h3 {
  margin-top: 0;
}

.show-card img,
.episode-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 12px;
  grid-column: 1 / -1;
}

.loading,
.error {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  font-weight: 600;
}

.loading {
  background: rgba(56, 189, 248, 0.1);
  color: #0284c7;
}

.error {
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

footer {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #333;
}

@media (max-width: 720px) {
  .hero {
    padding: 3.5rem 6vw 2rem;
  }

  .app {
    margin: 0 4vw 2rem;
    padding: 1.5rem;
  }

  .controls {
    grid-template-columns: 1fr;
  }
}
