:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --accent: #06b6d4;
  --accent-strong: #0891b2;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(6, 182, 212, 0.15), transparent 34%),
    radial-gradient(circle at 84% 0%, rgba(249, 115, 22, 0.12), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 24px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb 48%, var(--orange));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
}

.main-nav > a,
.nav-dropdown > button {
  padding: 10px 0;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown:hover > button {
  color: #22d3ee;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
}

.dropdown-panel a:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #cbd5e1;
  border-radius: 99px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.55);
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, #020617 0%, transparent 28%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 50px;
  padding-top: 24px;
}

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

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  color: white;
  letter-spacing: -0.05em;
}

.hero-copy h3 {
  margin: 18px 0 0;
  color: #67e8f9;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
  margin: 22px 0 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 18px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tag-cloud span,
.detail-meta span,
.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(8, 145, 178, 0.16);
  color: #cffafe;
  border-radius: 999px;
  font-size: 13px;
}

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

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

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 36px rgba(6, 182, 212, 0.28);
}

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

.btn.ghost:hover {
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(15, 23, 42, 0.94);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 2.7;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: white;
  backdrop-filter: blur(10px);
}

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

.hero-dots button {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.32);
  color: transparent;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 60px;
  background: #22d3ee;
}

.quick-search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.section-head h2,
.site-footer h2 {
  margin: 0;
  color: white;
}

.search-bar,
.filter-line,
.search-filter {
  display: flex;
  gap: 10px;
}

.search-bar input,
.filter-line input,
.search-filter input,
.search-filter select {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  background: rgba(2, 6, 23, 0.74);
  color: #e2e8f0;
  outline: none;
}

.search-bar input,
.filter-line input,
.search-filter input {
  flex: 1;
}

.search-bar input:focus,
.filter-line input:focus,
.search-filter input:focus,
.search-filter select:focus {
  border-color: rgba(34, 211, 238, 0.56);
}

.search-bar button,
.filter-line button,
.search-filter button {
  height: 46px;
  border: 0;
  padding: 0 20px;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  cursor: pointer;
  font-weight: 800;
}

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

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

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-more {
  color: #67e8f9;
  font-weight: 800;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.78));
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(6, 182, 212, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.2s ease;
}

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

.type-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.type-pill {
  left: 12px;
  background: rgba(249, 115, 22, 0.88);
}

.rank-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  color: white;
}

.card-body h2 a:hover {
  color: #67e8f9;
}

.card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.meta-row span:last-child {
  color: #67e8f9;
}

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

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

.category-card {
  display: block;
  min-height: 230px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(15, 23, 42, 0.88)),
    rgba(15, 23, 42, 0.84);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-stack {
  display: flex;
  height: 88px;
  margin-bottom: 16px;
}

.category-stack img {
  width: 58px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(15, 23, 42, 0.95);
  margin-right: -20px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

.category-card strong {
  display: block;
  color: white;
  font-size: 20px;
  margin-bottom: 8px;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.category-card span {
  color: #67e8f9;
  font-weight: 800;
}

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

.ranking-aside {
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

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

.small-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  min-height: 120px;
}

.small-card .poster-link {
  aspect-ratio: auto;
  min-height: 120px;
}

.small-card .play-dot {
  display: none;
}

.small-card .card-body p {
  display: none;
}

.small-card .card-body h2 {
  font-size: 14px;
}

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

.horizontal-list .small-card {
  display: block;
}

.horizontal-list .small-card .poster-link {
  aspect-ratio: 2 / 2.82;
}

.page-hero {
  position: relative;
  padding: 84px 0 58px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 20%, rgba(6, 182, 212, 0.17), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

.slim-hero,
.category-hero,
.ranking-hero,
.search-hero {
  overflow: hidden;
}

.page-hero h1 {
  font-size: clamp(42px, 6vw, 68px);
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

.filter-line,
.search-filter {
  margin-top: 28px;
  max-width: 900px;
}

.search-filter select {
  width: 150px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.detail-hero {
  padding: 64px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 8%, rgba(6, 182, 212, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 2.82;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

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

.detail-cover span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: rgba(6, 182, 212, 0.88);
}

.detail-info h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.player-section {
  padding-top: 44px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 18px 50px rgba(6, 182, 212, 0.35);
  font-size: 30px;
}

.player-cover strong {
  max-width: 80%;
  text-align: center;
  font-size: clamp(22px, 4vw, 34px);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

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

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

.text-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
}

.text-panel h2 {
  margin: 0 0 14px;
  color: white;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0 28px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px 0 26px;
  color: var(--soft);
  border-top: 1px solid var(--line);
}

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

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

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

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav > a,
  .nav-dropdown > button {
    padding: 12px;
    text-align: left;
  }

  .nav-dropdown {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 88px;
    padding-bottom: 80px;
  }

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

  .hero-poster {
    width: min(260px, 72vw);
    justify-self: start;
  }

  .quick-search-panel,
  .split-section,
  .detail-grid,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-aside {
    position: static;
  }

  .featured-grid,
  .compact-grid,
  .all-grid,
  .ranking-grid,
  .horizontal-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-cover {
    width: min(320px, 86vw);
  }
}

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

  .brand {
    font-size: 20px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-info .lead {
    font-size: 16px;
  }

  .quick-search-panel {
    margin-top: -34px;
    padding: 18px;
  }

  .search-bar,
  .filter-line,
  .search-filter {
    flex-direction: column;
  }

  .search-filter select {
    width: 100%;
  }

  .featured-grid,
  .compact-grid,
  .all-grid,
  .ranking-grid,
  .category-grid,
  .category-grid.wide,
  .horizontal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .small-card {
    display: block;
  }

  .small-card .poster-link {
    aspect-ratio: 2 / 2.82;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p {
    min-height: auto;
  }

  .page-hero,
  .detail-hero {
    padding-top: 48px;
  }

  .player-cover span {
    width: 64px;
    height: 64px;
  }
}
