:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-2: #101b2e;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111c2f;
  --line: rgba(148, 163, 184, 0.22);
  --muted: #9aa8bd;
  --text: #f8fafc;
  --soft: #dbeafe;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --cyan: #38bdf8;
  --rose: #fb7185;
  --green: #34d399;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.18), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.16), transparent 32%),
    linear-gradient(145deg, #08111f 0%, #0f172a 45%, #111827 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 31, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  transition: 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #f8fafc;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

main {
  overflow: hidden;
}

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

.hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 78vh;
  margin: 30px auto 56px;
  border: 1px solid var(--line);
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 6vw, 76px);
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 17, 31, 0.92), rgba(8, 17, 31, 0.64), rgba(8, 17, 31, 0.35)),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(8, 17, 31, 0.96), transparent);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 999px;
  color: var(--amber-2);
  background: rgba(245, 158, 11, 0.12);
  font-weight: 700;
  font-size: 13px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  color: var(--amber-2);
}

.hero p {
  max-width: 720px;
  color: #d7e0ef;
  font-size: 17px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  transition: 0.22s ease;
}

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

.btn.primary {
  color: #111827;
  border-color: transparent;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.3);
}

.hero-poster {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  width: min(380px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
}

.hero-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-card-info strong {
  display: block;
  font-size: 19px;
}

.hero-card-info em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 6vw, 76px);
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--amber-2);
}

.section {
  padding: 26px 0 54px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--amber-2);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.section h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.13), rgba(56, 189, 248, 0.08)),
    rgba(15, 23, 42, 0.66);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

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

.category-tile strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
}

.category-tile span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--amber-2);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
  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.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

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

.poster-wrap img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--amber-2);
}

.card-body p {
  min-height: 68px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
}

.search-panel,
.filter-panel,
.detail-panel,
.player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  padding: 24px;
}

.search-box,
.filter-box {
  display: flex;
  gap: 12px;
}

.search-box input,
.filter-box input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 0 16px;
  outline: 0;
  color: #fff;
  background: rgba(8, 17, 31, 0.9);
}

.search-box input:focus,
.filter-box input:focus {
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-result {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 17, 31, 0.72);
}

.search-result img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.search-result strong {
  display: block;
}

.search-result em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

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

.rank-no {
  color: var(--amber-2);
  font-weight: 900;
  font-size: 20px;
  text-align: center;
}

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

.rank-info strong {
  display: block;
  line-height: 1.3;
}

.rank-info em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-title {
  padding: 52px 0 30px;
}

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

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

.filter-panel {
  padding: 18px;
  margin-bottom: 24px;
}

.filter-status {
  margin: 12px 0 0;
  color: var(--muted);
}

.detail-hero {
  padding: 42px 0 30px;
}

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

.detail-cover img {
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin-top: 6px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(148, 163, 184, 0.12);
}

.detail-copy p {
  color: #dbeafe;
  line-height: 1.85;
}

.content-block {
  margin-top: 22px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-block p {
  margin: 0;
}

.player-section {
  padding: 18px 0 48px;
}

.player-shell {
  padding: 18px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
}

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

.player-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.movie-card.compact .card-body p {
  display: none;
}

.movie-card.compact .card-body h3 {
  font-size: 16px;
}

.movie-card.compact .card-meta,
.movie-card.compact .tag-row {
  display: none;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  background: rgba(8, 17, 31, 0.72);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner strong {
  color: #fff;
  font-size: 20px;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a,
.footer-cats a {
  color: #cbd5e1;
}

.footer-links a:hover,
.footer-cats a:hover {
  color: var(--amber-2);
}

@media (max-width: 1100px) {
  .main-nav {
    display: none;
  }

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

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

  .hero-poster {
    display: none;
  }

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

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

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

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

@media (max-width: 720px) {
  .header-inner {
    width: min(100% - 22px, 1240px);
  }

  .brand-text {
    font-size: 17px;
  }

  .hero {
    width: min(100% - 22px, 1240px);
    min-height: 660px;
    border-radius: 28px;
  }

  .hero-slide {
    padding: 28px;
  }

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

  .section-head {
    display: block;
  }

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

  .search-box,
  .filter-box {
    display: block;
  }

  .search-box .btn,
  .filter-box .btn {
    width: 100%;
    margin-top: 10px;
  }

  .search-result {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .search-result .btn {
    grid-column: 1 / -1;
  }

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

  .detail-panel {
    padding: 16px;
  }
}
