:root {
  --bg: #0b0d0c;
  --bg-soft: #111512;
  --card: #161d18;
  --card-hover: #1b241e;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f1e6;
  --muted: #9da79c;
  --gold: #e6b84b;
  --gold-soft: rgba(230, 184, 75, 0.16);
  --green: #7dc45a;
  --red: #e45a4f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(125, 196, 90, 0.12), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(230, 184, 75, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
}

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

.hidden {
  display: none !important;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  font-size: 0.95rem;
}

.brand em {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 12px;
  height: 22px;
  background: linear-gradient(180deg, var(--gold), #b78522);
  clip-path: polygon(50% 0, 100% 28%, 100% 70%, 50% 100%, 0 70%, 0 28%);
  box-shadow: 0 0 18px rgba(230, 184, 75, 0.45);
}

.topbar-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.topbar-link:hover {
  color: var(--text);
  border-color: rgba(230, 184, 75, 0.5);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 70px;
}

.eyebrow {
  display: block;
  margin: 0 0 8px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 4.4rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.error {
  color: var(--red) !important;
}

.hero {
  position: relative;
  min-height: clamp(430px, 62vh, 610px);
  border-radius: 26px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(7, 9, 8, 0.96) 0%, rgba(7, 9, 8, 0.78) 42%, rgba(7, 9, 8, 0.2) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(11, 13, 12, 0.85), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: clamp(28px, 6vw, 72px);
}

.hero-content .lead {
  margin: 20px 0 28px;
  color: #d8ddd2;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 46ch;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, #f0c55a, #c9912d);
  color: #1b1405;
  box-shadow: 0 10px 30px rgba(230, 184, 75, 0.25);
}

.button.ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.button.ghost:hover {
  border-color: rgba(230, 184, 75, 0.45);
}

.section {
  padding-top: 54px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head .muted {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

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

.season-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--card), #111612);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.season-card:hover {
  transform: translateY(-3px);
  border-color: rgba(230, 184, 75, 0.5);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.season-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0c0a;
}

.season-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.season-card:hover .season-cover img {
  transform: scale(1.05);
}

.season-body {
  padding: 16px 18px 18px;
}

.season-body h3 {
  margin-bottom: 6px;
}

.season-body .muted {
  margin: 0;
  font-size: 0.86rem;
}

.page-head {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: end;
  background-image:
    linear-gradient(90deg, rgba(7, 9, 8, 0.94), rgba(7, 9, 8, 0.7) 55%, rgba(7, 9, 8, 0.35)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.page-head-content {
  padding: clamp(24px, 4vw, 46px);
}

.page-head-content .muted {
  margin: 12px 0 0;
}

.back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 18px;
  transition: color 0.2s ease;
}

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

.episode-section {
  padding-top: 26px;
}

.episode-list {
  display: grid;
  gap: 12px;
}

.episode-form {
  margin: 0;
}

.episode-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(90deg, var(--card), rgba(17, 22, 18, 0.65));
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

button.episode-row {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.episode-row:not(.unavailable):hover {
  transform: translateX(3px);
  border-color: rgba(125, 196, 90, 0.5);
  background: linear-gradient(90deg, var(--card-hover), rgba(17, 22, 18, 0.75));
}

button.episode-row:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.episode-thumb {
  width: 168px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #0a0c0a;
}

.episode-info {
  display: block;
  min-width: 0;
}

.episode-info h2,
.episode-title {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.episode-info .muted {
  display: block;
  margin: 0;
  font-size: 0.85rem;
}

.episode-action {
  white-space: nowrap;
  color: #1b1405;
  background: linear-gradient(135deg, #efc45c, #cd9b38);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.83rem;
}

.episode-action.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.episode-row.unavailable {
  opacity: 0.68;
}

.episode-row.unavailable:hover {
  transform: none;
}

.download-section {
  padding-top: 10px;
  max-width: 860px;
  margin: 0 auto;
}

.download-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(120deg, var(--card), #111612);
  box-shadow: var(--shadow);
}

.download-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.download-head h1 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  margin-bottom: 10px;
}

.download-head .muted {
  margin: 0;
}

.progress-card {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 22, 18, 0.75);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  box-shadow: 0 0 18px rgba(230, 184, 75, 0.35);
  transition: width 0.4s ease;
}

.progress-card .small {
  margin: 16px 0 0;
}

.progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer p {
  margin: 4px 0;
}

.footer a {
  color: var(--gold);
  text-decoration: none;
}

@media (max-width: 760px) {
  .topbar,
  main,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    min-height: 430px;
  }

  .hero-content {
    padding: 26px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .episode-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }

  .episode-thumb {
    width: 112px;
  }

  .episode-action {
    grid-column: 2;
    justify-self: start;
    padding: 8px 14px;
  }

  .download-card {
    grid-template-columns: 1fr;
  }

  .download-cover {
    max-width: 100%;
  }
}
