:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #ffffff;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #60a5fa;
  --orange: #fb923c;
  --violet: #a78bfa;
  --border: rgba(34, 211, 238, 0.18);
  --soft-border: rgba(148, 163, 184, 0.16);
  --shadow: 0 20px 70px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(99, 102, 241, 0.16), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(8, 145, 178, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: flex;
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.78)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 42%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 78vh;
  padding: 150px 0 94px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 24px 0 0;
}

.hero-meta span,
.detail-meta span,
.detail-meta strong,
.meta-line span,
.meta-line strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.13);
  color: #cbd5e1;
  font-size: 13px;
}

.detail-meta strong,
.meta-line strong {
  border-color: rgba(251, 146, 60, 0.3);
  background: rgba(251, 146, 60, 0.14);
  color: #fed7aa;
}

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

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

.primary-btn {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: white;
  box-shadow: 0 14px 36px rgba(8, 145, 178, 0.28);
}

.ghost-btn {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: #dbeafe;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.26);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 36px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-mini-list {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  display: grid;
  width: 280px;
  gap: 10px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  backdrop-filter: blur(12px);
}

.hero-mini-card.active {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(8, 145, 178, 0.26);
  color: white;
}

.hero-mini-card img {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.search-entry,
.home-section,
.page-main,
.category-section,
.list-section,
.rank-section,
.detail-related {
  position: relative;
}

.search-entry {
  margin-top: -38px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-entry h2,
.page-hero h1,
.section-heading h2,
.strip-title h2,
.detail-content h1,
.detail-content h2,
.side-card h2,
.site-footer h2 {
  margin: 0;
  color: white;
  line-height: 1.2;
}

.search-entry p,
.page-hero p,
.section-heading p,
.site-footer p,
.detail-content p,
.category-card p {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--soft-border);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.64);
  color: #e2e8f0;
  padding: 0 12px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.empty-state {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 16px;
  background: rgba(251, 146, 60, 0.1);
  color: #fed7aa;
}

.home-section,
.category-section,
.list-section,
.rank-section,
.detail-related {
  padding-top: 72px;
}

.page-main {
  padding-top: 112px;
}

.page-hero {
  padding: 56px 0 18px;
}

.small-hero {
  min-height: 220px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

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

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading p {
  margin: 8px 0 0;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 20px 50px rgba(8, 145, 178, 0.14);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(8, 145, 178, 0.2));
}

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.wide-card .poster {
  aspect-ratio: auto;
  min-height: 220px;
}

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

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

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

.play-badge,
.year-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.92);
  color: #001018;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
  right: 10px;
  top: 10px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #dbeafe;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.rank-num {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), #facc15);
  color: #2b1300;
}

.card-info {
  padding: 16px;
}

.card-info h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: white;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-info h2 a:hover {
  color: var(--cyan);
}

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

.meta-line {
  justify-content: space-between;
  gap: 6px;
}

.meta-line span,
.meta-line strong {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  font-size: 12px;
}

.category-browse {
  padding-bottom: 4px;
}

.category-strip {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.36));
}

.strip-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.strip-title a {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-card {
  min-height: 130px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.12));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card span {
  display: block;
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 0;
  font-size: 14px;
}

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

.detail-main {
  padding-top: 104px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-primary,
.detail-side {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 20px 80px rgba(8, 145, 178, 0.18);
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: rgba(2, 6, 23, 0.34);
  color: white;
  cursor: pointer;
}

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

.big-play {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #001018;
  font-size: 34px;
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.45);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  max-width: calc(100% - 36px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 13px;
  pointer-events: none;
}

.player-status:empty {
  display: none;
}

.detail-content,
.side-card {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-content h1 {
  font-size: clamp(30px, 5vw, 48px);
}

.detail-meta {
  margin-top: 16px;
}

.one-line {
  color: #dbeafe !important;
  font-size: 18px;
}

.detail-content h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 22px;
}

.detail-content p {
  margin: 12px 0 0;
  font-size: 16px;
}

.detail-cover {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(8, 145, 178, 0.2));
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 16px 0 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #e2e8f0;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0 28px;
}

.footer-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.site-footer h2 {
  font-size: 17px;
}

.site-footer a,
.site-footer p,
.footer-bottom {
  color: var(--muted);
  font-size: 14px;
}

.footer-bottom {
  padding: 18px 0 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

[hidden],
.movie-card.is-hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-mini-list {
    display: none;
  }

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

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

  .compact-grid,
  .wide-grid,
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
  }

  .side-card {
    margin-top: 0;
  }

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

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

  .header-inner {
    min-height: 66px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .hero,
  .hero-content {
    min-height: 74vh;
  }

  .hero-content {
    padding: 112px 0 76px;
  }

  .hero-arrow {
    display: none;
  }

  .search-entry {
    margin-top: -24px;
    padding: 18px;
  }

  .filter-panel,
  .movie-grid,
  .compact-grid,
  .wide-grid,
  .category-card-grid,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-template-columns: 110px 1fr;
  }

  .wide-card .poster {
    min-height: 170px;
  }

  .home-section,
  .category-section,
  .list-section,
  .rank-section,
  .detail-related {
    padding-top: 46px;
  }

  .section-heading,
  .strip-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .detail-main,
  .page-main {
    padding-top: 82px;
  }

  .player-shell {
    border-radius: 16px;
  }

  .detail-content,
  .side-card,
  .category-strip {
    padding: 18px;
    border-radius: 18px;
  }
}
