:root {
  --bg: #f6f1e8;
  --ink: #1e2420;
  --muted: #6d746c;
  --panel: rgba(255, 252, 245, 0.86);
  --line: rgba(30, 36, 32, 0.12);
  --accent: #d05c32;
  --accent-2: #1f7567;
  --shadow: 0 24px 70px rgba(50, 43, 33, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", "Microsoft YaHei", serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(208, 92, 50, 0.18), transparent 30rem),
    radial-gradient(circle at 86% 16%, rgba(31, 117, 103, 0.16), transparent 24rem),
    linear-gradient(135deg, #f9f2e4 0%, #ece4d5 100%);
  min-height: 100vh;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 220px;
  max-height: 54px;
  object-fit: contain;
}

.brand-text {
  display: inline-block;
}

.topbar nav {
  display: flex;
  gap: 10px;
}

.topbar nav a,
.chips a,
.episodes a,
.pager a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.42);
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 60px;
}

.hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 30px;
  align-items: end;
  padding: 46px;
  border-radius: 38px;
  background:
    linear-gradient(130deg, rgba(30, 36, 32, 0.96), rgba(31, 117, 103, 0.82)),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 18rem);
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.95;
}

.hero p {
  max-width: 620px;
  color: rgba(255, 250, 240, 0.78);
  font-size: 18px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search {
  display: flex;
  padding: 10px;
  background: #fffaf0;
  border-radius: 999px;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 16px;
  background: transparent;
  font: inherit;
}

.search button {
  border: 0;
  color: white;
  background: var(--accent);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
}

.panel {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(50, 43, 33, 0.08);
  backdrop-filter: blur(10px);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
}

.chips,
.episodes,
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.card {
  min-width: 0;
}

.card a {
  display: block;
}

.cover,
.poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #ded4c2, #f5eddf);
  box-shadow: 0 18px 36px rgba(30, 36, 32, 0.14);
}

.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.card strong {
  display: block;
  margin-top: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card span,
.muted,
.section-title span,
.footer {
  color: var(--muted);
}

.detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
}

.detail h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 117, 103, 0.1);
}

.play-source {
  margin: 20px 0 12px;
}

.episodes a.active {
  color: #fff;
  background: var(--accent-2);
}

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #111;
}

.content {
  line-height: 1.9;
  color: #33382f;
}

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

.footer {
  padding: 40px 16px;
  text-align: center;
}

@media (max-width: 760px) {
  .hero,
  .detail {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .poster {
    max-width: 240px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}
