:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #06b6d4;
  --accent-strong: #22d3ee;
  --orange: #fb923c;
  --green: #22c55e;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.22), transparent 34%), radial-gradient(circle at 88% 14%, rgba(251, 146, 60, 0.14), transparent 28%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.section-inner,
.hero-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.24);
}

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

.main-nav a,
.mobile-menu a {
  color: var(--soft);
  padding: 10px 13px;
  border-radius: 12px;
  transition: color 180ms ease, background 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-menu a:hover {
  color: var(--accent-strong);
  background: rgba(15, 23, 42, 0.95);
}

.header-search {
  margin-left: auto;
  width: min(320px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input::placeholder,
.hero-search input::placeholder,
.filter-panel input::placeholder {
  color: #64748b;
}

.header-search button,
.hero-search button,
.primary-button,
.ghost-button,
.play-trigger {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.22);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.header-search button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.primary-button,
.ghost-button,
.play-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  font-weight: 700;
}

.ghost-button {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: none;
}

.header-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.play-trigger:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(2, 6, 23, 0.95);
}

.hero {
  position: relative;
  min-height: 84vh;
  overflow: hidden;
}

.hero-track,
.hero-slide,
.hero-media,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-media::after {
  content: "";
  background: linear-gradient(to top, #020617 4%, rgba(2, 6, 23, 0.92) 20%, rgba(2, 6, 23, 0.58) 54%, rgba(2, 6, 23, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 3;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  padding: 132px 0 86px;
}

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

.eyebrow,
.meta-pill,
.tag,
.rank-number {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  backdrop-filter: blur(10px);
}

.eyebrow {
  padding: 6px 12px;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1,
.hero h2 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.hero-search input {
  padding-left: 12px;
}

.hero-search button {
  padding: 12px 22px;
  flex: 0 0 auto;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.66);
  cursor: pointer;
}

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

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent-strong);
}

.content-section {
  padding: 56px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.52));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 26px 62px rgba(6, 182, 212, 0.14);
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), transparent);
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

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

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

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

.card-meta,
.detail-meta,
.breadcrumbs,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.card-meta {
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.meta-pill,
.tag {
  padding: 4px 10px;
  font-size: 13px;
}

.feature-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82));
  box-shadow: var(--shadow);
}

.feature-panel::before,
.detail-hero::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  filter: blur(70px);
  right: -100px;
  top: -160px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.58));
  transition: transform 220ms ease, border-color 220ms ease;
}

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

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.page-hero {
  padding: 70px 0 28px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 12% 0%, rgba(6, 182, 212, 0.16), transparent 32%);
}

.breadcrumbs {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: #67e8f9;
}

.filter-panel {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
}

.filter-panel select {
  color: var(--soft);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.74));
  box-shadow: var(--shadow);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: black;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.12));
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #0f172a;
}

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

.detail-title h1 {
  margin-bottom: 12px;
}

.detail-meta {
  margin: 16px 0 22px;
}

.detail-text {
  color: var(--soft);
  font-size: 17px;
}

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

.info-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
}

.info-item b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.article-panel {
  margin-top: 30px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-panel p {
  margin: 0;
  color: var(--soft);
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 74px 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  width: 52px;
  height: 52px;
  justify-content: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.rank-thumb {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.site-footer {
  margin-top: 74px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
  color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: white;
  font-size: 18px;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
}

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

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

  .detail-poster {
    max-width: 360px;
  }

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

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

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

  .hero-inner {
    padding-bottom: 70px;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 42px;
  }

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

  .feature-panel,
  .detail-hero,
  .article-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .rank-card {
    grid-template-columns: 52px 96px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-info h2,
  .rank-info h3 {
    font-size: 17px;
  }
}
