:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --accent-strong: #f97316;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted-strong);
  font-weight: 600;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  padding: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
}

.nav-dropdown-menu a:hover {
  background: rgba(51, 65, 85, 0.8);
  color: var(--accent);
}

.header-search {
  flex: 1 1 260px;
  max-width: 320px;
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 10px;
  background: transparent;
  color: var(--text);
}

.header-search button,
.search-button,
.btn-primary,
.btn-secondary,
.player-button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.search-button,
.btn-primary {
  background: var(--accent);
  color: #111827;
  font-weight: 800;
}

.header-search button {
  padding: 9px 12px;
}

.search-button,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(15, 23, 42, 0.66);
  color: var(--muted-strong);
}

.btn-primary:hover,
.search-button:hover,
.header-search button:hover,
.btn-secondary:hover,
.player-button:hover {
  transform: translateY(-1px);
}

.btn-primary:hover,
.search-button:hover,
.header-search button:hover {
  background: #fbbf24;
}

.btn-secondary:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--accent);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.32);
  color: var(--muted-strong);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 28%, rgba(2, 6, 23, 0.34) 68%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  margin: 0 0 26px;
  max-width: 650px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.meta-pills,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted-strong);
  font-size: 13px;
}

.pill.accent,
.meta-pill.accent {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-control {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.58);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
}

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 76px;
}

.page-hero {
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34%), linear-gradient(180deg, #0f172a, #020617);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-desc {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.section {
  margin-top: 56px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.movie-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.07);
  opacity: 0.78;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111827;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-badge span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.94);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.3);
}

.movie-card:hover .play-badge {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover .card-title {
  color: var(--accent);
}

.card-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  min-height: 176px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.58));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.38);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  color: var(--accent);
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateX(4px);
}

.rank-number {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  width: 82px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-copy h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px)) auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
  background: rgba(2, 6, 23, 0.46);
  color: var(--text);
}

.no-results {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  text-align: center;
}

.no-results.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--muted-strong);
}

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

.detail-hero {
  padding: 46px 0 34px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 32%), linear-gradient(180deg, #0f172a, #020617);
  border-bottom: 1px solid var(--line);
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.content-card,
.side-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card + .content-card,
.side-card + .side-card {
  margin-top: 22px;
}

.content-card h2,
.side-card h2,
.player-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p,
.side-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.player-card {
  overflow: hidden;
  margin-bottom: 28px;
}

.player-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.player-heading h2 {
  margin: 0;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.video-player video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-player.playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.95);
  color: #111827;
  font-size: 28px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.35);
}

.player-status {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: var(--muted-strong);
  font-size: 14px;
  text-align: center;
}

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

.episode-list a {
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.36);
  color: var(--muted-strong);
  text-align: center;
}

.episode-list a:hover,
.episode-list a.active {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

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

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

@media (max-width: 980px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    height: 76vh;
    min-height: 560px;
  }

  .hero-controls {
    right: 18px;
    bottom: 34px;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-layout,
  .detail-layout,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .page-main,
  .page-hero-inner,
  .detail-hero-inner,
  .footer-inner,
  .hero-content-wrap {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 18px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content-wrap {
    padding-bottom: 106px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-controls {
    left: 12px;
    right: auto;
    bottom: 48px;
  }

  .hero-dots {
    left: 12px;
    bottom: 22px;
  }

  .section-head {
    display: block;
  }

  .section-actions {
    margin-top: 14px;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 66px 1fr;
    gap: 12px;
  }

  .rank-cover {
    width: 66px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-title {
    font-size: 36px;
  }
}
