:root {
  --bg: #09090f;
  --card: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f7ff;
  --muted: #b0b7d4;
  --accent: #6f8cff;
  --accent-2: #24d3ff;
  --ok: #37e7a6;
  --warn: #ffd166;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  min-height: 100%;
  background:
    radial-gradient(1000px 600px at 12% 8%, #141634 0%, transparent 46%),
    radial-gradient(900px 500px at 90% 16%, #102230 0%, transparent 42%),
    var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 340px;
  height: 340px;
  left: -90px;
  top: -90px;
  background: #3f66ff;
  opacity: 0.35;
}

.orb-2 {
  width: 360px;
  height: 360px;
  right: -100px;
  bottom: 80px;
  background: #19d3ff;
  opacity: 0.2;
}

.topbar,
main,
footer {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo {
  letter-spacing: 0.14em;
  font-weight: 800;
}

main {
  padding: 24px 20px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(9px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
}

.hero {
  padding: 34px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent-2);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  line-height: 1.08;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.55;
}

.meta-row {
  margin-top: 20px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.meta-value {
  margin-top: 4px;
  font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  font-weight: 700;
}

.filters {
  margin-top: 16px;
  padding: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
}

select {
  color-scheme: dark;
}

select option {
  background: #10131d;
  color: #f5f7ff;
}

.status {
  margin-top: 14px;
  padding: 14px;
  color: var(--muted);
}

.series-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.series-card {
  overflow: hidden;
}

.poster {
  width: 84%;
  max-height: 265px;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 10px auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at 30% 20%, rgba(111, 140, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.series-content {
  padding: 12px;
}

.series-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.series-title {
  margin: 0;
  font-size: 1rem;
}

.badge {
  font-size: 0.75rem;
  border-radius: 99px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  white-space: nowrap;
}

.badge.soon {
  border-color: rgba(55, 231, 166, 0.45);
  color: #d0ffe9;
}

.badge.mid {
  border-color: rgba(255, 209, 102, 0.45);
  color: #ffefc5;
}

.sub {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.provider-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.start-date-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(111, 140, 255, 0.45);
  background: rgba(111, 140, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.start-date-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #b9c7ff;
}

.start-date-value {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.launch-pill {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.launch-series {
  color: #d6fff0;
  background: rgba(55, 231, 166, 0.16);
  border-color: rgba(55, 231, 166, 0.45);
}

.launch-season {
  color: #e4ebff;
  background: rgba(111, 140, 255, 0.18);
  border-color: rgba(111, 140, 255, 0.5);
}

.provider-pill {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  border: 1px solid rgba(111, 140, 255, 0.34);
  color: #e0e8ff;
}

.provider-default {
  background: rgba(111, 140, 255, 0.15);
}

.provider-netflix {
  background: rgba(229, 9, 20, 0.22);
  border-color: rgba(229, 9, 20, 0.55);
}

.provider-amazon {
  background: rgba(0, 168, 225, 0.2);
  border-color: rgba(0, 168, 225, 0.55);
}

.provider-hbo {
  background: rgba(124, 77, 255, 0.22);
  border-color: rgba(124, 77, 255, 0.55);
}

.provider-wow {
  background: rgba(183, 255, 0, 0.18);
  border-color: rgba(183, 255, 0, 0.45);
  color: #1f2500;
}

.provider-disney {
  background: rgba(17, 60, 207, 0.24);
  border-color: rgba(17, 60, 207, 0.55);
}

.provider-apple {
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.55);
}

.provider-paramount {
  background: rgba(46, 197, 255, 0.2);
  border-color: rgba(46, 197, 255, 0.55);
}

.reliability {
  font-weight: 600;
}

.rel-high {
  color: #9effd2;
}

.rel-mid {
  color: #ffe7a6;
}

.rel-low {
  color: #ffb3b3;
}

.btn {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.note {
  margin-top: 16px;
  padding: 18px;
}

.note h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.chart-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.podium {
  margin-top: 14px;
  padding: 18px;
}

.podium-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.podium-item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  text-align: center;
}

.podium-first {
  min-height: 430px;
  border-color: rgba(55, 231, 166, 0.45);
}

.podium-second {
  min-height: 390px;
}

.podium-third {
  min-height: 370px;
}

.podium-rank {
  font-weight: 800;
  font-size: 1rem;
}

.podium-poster {
  width: 82%;
  max-height: 280px;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center;
  margin: 10px auto 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.podium-name {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.podium-imdb {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.rank-top {
  background: rgba(55, 231, 166, 0.2);
  border: 1px solid rgba(55, 231, 166, 0.45);
  color: #d6fff0;
}

.rank-strong {
  background: rgba(111, 140, 255, 0.2);
  border: 1px solid rgba(111, 140, 255, 0.45);
  color: #dce6ff;
}

.rank-normal {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f0f3ff;
}

.chart-link {
  display: inline-block;
  margin-top: 8px;
  color: #b8cbff;
  text-decoration: none;
  font-size: 0.86rem;
}

.chart-link:hover {
  text-decoration: underline;
}

footer {
  padding: 10px 20px 32px;
  text-align: center;
  color: #8790b8;
}

@media (max-width: 1024px) {
  .series-grid,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .filter-grid,
  .meta-row,
  .series-grid,
  .chart-grid,
  .podium-grid {
    grid-template-columns: 1fr;
  }

  /* On mobile, show podium in natural order: #1, #2, #3 */
  .podium-first {
    order: 1;
  }

  .podium-second {
    order: 2;
  }

  .podium-third {
    order: 3;
  }

  .hero {
    padding: 24px;
  }
}
