:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.16), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--text);
}

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

.hero-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-background {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  padding: clamp(32px, 6vw, 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: clamp(32px, 7vw, 92px);
}

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

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

.hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.intro-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.video-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.video-button {
  border: 0;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.22);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text);
  background: rgba(15, 23, 42, 0.68);
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 28px;
  box-shadow: 0 34px 82px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #00111a;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: clamp(32px, 6vw, 84px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 30px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 58px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.content-section {
  width: min(1220px, calc(100% - 32px));
  margin: 76px auto;
}

.intro-section {
  margin-top: 40px;
}

.intro-card {
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.intro-card h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.intro-card p,
.page-hero p,
.detail-title p,
.section-heading p,
.category-card p,
.movie-desc,
.detail-text p,
.footer-brand p {
  color: var(--muted);
  line-height: 1.8;
}

.intro-card > p:last-of-type {
  max-width: 860px;
  margin-top: 18px;
  font-size: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
}

.section-line {
  flex: 0 0 auto;
  width: 5px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-link {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
}

.section-link:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.44);
}

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

.category-card {
  display: block;
  padding: 18px;
  min-height: 250px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  font-size: 14px;
}

.filter-panel {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.search-control {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.search-control input,
.search-control select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: var(--text);
  background: #0f172a;
  outline: none;
  padding: 0 14px;
}

.search-control input:focus,
.search-control select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.9));
}

.play-chip,
.year-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.year-chip {
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title:hover {
  color: var(--cyan);
}

.movie-meta {
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 0;
  overflow: hidden;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 12px;
  background: rgba(8, 145, 178, 0.12);
}

.hero-tags span {
  color: var(--text);
  background: rgba(15, 23, 42, 0.68);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-number {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 950;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
}

.rank-title,
.rank-meta {
  grid-column: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-title {
  align-self: end;
  font-weight: 900;
}

.rank-meta {
  align-self: start;
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 28px auto 46px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.56));
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: 17px;
}

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

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

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

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

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

.detail-title p {
  margin: 18px 0 0;
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.78);
}

.detail-layout {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.detail-panel,
.side-panel,
.player-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.22);
}

.player-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

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

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

.video-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.video-button:hover {
  transform: translate(-50%, -52%);
}

.video-button.is-hidden {
  display: none;
}

.player-info {
  padding: 18px 22px;
  color: var(--soft);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.detail-panel {
  padding: clamp(24px, 4vw, 38px);
}

.detail-text h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.detail-text h2:not(:first-child) {
  margin-top: 34px;
}

.detail-text p {
  margin: 0 0 18px;
  font-size: 16px;
}

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

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

.side-link {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
}

.side-link:hover {
  border-color: rgba(34, 211, 238, 0.34);
}

.side-link img {
  width: 62px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
}

.side-link strong,
.side-link span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-link strong {
  font-size: 14px;
}

.side-link span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 620px;
  margin: 16px 0 0;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

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

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    border-radius: 14px;
  }

  .hero-shell,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .hero,
  .content-section,
  .page-hero,
  .detail-hero,
  .detail-layout,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1220px);
  }

  .hero-shell,
  .hero-content {
    min-height: 660px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .filter-grid,
  .movie-grid,
  .category-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

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

  .section-link {
    display: none;
  }

  .footer-bottom,
  .player-info {
    flex-direction: column;
  }
}
