:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #0891b2;
  --accent: #38bdf8;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.17), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, 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;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.34);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.main-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
  border-radius: 999px;
}

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

.hero-stage {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 98px);
  bottom: clamp(32px, 9vw, 108px);
  width: min(720px, calc(100% - 48px));
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.64);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  font-weight: 950;
  text-wrap: balance;
}

.hero-content p {
  margin: 0;
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  color: #bae6fd;
  font-size: 12px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.section-more,
.play-mask button,
.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.22);
}

.ghost-btn,
.section-more,
.small-link {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: #dbeafe;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(2, 6, 23, 0.5);
  color: white;
  font-size: 34px;
  cursor: pointer;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 14px;
}

.hero-dot {
  width: 28px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.hero-thumb {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #0f172a;
}

.hero-thumb img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hero-thumb:hover img {
  opacity: 0.9;
  transform: scale(1.06);
}

.hero-thumb span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.content-section,
.page-hero,
.detail-layout,
.player-section {
  width: min(1440px, calc(100% - 32px));
  margin: 56px auto 0;
}

.page-hero {
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.8));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 56px rgba(8, 145, 178, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: #111827;
}

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

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

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

.play-badge {
  left: 12px;
  bottom: 12px;
  padding: 8px 11px;
  background: rgba(6, 182, 212, 0.92);
}

.year-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: block;
  min-height: 48px;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
}

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

.card-body p {
  min-height: 66px;
  margin: 8px 0 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.65;
}

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.meta-line a {
  color: #67e8f9;
}

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

.category-card {
  min-height: 188px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.74), rgba(15, 23, 42, 0.88)),
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.2), transparent 12rem);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.72;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  padding: 0 13px;
  outline: none;
}

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

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

.detail-main,
.detail-side,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
}

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

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 2;
}

.play-mask.is-hidden {
  display: none;
}

.play-mask button {
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  min-width: 138px;
}

.detail-content {
  padding: clamp(22px, 4vw, 34px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 13px;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.info-list li {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.6);
  color: #cbd5e1;
  border: 1px solid var(--line);
  font-size: 13px;
}

.text-panel {
  padding: 24px;
  margin-top: 18px;
}

.text-panel h2,
.detail-side h2 {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: 21px;
  font-weight: 950;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-side {
  padding: 20px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 18px;
}

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

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

.side-links a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid var(--line);
  color: #dbeafe;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 16px;
}

.related-grid .card-title {
  min-height: auto;
}

.related-grid .card-body p {
  display: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

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

.rank-row img {
  width: 86px;
  height: 116px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-info p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.72;
}

.rank-score {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  font-weight: 950;
}

.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 70px auto 0;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 26px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: 16px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.copyright {
  margin-top: 28px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .menu-button {
    display: block;
  }

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

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

  .hero-stage {
    min-height: 620px;
    border-radius: 22px;
  }

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-score {
    grid-column: 2 / -1;
    width: max-content;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .hero-carousel,
  .content-section,
  .page-hero,
  .detail-layout,
  .player-section,
  .site-footer,
  .filter-panel {
    width: min(100% - 22px, 1440px);
  }

  .hero-stage {
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-title {
    min-height: 44px;
    font-size: 14px;
  }

  .card-body p {
    display: none;
  }

  .rank-info p {
    display: none;
  }
}
