:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 6%, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(234, 88, 12, 0.13), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #070b16 100%);
}

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

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

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff7ed;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 35px rgba(245, 158, 11, 0.3);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
}

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

.nav-search {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.nav-search input {
  width: 190px;
  height: 100%;
  padding: 0 12px;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.nav-search button,
.section-action,
.hero-button,
.row-action,
.submit-button {
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}

.nav-search button {
  height: 100%;
  padding: 0 14px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
}

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

.hero {
  position: relative;
  min-height: 610px;
  margin: 28px auto 54px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 34px;
  align-items: end;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(251, 191, 36, 0.18), transparent 25rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 48%, rgba(2, 6, 23, 0.42) 100%);
}

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

.hero-content,
.hero-side {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 12px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, #f8fafc, #fbbf24 55%, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

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

.hero-tags,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.hero-tags span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  color: #fde68a;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.1);
}

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

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 15px;
}

.hero-button.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: none;
}

.hero-side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
}

.hero-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-card div {
  padding: 18px;
}

.hero-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.hero-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 30px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.section {
  margin: 58px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-card p,
.footer-shell p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-action,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  flex: 0 0 auto;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.86));
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.32);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  background: rgba(239, 68, 68, 0.9);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: block;
  overflow: hidden;
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-title:hover,
.rank-info a:hover,
.footer-links a:hover {
  color: #fbbf24;
}

.card-meta {
  margin: 8px 0 9px;
  color: #fbbf24;
  font-size: 13px;
}

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

.movie-card.compact .card-line {
  min-height: 0;
  -webkit-line-clamp: 1;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.2), transparent 12rem),
    rgba(15, 23, 42, 0.82);
}

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

.category-card .mini-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-card .mini-links a {
  color: #fde68a;
  font-size: 13px;
}

.page-hero {
  margin: 28px 0 34px;
  padding: 46px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 15%, rgba(245, 158, 11, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px 170px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

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

.filter-empty {
  display: none;
  margin: 20px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.74);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 90px minmax(0, 1fr) 86px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
}

.list-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-poster img {
  width: 90px;
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info a {
  display: inline-block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--soft);
  line-height: 1.65;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fde68a;
  font-size: 13px;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 340px;
  gap: 28px;
  margin: 28px 0 54px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

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

.breadcrumb a {
  color: #fde68a;
}

.detail-title {
  margin-bottom: 22px;
}

.detail-title p {
  max-width: 880px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.watch-room {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-stage {
  position: relative;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.76));
}

.play-overlay.is-hidden {
  display: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  font-size: 35px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 24px 60px rgba(245, 158, 11, 0.34);
}

.detail-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-panel p {
  color: var(--soft);
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 100px;
  align-self: start;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #111827;
}

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

.side-info {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.side-info dl {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.side-info dt {
  color: var(--muted);
}

.side-info dd {
  margin: 0;
  color: var(--text);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.7);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
}

.footer-brand {
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 880px) {
  .nav-shell {
    flex-wrap: wrap;
    min-height: 70px;
    padding: 12px 0;
  }

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

  .site-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding-top: 10px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: center;
  }

  .nav-search {
    order: 4;
    width: 100%;
    display: flex;
  }

  .nav-search input {
    width: 100%;
  }

  .hero {
    min-height: 690px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .hero-side {
    display: none;
  }

  .hero-dots {
    left: 34px;
  }

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

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

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

  .rank-row {
    grid-template-columns: 38px 74px minmax(0, 1fr);
  }

  .rank-poster img {
    width: 74px;
    height: 104px;
  }

  .row-action {
    grid-column: 2 / -1;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  main,
  .nav-shell,
  .footer-shell,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 20px;
  }

  .page-hero,
  .detail-panel {
    padding: 26px;
  }

  .hero {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero h1 {
    font-size: 38px;
  }

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

  .movie-grid,
  .category-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }
}
