:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.20), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.brand-text strong,
.brand-text em {
  display: block;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 15px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.13);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  font-size: 22px;
}

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

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.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-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.75));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1200px) / 2));
  bottom: 72px;
  width: min(720px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 12px 0 18px;
  font-size: clamp(40px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

.hero-meta,
.meta-line,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

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

.hero-tags {
  margin: 16px 0 0;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 13px 22px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.28);
}

.ghost-btn,
.section-link,
.filter-button {
  padding: 12px 18px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.64);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(14px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-shell,
.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.content-section {
  margin: 0 auto;
  padding: 56px 0 0;
}

.content-section:first-child {
  padding-top: 48px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.category-intro,
.detail-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.25);
  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.4);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.35);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--cyan);
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  color: var(--muted-2);
  font-size: 12px;
}

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

.tag-row span {
  font-size: 12px;
}

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

.category-card {
  display: block;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px auto;
  gap: 12px;
  margin: 30px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

.rank-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
  text-align: center;
}

.rank-item img {
  width: 120px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.rank-content h2,
.rank-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.rank-score {
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #a5f3fc;
  text-align: center;
  background: rgba(8, 145, 178, 0.14);
}

.detail-hero {
  padding: 42px 0 26px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.98)),
    var(--bg);
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 30px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  z-index: 2;
}

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

.player-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.38);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.side-card {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.info-table {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.info-table div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.info-table strong {
  color: var(--text);
  text-align: right;
}

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

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  color: var(--muted);
}

.footer-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.footer-grid p {
  margin: 0;
  line-height: 1.8;
}

.footer-grid a {
  margin-right: 14px;
}

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

  .side-card {
    position: static;
  }

  .rank-item {
    grid-template-columns: 52px 96px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1200px);
    height: 66px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-content {
    left: 18px;
    bottom: 58px;
    width: calc(100% - 36px);
  }

  .hero-arrow {
    display: none;
  }

  .page-shell,
  .detail-shell {
    width: min(100% - 24px, 1200px);
    padding: 34px 0;
  }

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

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

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

  .rank-item {
    grid-template-columns: 42px 82px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-item img {
    width: 82px;
  }

  .rank-content p {
    display: none;
  }

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