:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #1e293b;
  --panel-strong: #111827;
  --panel-line: #334155;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --yellow: #facc15;
  --shadow: 0 20px 70px rgba(8, 145, 178, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 176px;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 25px rgba(8, 145, 178, 0.28);
  transition: transform 0.2s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-3deg);
}

.logo-title {
  display: block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.logo-subtitle {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.nav-drop-button {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 650;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.nav-drop-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  min-width: 210px;
  padding: 10px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 14px;
  background: #1e293b;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-menu a {
  border-radius: 10px;
  color: var(--text-soft);
  padding: 9px 12px;
  font-size: 14px;
}

.nav-drop-menu a:hover {
  background: #334155;
  color: var(--cyan);
}

.header-search {
  width: min(280px, 28vw);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: 0;
  background: #1e293b;
  color: var(--text);
  padding: 10px 44px 10px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-box button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-box button:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #1e293b;
  color: var(--text);
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  padding: 14px 0 18px;
}

.mobile-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-links a {
  color: var(--text-soft);
  padding: 9px 0;
}

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

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 7s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-shade-left,
.hero-shade-bottom {
  position: absolute;
  inset: 0;
}

.hero-shade-left {
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.84) 42%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-shade-bottom {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 72vh;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 90px 0 128px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 750;
  padding: 7px 15px;
  backdrop-filter: blur(10px);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 22px 0 16px;
  color: #f8fafc;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(34px, 5.2vw, 62px);
}

.hero-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
}

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

.button-primary,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  font-weight: 800;
  padding: 12px 19px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  box-shadow: 0 12px 35px rgba(8, 145, 178, 0.3);
}

.button-secondary {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.button-ghost {
  border: 1px solid rgba(51, 65, 85, 0.95);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-soft);
}

.button-primary:hover,
.button-secondary:hover,
.button-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--cyan);
}

.hero-controls {
  position: absolute;
  right: min(52px, 5vw);
  bottom: 44px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 15px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(30, 41, 59, 0.85);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

.section {
  padding: 72px 0;
}

.section-slate {
  background: linear-gradient(180deg, #020617, #0f172a);
}

.section-panel {
  background: #0f172a;
}

.section-deep {
  background: #020617;
}

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

.section-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.movie-strip::-webkit-scrollbar {
  display: none;
}

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: var(--radius);
  background: #1e293b;
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: var(--shadow);
}

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

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

.movie-card a:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.78));
}

.badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  backdrop-filter: blur(9px);
}

.badge.score {
  top: 10px;
  right: 10px;
  color: #fde68a;
}

.badge.year {
  right: 10px;
  bottom: 10px;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.36;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card a:hover h3 {
  color: var(--cyan);
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.card-tags span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #bae6fd;
  font-size: 12px;
  padding: 4px 8px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 22px;
  background: #1e293b;
  padding: 24px;
  box-shadow: 0 15px 45px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.27), transparent 38%), radial-gradient(circle at 90% 70%, rgba(37, 99, 235, 0.28), transparent 44%);
  opacity: 0.85;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.78);
}

.category-card h2,
.category-card h3,
.category-card p,
.category-card span {
  position: relative;
  z-index: 2;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

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

.page-hero {
  padding: 74px 0 42px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.64);
  background: radial-gradient(circle at 14% 20%, rgba(34, 211, 238, 0.17), transparent 35%), linear-gradient(180deg, #0f172a, #020617);
}

.page-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--text-soft);
  font-size: 18px;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 0;
}

.filter-panel .search-box {
  flex: 1;
  max-width: 560px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 140px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 18px;
  background: #1e293b;
  padding: 14px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.72);
}

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

.rank-item img {
  width: 140px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 13px;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 21px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: #fde68a;
  font-size: 22px;
  font-weight: 900;
  padding: 0 12px;
}

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

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

.detail-hero {
  padding: 46px 0 28px;
  background: radial-gradient(circle at 70% 0%, rgba(34, 211, 238, 0.13), transparent 42%), #020617;
}

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.24);
}

.player-card {
  overflow: hidden;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  background: #020617;
  cursor: pointer;
  padding: 0;
  z-index: 3;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.play-action {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  font-size: 36px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 52px rgba(8, 145, 178, 0.4);
}

.player-shell.is-playing .player-cover {
  display: none;
}

.detail-card,
.side-card {
  padding: 24px;
}

.detail-title {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-intro {
  margin: 0 0 22px;
  color: var(--text-soft);
  font-size: 18px;
}

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

.info-box {
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 15px;
  background: #1e293b;
  padding: 14px;
}

.info-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.info-value {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-weight: 800;
}

.article-body h2 {
  margin: 28px 0 12px;
  color: var(--text);
  font-size: 25px;
}

.article-body p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.tag-list span,
.tag-list a {
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.related-item img {
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 11px;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  background: #020617;
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.empty-state {
  display: none;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 18px;
  background: #1e293b;
  color: var(--text-soft);
  padding: 28px;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

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

  .header-search {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 78vh;
  }

  .hero-copy {
    padding: 78px 0 112px;
  }

  .hero-shade-left {
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 72%, rgba(2, 6, 23, 0.35) 100%);
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

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

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

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

  .rank-score {
    grid-column: 2 / -1;
    padding: 0;
  }

  .rank-item img {
    width: 100px;
  }

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

@media (max-width: 540px) {
  .container {
    width: min(100% - 24px, 1240px);
  }

  .logo-subtitle {
    display: none;
  }

  .hero-actions,
  .filter-panel,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .button-primary,
  .button-secondary,
  .button-ghost {
    width: 100%;
  }

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

  .rank-item {
    grid-template-columns: 42px 92px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-item img {
    width: 92px;
  }

  .play-action {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
