:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.13), transparent 32rem), linear-gradient(180deg, #0f172a 0%, #020617 50%, #000 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
}

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

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

.brand-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.23);
}

.brand-text {
  font-size: clamp(22px, 2.4vw, 30px);
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

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

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #cbd5e1;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(2, 6, 23, 0.98);
}

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

.hero {
  position: relative;
  height: min(80vh, 780px);
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-overlay.one {
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-overlay.two {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 42%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(72px, 12vh, 120px);
}

.hero-copy {
  max-width: 760px;
}

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

.hero-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.7);
}

.hero h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 14px;
}

.hero-tags span,
.detail-meta span {
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

.hero-tags span:first-child,
.detail-meta span:last-child {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.12);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--cyan-strong);
  color: white;
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 55px rgba(6, 182, 212, 0.4);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.ghost-button:hover,
.text-link:hover {
  color: var(--cyan);
  transform: translateY(-2px);
}

.text-link {
  min-height: 0;
  padding: 0;
  color: var(--cyan);
}

.hero-controls {
  position: absolute;
  right: clamp(20px, 6vw, 72px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: white;
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-controls > button:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.content-section {
  padding: 70px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.section-title > span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.13);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.2;
}

.section-title p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.95));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  content-visibility: auto;
  contain-intrinsic-size: 360px 520px;
}

.movie-card:hover {
  transform: translateY(-7px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 26px 70px rgba(6, 182, 212, 0.13);
}

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

.movie-card.compact .poster-link {
  aspect-ratio: 2 / 3;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.74) 100%);
  opacity: 0.78;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: var(--cyan-strong);
  color: white;
  font-size: 22px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.rank-badge {
  right: auto;
  left: 12px;
  background: rgba(249, 115, 22, 0.9);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

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

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
}

.meta-row span:last-child {
  max-width: 40%;
  padding: 3px 8px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(51, 65, 85, 0.95);
  color: #cbd5e1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 20px;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 55%), rgba(15, 23, 42, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 20px;
  font-weight: 850;
}

.category-tile strong {
  display: block;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.3fr;
  gap: 34px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(30, 41, 59, 0.86);
}

.rank-item img {
  width: 72px;
  height: 102px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-item strong {
  display: block;
  margin-bottom: 8px;
  color: #f8fafc;
}

.rank-item em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.mini-rank {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
  font-weight: 850;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(12px);
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.search-box input,
.select-box select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.64);
  color: #e2e8f0;
  padding: 0 16px;
}

.search-box input:focus,
.select-box select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.subpage {
  min-height: 70vh;
}

.page-hero {
  margin-top: 34px;
  padding: clamp(48px, 8vw, 86px);
  border: 1px solid rgba(51, 65, 85, 0.68);
  border-radius: 30px;
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.2), transparent 35%), radial-gradient(circle at right, rgba(59, 130, 246, 0.18), transparent 38%), rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(42px, 7vw, 70px);
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 178px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
}

.category-feature {
  grid-template-columns: 1fr 1fr;
}

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

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.52));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: var(--cyan-strong);
  font-size: 34px;
  box-shadow: 0 20px 55px rgba(6, 182, 212, 0.36);
}

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

.detail-panel,
.side-card {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-panel h2,
.side-card h2 {
  margin: 24px 0 10px;
  font-size: 21px;
}

.detail-panel section:first-of-type h2 {
  margin-top: 0;
}

.detail-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.lead-text {
  color: #cffafe !important;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 26px;
}

.tag-list span {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.78);
  color: #cbd5e1;
  font-size: 13px;
}

.detail-side {
  position: relative;
}

.side-card {
  position: sticky;
  top: 100px;
  margin-top: 0;
}

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

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(0, 0, 0, 0.95));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 20px;
}

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

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

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

.footer-bottom {
  padding: 22px 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
  color: var(--subtle);
  text-align: center;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .desktop-nav {
    gap: 18px;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    padding-bottom: 110px;
  }

  .hero-controls {
    right: 16px;
    left: 16px;
    justify-content: center;
  }

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

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

  .category-large-grid,
  .wide-rank-list {
    grid-template-columns: 1fr;
  }

  .detail-side .side-card {
    position: static;
  }
}

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

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

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

  .hero {
    min-height: 620px;
  }

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

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

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    margin-top: 20px;
    padding: 34px 22px;
    border-radius: 22px;
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: auto 58px 1fr;
  }

  .rank-item img {
    width: 58px;
    height: 84px;
  }

  .detail-panel,
  .side-card {
    padding: 18px;
  }
}
