:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --blue: #2563eb;
  --yellow: #facc15;
  --red: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(51, 65, 85, 0.82);
  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 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-size: 15px;
  box-shadow: 0 0 26px rgba(6, 182, 212, 0.36);
}

.brand-text,
.footer-brand {
  font-size: 26px;
  background: linear-gradient(90deg, var(--cyan-light), #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #d1d5db;
  font-weight: 650;
  transition: color 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan-light);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 48%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding: 70px 0;
}

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

.hero-kicker,
.page-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--cyan-light);
  font-weight: 700;
}

.hero-kicker span,
.page-kicker span,
.card-tags span,
.detail-tags span,
.type-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: #a5f3fc;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.08em;
}

.hero p {
  margin: 24px 0 0;
  max-width: 650px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.22);
}

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

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-panel {
  position: relative;
  z-index: 7;
  margin-top: -44px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box input,
.filter-box input,
.filter-box select {
  width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--text);
  padding: 12px 14px;
  outline: 0;
}

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

.search-box a,
.search-box button,
.filter-reset {
  border: 0;
  border-radius: 12px;
  background: var(--cyan);
  color: white;
  font-weight: 800;
  padding: 0 18px;
  cursor: pointer;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(30, 41, 59, 0.46));
}

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

.section-heading h2,
.page-title,
.detail-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-lead,
.detail-lead {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--cyan-light);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 190px;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
  display: none;
}

.movie-card {
  min-width: 0;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.38);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.72));
}

.play-float {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: auto;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.88);
  color: white;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: scale(1);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 12px;
  color: white;
  background: rgba(6, 182, 212, 0.88);
}

.rank-badge {
  left: 12px;
  color: #020617;
  background: var(--yellow);
}

.movie-card-body {
  padding: 14px;
}

.movie-card-body h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.22s ease;
}

.movie-card:hover h2 {
  color: var(--cyan-light);
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.88);
  padding: 3px 8px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: var(--radius);
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 40%), linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

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

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-preview span {
  color: #cbd5e1;
  font-size: 12px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 34%), linear-gradient(135deg, #020617, #0f172a 50%, #1e293b);
}

.detail-hero {
  min-height: 420px;
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.24));
}

.detail-hero .container {
  position: relative;
  z-index: 2;
}

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

.breadcrumb a {
  color: var(--cyan-light);
}

.filter-box {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) auto;
  gap: 12px;
  margin: 28px 0 34px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
}

.filter-reset {
  min-width: 82px;
}

.empty-state {
  display: none;
  margin-top: 20px;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 66px 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-no {
  color: var(--yellow);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
}

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.rank-meta {
  color: var(--cyan-light);
  font-weight: 800;
  white-space: nowrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
  gap: 28px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.content-panel,
.side-panel {
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-inner {
  padding: 24px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.78));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 0 34px rgba(6, 182, 212, 0.45);
  font-size: 32px;
}

.player-cover strong {
  display: block;
  font-size: clamp(18px, 3vw, 26px);
}

.detail-section h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
}

.detail-section + .detail-section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid rgba(51, 65, 85, 0.82);
}

.side-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.side-poster img {
  height: 100%;
  object-fit: cover;
}

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

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

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

.related-item img {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
}

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

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

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.82);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer p {
  max-width: 560px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.56);
  color: var(--muted-2);
  text-align: center;
}

@media (max-width: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

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

  .hero-control {
    display: none;
  }

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

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

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

  .rank-item {
    grid-template-columns: 46px 76px 1fr;
  }

  .rank-meta {
    grid-column: 2 / 4;
  }
}

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

  .brand-text {
    font-size: 21px;
  }

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

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

  .movie-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card-body h2 {
    font-size: 15px;
  }

  .card-tags {
    display: none;
  }
}
