:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --orange: #fb923c;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 88% 20%, rgba(37, 99, 235, 0.18), transparent 35%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.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.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.35);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
  font-size: 14px;
}

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

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

.nav-link,
.mobile-nav-link {
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  outline: none;
}

.header-search input {
  width: 190px;
  border: 0;
  border-radius: 0;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.filter-panel button {
  color: white;
  border: 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.mobile-nav {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.98);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 4s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.15)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.6) 35%, transparent 72%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 78px;
  max-width: 760px;
}

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

.hero-kicker span,
.eyebrow {
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta-line,
.movie-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta-line span,
.movie-meta span,
.rank-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.hero-actions,
.page-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.ghost-button,
.section-more {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.45);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
  transform: translateY(-50%);
  font-size: 34px;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 48px;
  bottom: 42px;
  display: flex;
  gap: 8px;
}

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

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

.content-section {
  padding: 54px 0;
}

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

.section-heading h2,
.panel-title,
.text-panel h2,
.tag-panel h2,
.related-panel h2 {
  margin: 0;
  color: white;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading p,
.page-hero p,
.movie-desc,
.rank-content p,
.detail-header p,
.text-panel p {
  color: var(--muted);
}

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 24px 65px rgba(8, 145, 178, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.12)),
    #0f172a;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.12) contrast(1.08);
}

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

.duration-badge,
.play-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  color: white;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.duration-badge {
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

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

.movie-title,
.rank-title {
  display: block;
  color: white;
  font-weight: 900;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-title:hover,
.rank-title:hover {
  color: var(--cyan);
}

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 8px 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.movie-meta {
  gap: 7px;
  font-size: 12px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  color: #a5f3fc;
  padding: 4px 8px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  font-size: 12px;
}

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

.ranking-panel,
.detail-info-card,
.related-panel,
.text-panel,
.tag-panel,
.filter-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 22px;
}

.panel-title {
  margin-bottom: 18px;
  font-size: 24px;
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  min-height: 98px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
}

.rank-number {
  left: 8px;
  top: 8px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(37, 99, 235, 0.92));
}

.rank-thumb {
  overflow: hidden;
  border-radius: 10px;
  background: #0f172a;
}

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

.rank-content p {
  display: -webkit-box;
  margin: 6px 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

.rank-meta {
  font-size: 12px;
}

.category-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.category-tile,
.overview-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-tile::before,
.overview-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile span {
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted-strong);
  margin-top: 8px;
}

.page-hero {
  padding: 76px 0 30px;
}

.page-hero h1 {
  margin: 18px 0 12px;
  color: white;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.overview-tile {
  min-height: 240px;
  padding: 0;
  background: rgba(15, 23, 42, 0.7);
}

.overview-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.overview-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 24px;
  margin-top: auto;
}

.overview-content strong {
  color: white;
  font-size: 25px;
}

.overview-content em {
  color: var(--muted-strong);
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto minmax(160px, auto);
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 26px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
}

.filter-panel button {
  min-height: 48px;
  border-radius: 12px;
}

.filter-panel strong {
  color: var(--muted);
  font-size: 14px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 30px;
  align-items: start;
}

.ranking-panel.wide .rank-list {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.detail-page {
  padding: 34px 0 64px;
}

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

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

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

.video-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 22px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  border: 0;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.2), rgba(0, 0, 0, 0.54));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.large-play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 55px rgba(34, 211, 238, 0.35);
  font-size: 28px;
}

.player-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  margin: 0;
  color: #fef3c7;
  font-size: 14px;
}

.detail-header {
  padding: 26px 0;
}

.detail-header h1 {
  margin: 16px 0 10px;
  color: white;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.text-panel,
.tag-panel,
.related-panel,
.detail-info-card {
  padding: 22px;
  margin-bottom: 20px;
}

.text-panel h2,
.tag-panel h2,
.related-panel h2 {
  margin-bottom: 12px;
  font-size: 23px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 16px;
}

.large-tags .tag {
  font-size: 13px;
  padding: 6px 10px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.detail-info-card img {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
}

.detail-facts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-facts span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted-strong);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-facts b {
  color: white;
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: stretch;
}

.movie-card-horizontal .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

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

.movie-card-horizontal .movie-desc {
  min-height: auto;
  margin: 6px 0 8px;
  -webkit-line-clamp: 2;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 36px;
  align-items: start;
}

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

.footer-links {
  display: grid;
  gap: 9px;
  min-width: 120px;
}

.footer-links a {
  color: var(--muted-strong);
}

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

[hidden] {
  display: none !important;
}

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

  .menu-button {
    display: block;
  }

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

  .detail-side {
    position: static;
  }
}

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

  .logo-text {
    font-size: 22px;
  }

  .hero-slider {
    min-height: 610px;
    height: 78vh;
  }

  .hero-content {
    margin-bottom: 82px;
  }

  .hero-arrow {
    top: auto;
    bottom: 28px;
    transform: none;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    left: 72px;
    right: auto;
  }

  .hero-dots {
    right: 18px;
    bottom: 42px;
  }

  .section-heading,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

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

  .movie-desc {
    min-height: 42px;
    font-size: 13px;
  }

  .detail-page {
    padding-top: 22px;
  }

  .text-panel,
  .tag-panel,
  .related-panel,
  .detail-info-card,
  .ranking-panel {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

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

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