:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --orange: #fb923c;
  --green: #34d399;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 36px rgba(34, 211, 238, 0.35);
}

.brand-text {
  max-width: 18em;
  overflow: hidden;
  color: transparent;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(18px, 2vw, 24px);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
  font-weight: 600;
}

.main-nav a {
  padding: 10px 0;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 8px 12px;
  cursor: pointer;
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.hero-carousel {
  position: relative;
  min-height: min(760px, 82vh);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.04);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, transparent 38%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 90px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.tag-list,
.filter-chip-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span,
.filter-chip-row a,
.filter-chip-row button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1;
}

.hero-actions,
.detail-copy .primary-btn {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link,
.search-form button,
.clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn,
.search-form button {
  color: #04111d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 13px 24px;
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.22);
}

.ghost-btn,
.clear-filter {
  color: #dbeafe;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
  padding: 12px 20px;
}

.text-link {
  color: var(--cyan);
  padding: 8px 0;
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover,
.clear-filter:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
}

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

.search-strip,
.filter-panel,
.side-panel,
.category-overview-block,
.detail-article,
.next-links {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.56));
  box-shadow: var(--shadow);
}

.search-strip {
  margin-top: -58px;
  position: relative;
  z-index: 5;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 500px);
  gap: 24px;
  align-items: center;
}

.search-strip h2,
.section-heading h2,
.side-panel h2,
.player-section h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.search-form,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-form input,
.filter-bar input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.76);
  padding: 14px 18px;
}

.search-form input:focus,
.filter-bar input:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

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

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

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

.small-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 22px;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.45);
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.8);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.28s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 45%);
}

.poster-year,
.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.rank-num {
  left: auto;
  right: 12px;
  color: #fed7aa;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #04111d;
  background: var(--cyan);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.25);
}

.card-body {
  padding: 14px;
}

.card-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.movie-card p {
  margin: 0 0 12px;
  color: #a8b5c7;
  font-size: 13px;
  line-height: 1.7;
}

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

.category-tile,
.category-banner {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.category-tile img,
.category-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.3s ease;
}

.category-tile:hover img,
.category-banner:hover img {
  transform: scale(1.06);
}

.tile-glow,
.category-banner span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-tile strong,
.category-tile small,
.category-banner div {
  position: relative;
}

.category-tile strong {
  font-size: 24px;
}

.category-tile small,
.category-banner p {
  margin-top: 10px;
  color: #cbd5e1;
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: 1.7fr 0.8fr;
  gap: 24px;
}

.side-panel {
  align-self: start;
  padding: 28px;
}

.side-panel p {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 86px 58px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  padding: 14px;
}

.ranking-cover {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
}

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

.ranking-index {
  color: var(--orange);
  font-size: 32px;
  font-weight: 900;
  text-align: center;
}

.ranking-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-copy p {
  margin: 10px 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.compact-ranking .ranking-row {
  grid-template-columns: 66px 44px 1fr;
}

.compact-ranking .ranking-row .text-link {
  display: none;
}

.page-hero {
  padding-top: 82px;
  padding-bottom: 34px;
}

.filter-panel {
  padding: 24px;
}

.filter-chip-row {
  margin-top: 16px;
}

.filter-chip-row button {
  cursor: pointer;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-block {
  overflow: hidden;
  padding: 0;
}

.category-banner {
  min-height: 260px;
  border-radius: 0;
  border: 0;
}

.detail-hero {
  padding-top: 50px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a8b5c7;
  margin-bottom: 24px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.detail-meta div {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  padding: 14px;
}

.detail-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.player-section {
  padding-top: 20px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img,
.player-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  background: #000;
}

.player-cover {
  cursor: pointer;
  z-index: 3;
  border: 0;
  padding: 0;
  overflow: hidden;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.64;
}

.player-shadow {
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 35%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.2));
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #03111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.36);
  font-size: 34px;
  cursor: pointer;
}

.detail-article {
  padding: 30px;
}

.detail-article p {
  color: #dbe5f3;
  line-height: 2;
  font-size: 17px;
}

.next-links {
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.next-links a {
  color: var(--cyan);
  font-weight: 800;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.75);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 30px;
  color: #cbd5e1;
}

.footer-shell strong {
  color: #fff;
  font-size: 20px;
}

.footer-shell p {
  line-height: 1.8;
}

.footer-shell nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
}

.footer-shell a {
  color: #94a3b8;
}

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

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.95);
    padding: 12px 18px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 0;
  }

  .hero-carousel {
    min-height: 700px;
  }

  .hero-content {
    padding-top: 110px;
  }

  .search-strip,
  .split-section,
  .detail-layout,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .search-form,
  .filter-bar {
    flex-direction: column;
  }

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

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

  .ranking-row,
  .compact-ranking .ranking-row {
    grid-template-columns: 70px 1fr;
  }

  .ranking-index {
    display: none;
  }

  .ranking-row .text-link {
    grid-column: 2;
    justify-content: flex-start;
  }

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

  .footer-shell nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .section-shell {
    width: min(100% - 22px, 1180px);
    padding: 36px 0;
  }

  .brand-text {
    max-width: 12em;
  }

  .hero-carousel {
    min-height: 640px;
  }

  .hero-actions,
  .section-heading,
  .next-links {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

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

  .player-start {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
