:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: rgba(15, 23, 42, 0.72);
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: rgba(30, 41, 59, 0.94);
  --border: rgba(96, 165, 250, 0.22);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --orange: #f97316;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.32), transparent 30rem),
    radial-gradient(circle at 85% 12%, rgba(6, 182, 212, 0.2), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.2);
}

.logo-text,
.footer-logo {
  font-size: 1.25rem;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #d1d5db;
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.72);
  padding: 10px 14px;
}

.header-search input {
  width: 230px;
}

.header-search button,
.mobile-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  color: white;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  padding: 8px 11px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.58) 42%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), transparent 60%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 82px;
  z-index: 3;
  width: min(760px, calc(100% - 48px));
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  padding: 7px 14px;
  margin-bottom: 16px;
}

.hero h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0 0 16px;
  color: white;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero p,
.detail-copy p,
.page-hero p {
  margin: 0;
  color: #e2e8f0;
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin: 22px 0;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.card-meta span,
.tag-row span {
  display: inline-flex;
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  padding: 5px 10px;
  font-size: 0.82rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0891b2);
  padding: 13px 28px;
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.hero-button:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: 2rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.space-large {
  display: grid;
  gap: 64px;
}

.content-section,
.rank-panel,
.text-panel,
.aside-card,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-section,
.rank-panel {
  padding: 28px;
}

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

.section-head h2,
.text-panel h2,
.aside-card h2,
.player-section h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.section-head a,
.category-links a,
.footer-links a,
.aside-link {
  color: #60a5fa;
  transition: color 0.2s ease;
}

.section-head a:hover,
.category-links a:hover,
.footer-links a:hover,
.aside-link:hover {
  color: #a5f3fc;
}

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.32);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.horizontal-poster {
  height: 100%;
  aspect-ratio: auto;
}

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

.movie-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 62%);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(37, 99, 235, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-label {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  background: linear-gradient(90deg, #f97316, #eab308);
  padding: 5px 9px;
}

.card-body {
  padding: 15px;
}

.card-title,
.rank-title {
  display: -webkit-box;
  overflow: hidden;
  color: white;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-title:hover,
.rank-title:hover {
  color: #60a5fa;
}

.card-body p,
.rank-copy p,
.category-card-large p,
.category-tile p,
.footer-inner p,
.text-panel p,
.aside-card dd {
  color: var(--subtle);
  line-height: 1.72;
}

.card-body p,
.rank-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  color: var(--subtle);
  font-size: 0.8rem;
  margin: 10px 0;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  color: #bfdbfe;
  padding: 4px 8px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.scroll-card {
  scroll-snap-align: start;
}

.rank-panel {
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.34), rgba(8, 145, 178, 0.24));
}

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

.rank-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 118px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.66);
  padding: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.88);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

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

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

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

.wide-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-tile,
.category-card-large {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 0.86));
  padding: 22px;
}

.category-tile > a,
.category-card-title {
  display: block;
  color: white;
  font-size: 1.12rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile div,
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-tile div a,
.category-links a {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 10px;
  font-size: 0.83rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.22), transparent 22rem),
    linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
}

.small-hero {
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 28px;
}

.small-hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--subtle);
  margin-bottom: 22px;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #93c5fd;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.35fr));
  gap: 12px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  padding: 16px;
}

.filter-bar select {
  appearance: none;
}

.empty-state {
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 16px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  padding: 18px;
}

.detail-hero {
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.detail-hero-inner {
  padding-top: 34px;
  padding-bottom: 46px;
}

.detail-headline {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-copy p {
  max-width: 820px;
}

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

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

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

.player-section,
.text-panel,
.aside-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  padding: 24px;
}

.player-section h2 {
  margin-bottom: 16px;
}

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

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

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18)),
    rgba(2, 6, 23, 0.12);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-mask span {
  width: clamp(66px, 10vw, 96px);
  height: clamp(66px, 10vw, 96px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.34);
  font-size: clamp(2rem, 4vw, 3rem);
  padding-left: 5px;
}

.player-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.text-panel {
  padding: 28px;
}

.text-panel p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 1.02rem;
}

.detail-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.aside-card dl {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.aside-card dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 12px;
}

.aside-card dt {
  color: #93c5fd;
}

.aside-card dd {
  margin: 0;
}

.aside-link {
  display: block;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  padding: 12px 14px;
  margin-top: 12px;
}

.related-section {
  grid-column: 1 / -1;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 36px;
  padding: 36px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #64748b;
  padding: 18px 0 26px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .hero {
    height: 540px;
  }

  .hero-arrow {
    display: none;
  }

  .feature-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-headline,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 520px;
  }

  .detail-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-shell,
  .footer-inner,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 24px, 1280px);
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    left: 18px;
    bottom: 72px;
    width: calc(100% - 36px);
  }

  .hero p,
  .detail-copy p,
  .page-hero p {
    font-size: 1rem;
  }

  .content-section,
  .rank-panel,
  .player-section,
  .text-panel,
  .aside-card {
    padding: 18px;
  }

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

  .movie-card-horizontal,
  .rank-item {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    width: 100%;
  }

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