:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-strong: #0891b2;
  --blue: #3b82f6;
  --orange: #f97316;
  --green: #22c55e;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 10% 0%, rgba(8, 145, 178, 0.20), transparent 28%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #020617, #0f172a 48%, #020617);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 26px rgba(6, 182, 212, 0.45);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
  color: #e2e8f0;
}

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

.main-nav a:hover {
  color: #22d3ee;
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 15px 10px 38px;
  outline: none;
  background: #1e293b;
  color: #fff;
}

.header-search input:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #e2e8f0;
}

.mobile-nav a:hover {
  background: #1e293b;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.65) 46%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 20px 86px;
}

.hero-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--cyan);
  color: white;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hero-title {
  max-width: 820px;
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 720px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 11px 22px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
  background: var(--cyan);
  color: white;
}

.btn-primary:hover {
  background: var(--cyan-strong);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.54);
  color: white;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  font-size: 28px;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

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

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

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

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
}

.section {
  margin-bottom: 56px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.section-title span {
  width: 9px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-link {
  color: #22d3ee;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 22px;
}

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

.grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.42);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 48%);
  opacity: 0.85;
}

.year-tag,
.rank-tag {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.66);
  padding: 4px 9px;
  font-size: 12px;
  color: white;
}

.rank-tag {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-category {
  display: inline-block;
  margin-bottom: 8px;
  color: #22d3ee;
  font-size: 12px;
  font-weight: 800;
}

.card-title {
  margin: 0 0 6px;
  color: white;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card:hover .card-title {
  color: #22d3ee;
}

.card-meta,
.card-text {
  color: var(--muted);
  font-size: 13px;
}

.card-text {
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 10px;
}

.category-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.82));
  transition: transform 0.18s ease, border-color 0.18s ease;
}

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

.category-panel h2,
.category-panel h3 {
  margin: 0 0 10px;
}

.category-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.22), transparent 35%), linear-gradient(135deg, #020617, #0f172a);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 66px 20px 52px;
}

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

.breadcrumb a {
  color: #22d3ee;
}

.page-title {
  max-width: 880px;
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.page-desc {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-box {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-box input,
.filter-box select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  outline: none;
  background: #0f172a;
  color: white;
}

.filter-box input:focus,
.filter-box select:focus {
  border-color: rgba(34, 211, 238, 0.6);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  z-index: 3;
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: var(--cyan);
  color: white;
  font-size: 36px;
  box-shadow: 0 0 42px rgba(6, 182, 212, 0.52);
}

.movie-info-panel {
  margin-top: 24px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid var(--line);
}

.movie-info-panel h2,
.movie-info-panel h3 {
  margin: 22px 0 10px;
}

.movie-info-panel h2:first-child,
.movie-info-panel h3:first-child {
  margin-top: 0;
}

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

.meta-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #1e293b;
  color: #cbd5e1;
  padding: 7px 12px;
  font-size: 13px;
}

.tag-chip:hover {
  background: #334155;
  color: white;
}

.side-box {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 18px;
}

.side-box h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.18s ease;
}

.related-item:hover {
  background: rgba(30, 41, 59, 0.76);
}

.related-item img {
  width: 92px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 128px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.rank-row img {
  width: 128px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #94a3b8;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

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

.footer-inner p,
.footer-inner a {
  color: #94a3b8;
}

.footer-inner a:hover {
  color: #22d3ee;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.clamp-1,
.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-1 {
  -webkit-line-clamp: 1;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

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

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

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

  .side-box {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero-slider {
    min-height: 68vh;
  }

  .hero-content {
    padding: 42px 20px 78px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }
}

@media (max-width: 540px) {
  .header-inner {
    height: 62px;
  }

  .logo {
    font-size: 21px;
  }

  .container {
    padding: 34px 14px;
  }

  .page-hero-inner {
    padding: 46px 14px 38px;
  }

  .grid.cards,
  .grid.compact,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 132px 1fr;
  }

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

  .rank-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
