:root {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-soft: #eef6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --primary: #2563eb;
  --primary-dark: #1e3a8a;
  --cyan: #22d3ee;
  --red: #ef4444;
  --orange: #f97316;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 14px 40px rgba(30, 64, 175, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.34);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.main-nav > a,
.nav-dropdown > a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 220px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

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

.dropdown-link {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
}

.dropdown-link:hover {
  background: var(--panel-soft);
  color: var(--primary);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 28vw);
}

.header-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  padding: 10px 14px;
  outline: none;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.header-search button,
.filter-controls button {
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.filter-controls button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-track,
.hero-slide {
  min-height: 620px;
}

.hero-slide {
  display: none;
  position: relative;
  padding: 86px 24px 120px;
  background-size: cover;
  background-position: center;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.22), transparent 32%), linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.7));
  pointer-events: none;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  align-items: center;
  gap: 42px;
}

.hero-copy,
.hero-feature-card {
  position: relative;
  z-index: 2;
  max-width: 1240px;
}

.hero-copy {
  width: min(680px, 100%);
  margin-left: max(24px, calc((100vw - 1240px) / 2));
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  width: min(650px, 100%);
  margin: 0 0 26px;
  color: rgba(219, 234, 254, 0.92);
  font-size: clamp(17px, 1.6vw, 22px);
}

.hero-tags,
.tag-row,
.movie-meta,
.detail-meta,
.hero-actions,
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.hero-actions {
  margin-top: 30px;
}

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

.primary-btn {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.22);
}

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

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #ffffff;
  background: rgba(30, 64, 175, 0.38);
  backdrop-filter: blur(14px);
}

.text-btn {
  background: var(--primary);
  color: #ffffff;
}

.hero-feature-card {
  width: min(420px, calc(100% - 48px));
  margin-right: max(24px, calc((100vw - 1240px) / 2));
  justify-self: end;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-poster {
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
  box-shadow: inset 0 -80px 70px rgba(15, 23, 42, 0.3);
}

.hero-feature-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.hero-feature-card span {
  color: rgba(226, 232, 240, 0.82);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
}

.hero-controls button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--cyan);
}

.hero-glow {
  position: absolute;
  z-index: 1;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.32;
}

.hero-glow-left {
  top: 10%;
  left: -100px;
  background: var(--primary);
}

.hero-glow-right {
  right: -120px;
  bottom: 10%;
  background: var(--cyan);
}

.page-hero {
  padding: 64px 24px;
  color: #ffffff;
  background: radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.24), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0891b2);
}

.page-hero-inner,
.content-section,
.footer-grid,
.footer-bottom,
.detail-layout,
.breadcrumbs {
  max-width: 1240px;
  margin: 0 auto;
}

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

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  font-size: 18px;
}

.stats-row {
  margin-top: 24px;
}

.stat-pill {
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.content-section {
  padding: 64px 24px;
}

.content-section.alt {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
  max-width: none;
}

.content-section.alt > .section-wrap,
.content-section.blue > .section-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

.content-section.blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  max-width: none;
}

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

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: var(--soft-shadow);
}

.poster-link {
  display: block;
}

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  background-color: #1e293b;
  background-size: cover;
  background-position: center;
}

.movie-card-wide .movie-poster {
  aspect-ratio: 16 / 10;
}

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.poster-badge {
  left: 12px;
}

.poster-year {
  right: 12px;
  background: rgba(37, 99, 235, 0.88);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

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

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-body h3 a:hover {
  color: var(--primary);
}

.movie-line {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.movie-meta span {
  border-radius: 8px;
  background: #f1f5f9;
  padding: 4px 8px;
}

.tag-row {
  margin-top: 12px;
  gap: 6px;
}

.tag-row span {
  background: #eff6ff;
  color: var(--primary-dark);
  padding: 4px 8px;
  font-size: 12px;
}

.filter-panel {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.filter-title {
  margin-bottom: 14px;
  font-weight: 900;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px 180px auto;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  background: #ffffff;
  color: var(--ink);
}

.filter-result {
  margin-top: 12px;
  color: var(--muted);
}

.empty-state {
  margin-top: 24px;
  border: 1px dashed rgba(100, 116, 139, 0.4);
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

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

.category-card {
  display: block;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  padding: 22px;
  box-shadow: 0 10px 35px rgba(30, 64, 175, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--soft-shadow);
}

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

.category-card span {
  color: var(--primary);
  font-weight: 800;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 120px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.breadcrumbs {
  padding: 22px 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--primary);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.85fr);
  gap: 28px;
  padding: 28px 24px 64px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.22);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.82));
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-size: 34px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  font-size: 14px;
}

.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 12px 42px rgba(15, 23, 42, 0.08);
}

.detail-card {
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 20px;
  color: var(--muted);
}

.detail-meta span {
  border-radius: 10px;
  background: #f1f5f9;
  padding: 6px 10px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-tags span {
  background: #eff6ff;
  color: var(--primary-dark);
}

.detail-section-title {
  margin: 26px 0 10px;
  font-size: 22px;
}

.detail-card p {
  color: #334155;
}

.side-card {
  margin-bottom: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 8px;
  background: #f8fafc;
}

.side-link:hover {
  background: #eff6ff;
}

.side-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

.side-link strong {
  display: block;
  line-height: 1.25;
}

.side-link span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #cbd5e1;
  padding: 52px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-slide.is-active {
    grid-template-columns: 1fr;
  }

  .hero-feature-card {
    justify-self: start;
    margin-left: max(24px, calc((100vw - 1240px) / 2));
  }

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

  .filter-controls {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 560px;
  }

  .hero-slide {
    padding: 58px 18px 110px;
  }

  .hero-copy {
    margin-left: 0;
  }

  .hero-feature-card {
    display: none;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .content-section,
  .page-hero,
  .detail-layout,
  .breadcrumbs {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-body {
    padding: 13px;
  }

  .movie-line {
    min-height: 42px;
    font-size: 14px;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 86px 1fr;
  }

  .rank-meta {
    grid-column: 2 / 4;
    text-align: left;
  }

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

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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