:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #f59e0b;
  --brand-soft: rgba(245, 158, 11, 0.18);
  --brand-deep: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.14), transparent 30rem),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-logo {
  font-size: 20px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: white;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.36);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

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

.quick-channel {
  display: flex;
  justify-content: center;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 10px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 14px;
}

.quick-channel a {
  white-space: nowrap;
}

.quick-channel a:hover {
  color: var(--brand);
}

main {
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.38) blur(1px);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 46%, rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, var(--bg), transparent 35%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  max-width: 1280px;
  min-height: 76vh;
  margin: 0 auto;
  padding: 76px 24px 96px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(40px, 7vw, 78px);
}

.hero-movie-title {
  margin: 16px 0 0 !important;
  color: var(--brand);
  font-size: clamp(26px, 4vw, 42px) !important;
  letter-spacing: -0.03em !important;
}

.hero-copy p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.meta-list span,
.filter-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
}

.hero-tags span,
.tag-row span,
.meta-list span {
  padding: 7px 12px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: white;
  box-shadow: 0 18px 32px rgba(245, 158, 11, 0.3);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.btn.text {
  color: var(--brand);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  font-size: 28px;
  transform: translate(-50%, -50%);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  color: white;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--brand);
}

.search-band,
.section-block,
.page-hero,
.detail-hero,
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  align-items: center;
  gap: 24px;
  padding-top: 44px;
  padding-bottom: 28px;
}

.search-band h2,
.section-heading h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
}

.search-box input::placeholder {
  color: #64748b;
}

.search-box.compact {
  max-width: 560px;
  width: 100%;
}

.page-search {
  margin-bottom: 24px;
}

.section-block {
  padding-top: 52px;
  padding-bottom: 52px;
}

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

.section-heading a,
.category-panel-head strong {
  color: var(--brand);
  font-weight: 800;
}

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

.category-chip,
.category-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62));
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.2);
}

.category-chip {
  min-height: 118px;
  padding: 22px;
}

.category-chip::after,
.category-panel::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -32px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--brand-soft);
}

.category-chip span,
.category-panel-head span {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}

.category-chip small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

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

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

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

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

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

.movie-card:hover .poster-link img {
  filter: brightness(0.74);
  transform: scale(1.08);
}

.card-year,
.rank-badge,
.play-dot {
  position: absolute;
  z-index: 2;
}

.card-year {
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.94);
  color: white;
  font-weight: 900;
}

.play-dot {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.94);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 15px;
}

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

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

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-desc {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-preview {
  max-width: 1320px;
}

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

.rank-list.full {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: 28px;
  padding-top: 72px;
  padding-bottom: 44px;
}

.page-hero.slim,
.page-hero.search-hero {
  grid-template-columns: 1fr;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(38px, 6vw, 70px);
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.filter-row {
  margin-bottom: 24px;
}

.filter-pill {
  padding: 8px 14px;
  cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: var(--brand-soft);
  color: var(--brand);
}

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

.category-panel {
  padding: 26px;
}

.category-panel p {
  max-width: 720px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.category-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 13px;
}

.detail-hero {
  padding-top: 30px;
  padding-bottom: 36px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(330px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background: rgba(2, 6, 23, 0.48);
  color: white;
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.35);
  font-size: 34px;
}

.player-cover strong {
  font-size: 20px;
}

.detail-info {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.76);
}

.detail-poster {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  font-size: clamp(26px, 3vw, 42px);
}

.detail-line {
  color: var(--muted-strong);
  line-height: 1.75;
}

.meta-list,
.tag-row {
  margin-top: 14px;
}

.detail-text {
  max-width: 1050px;
}

.detail-text h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.detail-text p {
  margin: 0 0 34px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 2;
}

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

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  text-align: center;
}

.empty-state.show {
  display: block;
}

[hidden] {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 42px;
  padding-bottom: 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-logo {
  margin-bottom: 10px;
  color: white;
  font-size: 19px;
}

.site-footer p {
  margin: 0;
  line-height: 1.7;
}

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

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

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

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

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

  .nav-links {
    position: fixed;
    inset: 68px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .nav-links {
    display: flex;
  }

  .quick-channel {
    justify-content: start;
  }

  .hero-inner,
  .detail-grid,
  .search-band,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 28px;
    padding-top: 58px;
  }

  .hero-poster {
    max-width: 250px;
    transform: none;
  }

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

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

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-nav {
    height: 62px;
    padding: 0 16px;
  }

  .site-logo {
    font-size: 17px;
  }

  .quick-channel,
  .search-band,
  .section-block,
  .page-hero,
  .detail-hero,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-carousel,
  .hero-inner {
    min-height: 82vh;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-poster {
    display: none;
  }

  .category-chip-grid,
  .movie-grid,
  .rank-list,
  .rank-list.full,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 14px;
  }

  .card-desc {
    -webkit-line-clamp: 1;
  }

  .detail-info {
    grid-template-columns: 104px minmax(0, 1fr);
    padding: 14px;
  }

  .player-shell {
    border-radius: 20px;
  }

  .big-play {
    width: 66px;
    height: 66px;
    font-size: 27px;
  }
}
