:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --cyan-strong: #0891b2;
  --orange: #fb923c;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.13), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #020617 52%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.76));
  color: #001018;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 12px;
  color: #cbd5e1;
  border-radius: 12px;
}

.mobile-link:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--cyan);
}

.mobile-quick,
.chip-row,
.hero-tags,
.movie-badges,
.tag-cloud,
.detail-meta,
.rank-meta,
.intro-actions,
.side-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-pill,
.hero-tags span,
.movie-badges span,
.tag-cloud span,
.detail-meta span,
.rank-meta span,
.chip-row button,
.intro-actions a,
.side-links a,
.footer-links a {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.hero-carousel {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 70vh;
  margin: 28px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  position: absolute;
  inset: 0;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 38px;
  padding: clamp(28px, 6vw, 78px);
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(2, 6, 23, 0.45) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  display: grid;
}

.hero-backdrop {
  position: absolute;
  inset: auto -10% -28% -10%;
  height: 55%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 22px 0;
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #001018;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
}

.ghost-button,
.section-more {
  border: 1px solid rgba(226, 232, 240, 0.18);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.55);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.related-card img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.hero-thumbs {
  position: absolute;
  left: clamp(22px, 5vw, 78px);
  right: clamp(22px, 5vw, 78px);
  bottom: 22px;
  z-index: 4;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.hero-thumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  border: 1px solid rgba(226, 232, 240, 0.15);
  border-radius: 999px;
  padding: 7px 12px 7px 7px;
  background: rgba(2, 6, 23, 0.64);
  color: #e2e8f0;
}

.hero-thumb.active {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.16);
}

.hero-thumb img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
}

.home-intro,
.content-section,
.page-shell,
.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.home-intro {
  margin-top: 28px;
}

.intro-card,
.search-panel,
.side-panel,
.detail-content article,
.detail-content aside,
.player-section,
.page-hero,
.category-overview-card,
.rank-row,
.movie-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.intro-card {
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 38px);
}

.intro-card h2,
.section-head h2,
.search-copy h2,
.side-panel h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2,
.footer-logo {
  margin: 0;
  letter-spacing: -0.04em;
}

.intro-card h2,
.section-head h2,
.page-hero h1,
.detail-info h1 {
  font-size: clamp(28px, 4vw, 48px);
}

.intro-card p,
.section-head p,
.search-copy p,
.side-panel p,
.page-hero p,
.detail-one-line,
.detail-content p,
.site-footer p {
  color: var(--muted);
  line-height: 1.85;
}

.content-section {
  margin-top: 52px;
}

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

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-head p {
  margin: 10px 0 0;
  max-width: 760px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.92)), var(--category-image);
  background-size: cover;
  background-position: center;
}

.category-card strong {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  color: #cbd5e1;
  line-height: 1.65;
}

.category-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 10%, rgba(34, 211, 238, 0.22), transparent 36%);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  transition: transform 0.35s 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) 100%);
}

.score-badge,
.play-dot {
  position: absolute;
  display: inline-grid;
  place-items: center;
}

.score-badge {
  top: 10px;
  right: 10px;
  min-width: 44px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
}

.play-dot {
  left: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.92);
  color: #001018;
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.18);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-main h2 a:hover,
.related-card a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
  border-radius: var(--radius-xl);
  padding: 24px;
}

.search-controls input {
  width: 100%;
  height: 52px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  background: rgba(2, 6, 23, 0.55);
  color: var(--text);
  padding: 0 18px;
}

.search-controls input:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.chip-row button {
  cursor: pointer;
}

.chip-row button.active,
.chip-row button:hover {
  border-color: rgba(34, 211, 238, 0.7);
  color: #67e8f9;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.side-panel {
  align-self: start;
  border-radius: var(--radius-xl);
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 74px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  padding: 12px;
}

.rank-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-weight: 900;
}

.rank-thumb {
  width: 74px;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-main h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-main p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  color: #fde68a;
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.page-shell,
.detail-shell {
  padding-top: 28px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(30px, 6vw, 64px);
  background:
    radial-gradient(circle at 14% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.88));
}

.page-hero p {
  max-width: 780px;
}

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

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.93)), var(--category-image);
  background-size: cover;
  background-position: center;
}

.category-overview-card a {
  display: block;
  min-height: 260px;
  padding: 24px;
}

.category-overview-card strong {
  display: block;
  font-size: 26px;
}

.category-overview-card p {
  color: #cbd5e1;
  line-height: 1.7;
}

.mini-title-row {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: #e2e8f0;
  font-size: 13px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 46px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.14), transparent 24rem),
    rgba(15, 23, 42, 0.78);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.detail-one-line {
  max-width: 760px;
  font-size: 18px;
}

.player-section {
  margin-top: 36px;
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 28px);
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: clamp(22px, 3vw, 30px);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  color: #001018;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: clamp(70px, 9vw, 104px);
  height: clamp(70px, 9vw, 104px);
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.28);
  font-size: clamp(30px, 5vw, 46px);
  text-indent: 6px;
}

.player-box.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 36px;
}

.detail-content article,
.detail-content aside {
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 34px);
}

.detail-content h2:not(:first-child) {
  margin-top: 28px;
}

.detail-content dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-content dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.detail-content dt {
  color: var(--muted);
}

.detail-content dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

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

.related-card a {
  display: block;
}

.related-card img {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #0f172a;
}

.related-card span {
  display: block;
  margin-top: 10px;
  font-weight: 800;
  line-height: 1.35;
}

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

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

.footer-logo {
  font-size: 24px;
  font-weight: 900;
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

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

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding-bottom: 120px;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
  }

  .search-panel,
  .split-layout,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(300px, 100%);
  }
}

@media (max-width: 640px) {
  .header-inner,
  .mobile-panel,
  .hero-carousel,
  .home-intro,
  .content-section,
  .page-shell,
  .detail-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1200px);
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-carousel {
    min-height: 700px;
    border-radius: 22px;
  }

  .hero-slide {
    padding: 24px 20px 120px;
  }

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

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

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

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

  .rank-thumb {
    width: 58px;
    height: 78px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-badges span:nth-child(n+3) {
    display: none;
  }
}
