:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.2);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #f8fafc;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.16), transparent 26rem),
    radial-gradient(circle at 82% 12%, rgba(96, 165, 250, 0.14), transparent 25rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
}

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

.nav-link,
.mobile-nav a {
  padding: 9px 13px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav a:hover {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.92);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(320px, 28vw);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  overflow: hidden;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.header-search button {
  border: 0;
  color: #04111e;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 10px 13px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

main {
  min-height: 70vh;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.78)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.66) 38%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  bottom: 74px;
  width: min(690px, calc(100vw - 44px));
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.52);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--white);
  text-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero-content h2 {
  font-size: clamp(34px, 5vw, 64px);
}

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

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.btn-primary {
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.28);
}

.btn-secondary {
  color: #dff8ff;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

.btn-ghost {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.42);
}

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

.hero-dots {
  position: absolute;
  left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
}

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

.content-wrap {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
}

.home-search-panel {
  position: relative;
  z-index: 4;
  margin-top: -36px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.home-search-panel form,
.filters {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
}

.home-search-panel input,
.filters input,
.filters select {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.54);
  padding: 0 14px;
}

.home-search-panel button,
.filters button {
  border: 0;
  border-radius: 14px;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 0 18px;
  font-weight: 800;
}

.section-block {
  padding: 58px 0 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 12px 0 0;
  color: var(--white);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section-title p,
.category-intro,
.detail-copy p,
.detail-meta p {
  color: #a8b5c6;
  line-height: 1.82;
}

.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: var(--radius-lg);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.92);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.card-year,
.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 45px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-body p {
  display: -webkit-box;
  min-height: 64px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #9caec3;
  font-size: 13px;
  line-height: 1.62;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-tags,
.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.card-tags span,
.info-pills span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.78);
  font-size: 12px;
}

.card-tags {
  margin-top: 9px;
}

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

.feature-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.22));
}

.feature-card-content {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.feature-card h2,
.feature-card h3 {
  margin: 10px 0 8px;
  color: var(--white);
  font-size: 24px;
}

.feature-card p {
  color: #cbd5e1;
  line-height: 1.65;
}

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

.category-tile {
  position: relative;
  min-height: 188px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 12rem),
    rgba(15, 23, 42, 0.74);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #aebbd0;
  line-height: 1.78;
}

.category-tile span {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(125, 211, 252, 0.22);
  font-size: 52px;
  font-weight: 900;
}

.page-hero,
.detail-head {
  position: relative;
  overflow: hidden;
  padding: 78px 0 32px;
}

.page-hero::before,
.detail-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 22%, rgba(34, 211, 238, 0.16), transparent 24rem),
    radial-gradient(circle at 82% 0%, rgba(96, 165, 250, 0.12), transparent 22rem);
  pointer-events: none;
}

.page-hero .content-wrap,
.detail-head .content-wrap {
  position: relative;
  z-index: 2;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #93a7bd;
  font-size: 14px;
}

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

.slash {
  color: #475569;
}

.page-hero h1,
.detail-title {
  max-width: 920px;
  margin: 0;
  color: var(--white);
  font-size: clamp(32px, 4.7vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #aebbd0;
  line-height: 1.86;
}

.filter-panel {
  margin: 28px 0 26px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.78);
}

.result-count {
  margin-top: 12px;
  color: #93a7bd;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-copy,
.detail-meta,
.related-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-player {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-poster {
  z-index: 2;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.24s ease;
}

.player-shell::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 19rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.08));
  pointer-events: none;
}

.player-start {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 16px 24px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.32);
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.player-shell.is-playing .player-poster,
.player-shell.is-playing .player-start,
.player-shell.is-playing::after {
  opacity: 0;
  pointer-events: none;
}

.player-meta {
  padding: 18px;
}

.player-meta h2 {
  margin: 0 0 8px;
  color: var(--white);
}

.detail-copy {
  margin-top: 24px;
  padding: 26px;
}

.detail-copy h2,
.detail-meta h2,
.related-panel h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 20px;
}

.detail-meta,
.related-panel {
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
  background: #0f172a;
}

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

.meta-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.meta-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.meta-row strong {
  color: #7dd3fc;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.52);
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.82);
}

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

.related-item strong {
  display: block;
  color: var(--white);
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 5px;
  color: #93a7bd;
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

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

.rank-index {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 88px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 20px;
}

.rank-row p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #9caec3;
  line-height: 1.68;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.empty-message {
  display: none;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  text-align: center;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 40px 0 30px;
}

.footer-grid p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.78;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #728199;
  font-size: 14px;
}

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

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

@media (max-width: 960px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

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

  .feature-strip,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 20px;
  }

  .home-search-panel form,
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 72px minmax(0, 1fr);
  }

  .rank-row .btn-secondary {
    grid-column: 3;
    width: max-content;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
  }

  .content-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 32px, 1240px);
  }

  .hero-slider,
  .hero-slide img {
    min-height: 76vh;
  }

  .hero-content {
    left: 16px;
    bottom: 78px;
    width: calc(100% - 32px);
  }

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

  .hero-dots {
    left: 16px;
  }

  .home-search-panel form,
  .filters,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body p {
    min-height: 56px;
  }

  .detail-copy,
  .detail-meta,
  .related-panel {
    padding: 18px;
  }

  .rank-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    width: 64px;
  }

  .rank-row h2 {
    font-size: 17px;
  }
}
