:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --danger: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.11), transparent 28rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand {
  font-size: 21px;
  white-space: nowrap;
}

.brand-mark,
.hero-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  color: white;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted-strong);
  font-size: 15px;
  flex: 1;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.text-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--accent);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 9px 6px 9px 12px;
}

.nav-search button,
.filter-selects button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.filter-selects button:hover,
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: white;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(2, 6, 23, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--muted-strong);
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: -22px;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.42);
  transform: scale(1.04);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(2, 6, 23, 0.82) 58%, #020617 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.65fr);
  gap: 46px;
  align-items: center;
  padding: 86px 0;
}

.hero-logo-line,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: clamp(18px, 2vw, 24px);
}

.hero-feature {
  display: grid;
  gap: 5px;
  max-width: 680px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

.hero-feature span,
.card-badge {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.hero-feature strong {
  font-size: 24px;
}

.hero-feature em {
  color: var(--muted-strong);
  font-style: normal;
}

.hero-tags,
.card-tags,
.detail-tags,
.tag-cloud,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 18px;
}

.hero-tags span,
.card-tags span,
.detail-tags a,
.tag-cloud a,
.meta-pills span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  padding: 6px 12px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-soft {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: white;
}

.btn-soft:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  padding: 8px 13px;
  color: white;
  font-weight: 700;
}

.hero-focus {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hero-focus-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  padding: 8px;
  color: white;
  font-weight: 700;
}

.hero-focus-card img {
  width: 70px;
  height: 66px;
  border-radius: 13px;
  object-fit: cover;
}

.section {
  padding: 70px 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.35);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2,
.tag-panel h2,
.player-section h2,
.content-card h2,
.category-overview-card h2,
.ranking-body h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.section-head a,
.text-link {
  color: var(--accent);
  font-weight: 800;
}

.compact {
  align-items: center;
}

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

.featured-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1e293b);
}

.card-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img,
.category-card:hover img,
.hero-focus-card:hover img,
.category-overview-card:hover img,
.ranking-card:hover img {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  padding: 5px 10px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  color: white;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.card-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.card-tags span {
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  padding: 18px;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 84px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  color: var(--muted-strong);
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.5fr);
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 82px 1fr 54px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  padding: 10px;
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--accent);
  font-weight: 900;
  text-align: right;
}

.tag-panel,
.content-card,
.filter-panel,
.category-overview-card,
.ranking-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.16);
}

.tag-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.tag-cloud {
  margin-top: 18px;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.movie-card-wide .card-cover img {
  height: 100%;
  min-height: 150px;
  aspect-ratio: auto;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 26rem), linear-gradient(135deg, #020617, #111827);
}

.small-hero {
  padding: 64px 0 54px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 10px 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.breadcrumbs {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
  padding: 16px;
}

.filter-search input,
.filter-selects select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: rgba(2, 6, 23, 0.68);
  color: white;
  padding: 12px 16px;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-selects select {
  min-width: 140px;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  overflow: hidden;
  padding: 16px;
}

.category-overview-cover {
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.category-overview-cover img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-overview-card p {
  color: var(--muted-strong);
}

.category-preview-links {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.category-preview-links a {
  color: var(--muted-strong);
}

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

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  overflow: hidden;
  padding: 12px;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.ranking-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.94);
  color: white;
  font-weight: 900;
}

.ranking-cover img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.ranking-body p {
  color: var(--muted-strong);
}

.ranking-body div {
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-bottom: 1px solid var(--line);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 50px 0 70px;
}

.detail-main {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail-info h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 20px;
}

.meta-pills,
.detail-tags {
  margin-top: 18px;
}

.player-section {
  padding-bottom: 30px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.25), rgba(2, 6, 23, 0.74) 58%, rgba(2, 6, 23, 0.9));
  color: white;
  cursor: pointer;
}

.player-start span {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 18px 55px rgba(245, 158, 11, 0.38);
  font-size: 28px;
}

.player-start strong {
  font-size: 22px;
}

.player-box.is-playing .player-start {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 26px;
}

.content-card p {
  color: var(--muted-strong);
  font-size: 17px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  font-size: 20px;
}

.site-footer p,
.site-footer a {
  color: var(--muted-strong);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

[hidden],
.movie-card.is-hidden,
.ranking-card.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 13px;
    font-size: 14px;
  }

  .nav-search input {
    width: 170px;
  }

  .movie-grid,
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .desktop-nav,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-inner,
  .split-section,
  .detail-main,
  .detail-content,
  .footer-grid,
  .filter-panel,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 520px;
  }

  .tag-panel {
    position: static;
  }

  .category-overview-card,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-inner {
    padding: 62px 0;
  }

  .hero-focus,
  .wide-grid,
  .movie-grid,
  .featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 34px 68px 1fr;
  }

  .rank-score {
    display: none;
  }

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

  .detail-info h1,
  .hero-copy h1,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }

  .player-start span {
    width: 68px;
    height: 68px;
  }
}
