:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --brand: #cbd5e1;
  --brand-2: #38bdf8;
  --accent: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

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

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

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(245, 158, 11, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #f8fafc, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

.main-nav a,
.mobile-nav a {
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.main-nav a:hover,
.mobile-nav a:hover,
.main-nav a.is-active,
.mobile-nav a.is-active {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.86);
}

.nav-toggle {
  display: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-wrap {
  position: relative;
  min-height: clamp(560px, 76vh, 820px);
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 36px;
  padding: clamp(28px, 5vw, 72px);
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-kicker,
.section-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 1.7vw, 22px);
}

.hero-tags,
.tag-row,
.meta-pills,
.category-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.meta-pills span,
.category-pill-list a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  padding: 4px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-more,
.rank-link,
.play-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.primary-btn,
.play-trigger {
  color: #020617;
  background: linear-gradient(135deg, #f8fafc, #38bdf8);
  box-shadow: 0 12px 38px rgba(56, 189, 248, 0.22);
}

.ghost-btn,
.section-more,
.rank-link {
  color: var(--text);
  border: 1px solid rgba(203, 213, 225, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.rank-link:hover,
.play-trigger:hover {
  transform: translateY(-2px);
}

.hero-poster-link {
  display: block;
  aspect-ratio: 2 / 3;
  width: min(340px, 100%);
  justify-self: center;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(245, 158, 11, 0.18)),
    linear-gradient(180deg, #1e293b, #020617);
  background-size: cover;
  background-position: center;
}

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

.hero-arrow,
.hero-indicators button {
  border: 1px solid rgba(203, 213, 225, 0.24);
  background: rgba(15, 23, 42, 0.76);
  color: #f8fafc;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

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

.hero-indicators button {
  width: 30px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
}

.hero-indicators button.is-active {
  background: #f8fafc;
}

.search-panel,
.content-section,
.category-card,
.detail-panel,
.index-panel,
.rank-card,
.notice-card {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.20);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
}

.search-panel h2,
.content-section h2,
.category-card h2,
.detail-panel h1,
.index-panel h1,
.notice-card h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.search-panel p,
.section-head p,
.category-card p,
.detail-panel p,
.index-panel p,
.notice-card p {
  color: var(--muted);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 10px;
}

.search-form input,
.search-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  padding: 0 14px;
}

.search-results {
  grid-column: 1 / -1;
  display: none;
  gap: 10px;
}

.search-results.is-open {
  display: grid;
}

.search-result-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.42);
}

.result-thumb {
  width: 56px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
}

.content-section {
  padding: 28px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.44);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(203, 213, 225, 0.36);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.30);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(245, 158, 11, 0.14)),
    linear-gradient(180deg, #1e293b, #020617);
  background-size: cover;
  background-position: center;
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  top: 10px;
  left: 10px;
  color: #020617;
  background: rgba(248, 250, 252, 0.92);
}

.poster-play {
  right: 10px;
  bottom: 10px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

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

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

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

.category-card {
  padding: 22px;
}

.category-card h2 {
  font-size: 22px;
}

.category-card strong {
  color: #f8fafc;
}

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

.breadcrumb a:hover {
  color: #f8fafc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 26px;
  align-items: start;
  margin-top: 22px;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
  pointer-events: none;
}

.player-overlay.is-hidden {
  display: none;
}

.play-trigger {
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.player-note {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
  background: rgba(15, 23, 42, 0.96);
}

.detail-panel {
  padding: 26px;
}

.detail-panel h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
}

.detail-poster {
  min-height: 460px;
  border: 1px solid rgba(203, 213, 225, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.82)),
    linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(245, 158, 11, 0.18));
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

.article-body {
  margin-top: 24px;
}

.article-body h2 {
  margin-top: 24px;
  font-size: 22px;
}

.article-body p {
  color: #cbd5e1;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.rank-card {
  display: grid;
  grid-template-columns: 52px 100px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, #f8fafc, #38bdf8);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
}

.rank-card h2 {
  margin: 0;
  font-size: 19px;
}

.rank-card p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.index-panel,
.notice-card {
  padding: 28px;
}

.index-list {
  columns: 4 240px;
  margin-top: 18px;
}

.index-list a {
  display: block;
  break-inside: avoid;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.index-list a:hover {
  color: #f8fafc;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 28px 0 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.64);
}

.pagination span,
.pagination a:hover {
  color: #f8fafc;
  border-color: rgba(203, 213, 225, 0.34);
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-grid h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

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

  .hero-slide,
  .detail-layout,
  .search-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster-link {
    display: none;
  }

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

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

@media (max-width: 640px) {
  main,
  .site-footer,
  .header-inner,
  .mobile-nav {
    width: min(100% - 20px, 1280px);
  }

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

  .hero-wrap {
    min-height: 560px;
    border-radius: 22px;
  }

  .hero-slide {
    padding: 28px 20px 78px;
  }

  .search-form,
  .rank-card {
    grid-template-columns: 1fr;
  }

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

  .content-section,
  .search-panel,
  .detail-panel,
  .index-panel,
  .notice-card {
    padding: 18px;
  }

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