:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --green: #34d399;
  --orange: #fb923c;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.46);
}

.brand-text {
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
}

.main-nav a {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(320px, 30vw);
}

.site-search input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 0 48px 0 18px;
  color: #ffffff;
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.site-search button {
  position: absolute;
  right: 4px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.34) 42%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: 680px;
  padding: 70px 0 110px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  padding: 7px 14px;
  color: #67e8f9;
  background: rgba(8, 47, 73, 0.42);
  font-weight: 700;
  font-size: 14px;
}

.hero h1,
.hero h2 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

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

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

.hero-tags span,
.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 16px 35px rgba(34, 211, 238, 0.28);
}

.btn-secondary {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.24);
}

.hero-poster-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: #0f172a;
}

.hero-poster-meta {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.86));
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.36);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.section {
  padding: 56px 0;
}

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

.section-title-row h2,
.page-title,
.detail-content h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-title-row p,
.page-copy {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-card {
  min-height: 128px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.13), transparent 10rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 35px rgba(2, 6, 23, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.23);
  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.48);
  box-shadow: 0 25px 65px rgba(2, 6, 23, 0.35);
}

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

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

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

.card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 46px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.48);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
}

.card-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #67e8f9;
  font-size: 13px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-title a:hover {
  color: #67e8f9;
}

.card-text {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.65;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 110px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  font-weight: 900;
  font-size: 20px;
}

.rank-item img {
  width: 110px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.6;
}

.page-hero {
  padding: 70px 0 32px;
}

.page-hero-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0 0 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.page-search {
  flex: 1 1 260px;
  min-width: min(100%, 260px);
}

.page-search input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  outline: none;
  background: rgba(2, 6, 23, 0.7);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.86);
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.empty-state {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  padding: 28px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 56px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.24;
  filter: blur(3px) saturate(1.08);
  transform: scale(1.08);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.7), #020617 90%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.detail-summary {
  max-width: 860px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

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

.player-section {
  padding: 48px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.48);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 45px rgba(34, 211, 238, 0.38);
  font-size: 34px;
}

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

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  padding-bottom: 64px;
}

.content-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.content-panel p,
.side-panel p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

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

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

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 42px 0;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-poster-card {
    max-width: 340px;
  }

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

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

  .detail-poster {
    max-width: 300px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav,
  .site-search {
    display: none;
    width: 100%;
  }

  .site-header.is-open .main-nav,
  .site-header.is-open .site-search {
    display: flex;
  }

  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 8px;
  }

  .site-search {
    width: 100%;
    margin-bottom: 8px;
  }

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

  .hero-content {
    padding-top: 42px;
    gap: 28px;
  }

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

  .rank-item {
    grid-template-columns: 52px 90px 1fr;
  }

  .rank-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 17px;
  }

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

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

  .hero p,
  .detail-summary {
    font-size: 16px;
  }

  .hero-poster-card {
    display: none;
  }

  .hero-content {
    display: flex;
    min-height: 640px;
  }

  .section {
    padding: 38px 0;
  }

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

  .movie-grid,
  .category-strip,
  .rank-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail-info h1 {
    font-size: 34px;
  }

  .content-panel,
  .side-panel {
    padding: 20px;
  }
}
