:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: #111827;
  --panel: #1e293b;
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --ocean: #0ea5e9;
  --ocean-dark: #0284c7;
  --ocean-soft: rgba(14, 165, 233, 0.16);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 30rem), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.25);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ocean), #38bdf8);
  color: white;
  font-size: 15px;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

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

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

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

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 10px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: var(--ocean-dark);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.16)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content > * {
  max-width: 660px;
}

.hero-pill,
.eyebrow,
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border-radius: 999px;
  background: var(--ocean-dark);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.hero-pill,
.eyebrow {
  padding: 7px 14px;
}

.type-pill {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 11px;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 18px;
  font-size: 14px;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: var(--muted-2);
}

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

.primary-btn,
.ghost-btn,
.search-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn,
.search-bar button {
  background: var(--ocean-dark);
  color: white;
  box-shadow: 0 14px 34px rgba(2, 132, 199, 0.34);
}

.primary-btn:hover,
.search-bar button:hover {
  background: var(--ocean);
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.ghost-btn:hover {
  border-color: var(--ocean);
  color: white;
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-nav:hover {
  background: var(--ocean-dark);
}

.hero-nav.prev {
  left: 22px;
}

.hero-nav.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: white;
}

.page-stack {
  display: grid;
  gap: 56px;
  padding: 48px 0 72px;
}

.home-search,
.filter-panel {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.76));
  box-shadow: var(--shadow);
}

.home-search {
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  align-items: center;
  padding: 24px;
}

.home-search-copy span,
.eyebrow {
  color: #bae6fd;
}

.home-search-copy h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-bar input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  color: white;
  padding: 0 14px;
  outline: none;
}

.search-bar input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.section-block {
  display: grid;
  gap: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.ranking-panel h2,
.related-panel h2,
.info-panel h2,
.article-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-link {
  color: #7dd3fc;
  font-weight: 700;
}

.panel-block {
  padding: 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(51, 65, 85, 0.62);
}

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

.compact-grid {
  display: grid;
  gap: 14px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 270px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-color: var(--ocean) rgba(30, 41, 59, 0.8);
}

.movie-card {
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid rgba(51, 65, 85, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.42);
}

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

.poster-link img,
.wide-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

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

.center-play,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  color: white;
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.32);
}

.center-play {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: 0.2s ease;
}

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

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

.movie-title {
  display: block;
  color: white;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: #38bdf8;
}

.movie-card p,
.wide-body p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  font-size: 12px;
}

.large-card .poster-link {
  aspect-ratio: 16 / 9;
}

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: stretch;
}

.wide-cover {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  background: #0f172a;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
}

.chip-line,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-line span,
.tag-cloud span {
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.22);
  font-size: 12px;
  padding: 4px 9px;
}

.split-section {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.ranking-panel,
.related-panel,
.info-panel,
.article-panel,
.player-shell {
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.72);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 68px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.86);
}

.rank-num {
  color: #38bdf8;
  font-weight: 900;
  font-size: 18px;
}

.rank-item img {
  width: 68px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--muted);
}

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

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

.category-links a,
.category-tile {
  display: block;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(30, 41, 59, 0.82));
  border: 1px solid rgba(14, 165, 233, 0.22);
  color: white;
  font-weight: 800;
  transition: 0.2s ease;
}

.category-links a {
  padding: 20px;
  text-align: center;
}

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

.category-tile {
  padding: 22px;
}

.category-tile:hover,
.category-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.62);
}

.category-tile span {
  color: #7dd3fc;
  font-size: 13px;
}

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

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 18% 18%, rgba(14, 165, 233, 0.24), transparent 28rem), linear-gradient(135deg, #020617, #0f172a);
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
}

.small-hero {
  padding: 80px 0;
}

.small-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.small-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-panel {
  grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(140px, 190px));
  align-items: end;
  padding: 20px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  display: none;
  padding: 48px;
  text-align: center;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--muted);
}

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

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

.detail-main {
  background: var(--bg);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.15);
  opacity: 0.42;
  transform: scale(1.04);
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.3)), linear-gradient(0deg, #020617, transparent 70%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 36px;
  align-items: center;
  min-height: 460px;
  padding: 48px 0;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
}

.detail-copy p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-meta {
  margin-top: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 48px 0 72px;
}

.detail-content {
  display: grid;
  gap: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.16));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ocean-dark);
  font-size: 28px;
  box-shadow: 0 22px 48px rgba(2, 132, 199, 0.38);
}

.player-start strong {
  font-size: 18px;
}

.player-shell.playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.info-panel,
.article-panel,
.related-panel {
  padding: 24px;
}

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

.info-grid div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.82);
}

.info-grid span,
.info-grid strong {
  display: block;
}

.info-grid span {
  color: var(--muted);
  font-size: 12px;
}

.info-grid strong {
  margin-top: 4px;
  color: white;
}

.article-panel p {
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 16px;
}

.related-panel {
  position: sticky;
  top: 88px;
}

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: #020617;
  color: var(--muted);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-inner p {
  margin: 8px 0 0;
  max-width: 640px;
}

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

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted-2);
  font-size: 14px;
}

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

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

  .ranking-panel,
  .related-panel {
    position: static;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    justify-content: end;
    padding-bottom: 90px;
  }

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

  .hero-nav {
    display: none;
  }

  .home-search,
  .filter-panel,
  .detail-hero-inner,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .home-search,
  .panel-block {
    padding: 18px;
  }

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

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

  .wide-card {
    grid-template-columns: 118px 1fr;
  }

  .wide-cover {
    min-height: 100px;
  }

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

  .ranking-list,
  .category-links,
  .category-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(270px, 78vw);
  }

  .detail-hero-inner {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-bottom,
  .small-hero > div,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-name {
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }
}
