:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-soft: #0d1424;
  --panel: #111827;
  --panel-strong: #182235;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #9ca3af;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --gold: #facc15;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px 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 top left, rgba(37, 99, 235, 0.18), transparent 36rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 22, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell,
.footer-shell,
.page-shell,
.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45);
  font-size: 14px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #090d18;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 5s ease;
}

.hero-slide.active .hero-bg {
  transform: scale(1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.14)), linear-gradient(0deg, #070b16 0%, transparent 34%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 42px;
}

.hero-eyebrow,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.86);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.35);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 22px;
  max-width: 640px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.36);
}

.btn-primary:hover {
  background: var(--blue-strong);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  backdrop-filter: blur(14px);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
}

.hero-tags span {
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: #ffffff;
}

.page-shell {
  padding: 44px 0 58px;
}

.section-block {
  margin: 0 0 54px;
}

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

.section-head h2,
.page-title-row h1,
.detail-content h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-title-row p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  flex: 0 0 auto;
  color: #93c5fd;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.8);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  transform: translateY(-6px);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.card-cover img,
.list-cover img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover img,
.movie-list-card:hover img,
.category-card:hover img {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.card-badge,
.card-score,
.rank-no {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.card-score {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
}

.rank-no {
  left: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 204, 21, 0.94);
  color: #111827;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-meta span:not(:last-child)::after {
  content: "";
  width: 3px;
  height: 3px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.4);
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

.movie-list-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-list-card:hover {
  border-color: rgba(96, 165, 250, 0.38);
  transform: translateY(-3px);
}

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

.list-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.list-title-row a {
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.list-rank {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #111827;
}

.list-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin: 24px 0 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.78);
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 15px;
}

.search-input:focus {
  border-color: rgba(96, 165, 250, 0.68);
}

.search-status {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  font-weight: 700;
}

.search-status.show {
  display: inline-flex;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
}

.category-cover {
  position: absolute;
  inset: 0;
}

.category-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 24px;
}

.category-content h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-content p {
  margin: 0 0 16px;
  color: #dbeafe;
  line-height: 1.65;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, #070b16 0%, transparent 36%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0 56px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-info p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.85;
}

.breadcrumb {
  margin-bottom: 20px;
  color: #bfdbfe;
  font-size: 14px;
}

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

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.info-pills span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.watch-section {
  width: min(1180px, calc(100% - 32px));
  margin: -18px auto 42px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.movie-player.is-playing .player-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 20px 55px rgba(37, 99, 235, 0.45);
}

.play-icon::before {
  content: "";
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid #ffffff;
}

.player-layer strong {
  font-size: 18px;
}

.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
}

.article-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(17, 24, 39, 0.82);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
}

.article-panel {
  padding: 28px;
}

.article-panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.article-panel h3 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.article-panel p {
  color: var(--muted-strong);
  line-height: 1.9;
}

.side-panel {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #050812;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 480px);
  gap: 32px;
  padding: 40px 0 22px;
}

.footer-brand {
  margin-bottom: 14px;
}

.footer-shell p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
}

.footer-links a:hover {
  background: rgba(37, 99, 235, 0.22);
  color: #ffffff;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hidden-card {
  display: none !important;
}

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

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

  .side-panel {
    position: static;
  }
}

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

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

  .mobile-menu.open {
    display: grid;
    gap: 6px;
  }

  .hero {
    height: 64vh;
    min-height: 500px;
  }

  .hero-control {
    display: none;
  }

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

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 46px;
  }

  .detail-poster {
    width: min(260px, 78vw);
  }

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

  .footer-links {
    justify-content: flex-start;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .page-shell,
  .hero-inner,
  .detail-wrap,
  .watch-section,
  .detail-content {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 18px;
  }

  .hero p,
  .detail-info p {
    font-size: 15px;
  }

  .section-head,
  .page-title-row {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .horizontal-row {
    grid-auto-columns: 76%;
  }

  .movie-list-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .list-title-row a {
    font-size: 16px;
  }

  .article-panel {
    padding: 20px;
  }
}
