:root {
  color-scheme: dark;
  --bg: #0d0a07;
  --panel: rgba(24, 18, 13, 0.82);
  --panel-strong: rgba(36, 26, 17, 0.94);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff8ed;
  --muted: #d8c8ae;
  --dim: #a69478;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --amber-soft: #fef3c7;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(180, 83, 9, 0.2), transparent 30rem),
    linear-gradient(180deg, #160f09 0%, #0d0a07 46%, #080604 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255, 255, 255, 0.04));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 10, 7, 0.78);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.sub-nav,
.hero-inner,
.page-shell,
.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #78350f;
  background: linear-gradient(135deg, #fff7ed, #f59e0b);
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.36);
}

.main-nav,
.sub-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a,
.sub-nav a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.main-nav a:hover,
.sub-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.sub-nav {
  padding: 0 0 14px;
  overflow-x: auto;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(12, 8, 5, 0.92) 0%, rgba(20, 11, 4, 0.64) 46%, rgba(120, 53, 15, 0.3) 100%),
    radial-gradient(circle at 78% 24%, rgba(252, 211, 77, 0.24), transparent 22rem);
  z-index: -2;
}

.hero-slide {
  display: none;
  min-height: 680px;
  padding: 88px 0 76px;
  background-image:
    linear-gradient(90deg, rgba(12, 8, 5, 0.96), rgba(12, 8, 5, 0.58), rgba(12, 8, 5, 0.86)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: block;
  animation: fadeUp 0.65s ease both;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: 48px;
}

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

.hero-kicker,
.page-kicker,
.section-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.meta-row span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.btn,
.btn-ghost,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn,
.search-submit {
  color: #78350f;
  background: linear-gradient(135deg, #fff7ed, #f59e0b);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.btn:hover,
.btn-ghost:hover,
.search-submit:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  width: min(100%, 620px);
  gap: 10px;
  margin-top: 32px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-box input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  outline: none;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.24);
  padding: 0 16px;
  font-size: 15px;
}

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  min-height: 500px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.76));
}

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  font-size: 26px;
  margin-bottom: 10px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  z-index: 5;
}

.hero-dots button {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #f59e0b;
}

.page-shell {
  padding: 48px 0 72px;
}

.page-hero {
  margin-bottom: 34px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 30rem),
    var(--panel);
  box-shadow: var(--shadow);
}

.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p,
.detail-copy p,
.copy-block p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 17px;
}

.section-block {
  margin-top: 48px;
}

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

.section-title h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 40px);
}

.section-more {
  color: #fcd34d;
  font-weight: 800;
}

.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-lg);
  background: var(--panel);
  box-shadow: 0 18px 50px 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(-5px);
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.poster-link img,
.ranking-cover img,
.detail-poster img {
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover img {
  transform: scale(1.055);
  filter: saturate(1.1);
}

.rank-badge,
.ranking-number {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 38px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #78350f;
  background: linear-gradient(135deg, #fff7ed, #f59e0b);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3,
.ranking-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.category-card {
  display: block;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(255, 255, 255, 0.04)),
    var(--panel);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

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

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-links span {
  color: #fcd34d;
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.search-box {
  display: flex;
  gap: 10px;
}

.filter-select {
  appearance: none;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 210px;
  border-radius: 18px;
}

.ranking-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.breadcrumb a {
  color: #fcd34d;
}

.player-section {
  margin-top: 42px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #070504;
  box-shadow: var(--shadow);
}

.player-section h2,
.copy-block h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 4vw, 34px);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.play-mask.hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  border-radius: 50%;
  color: #78350f;
  background: linear-gradient(135deg, #fff7ed, #f59e0b);
  box-shadow: 0 18px 54px rgba(245, 158, 11, 0.44);
  font-size: 38px;
}

.copy-block {
  margin-top: 42px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
}

.copy-block p {
  margin: 0 0 16px;
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  color: var(--muted);
}

.footer-logo {
  color: #ffffff;
  font-size: 18px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .hero-poster {
    min-height: 420px;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(13, 10, 7, 0.96);
  }

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

  .sub-nav {
    width: calc(100% - 32px);
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 58px 0 74px;
  }

  .hero-search,
  .search-box,
  .footer-inner {
    flex-direction: column;
  }

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

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

  .ranking-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .ranking-cover {
    min-height: 160px;
  }

  .page-hero,
  .detail-layout,
  .player-section,
  .copy-block {
    padding: 22px;
  }

  .detail-poster {
    min-height: 420px;
  }
}

@media (max-width: 520px) {
  .nav-wrap,
  .sub-nav,
  .hero-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 22px, 1240px);
  }

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

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

  .hero-poster,
  .detail-poster {
    min-height: 360px;
  }

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