:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.76);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #facc15;
  --danger: #ef4444;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 36rem), linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  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 {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111827;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--soft);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.top-search {
  width: 284px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
}

.top-search input,
.page-filter {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  color: white;
  background: transparent;
}

.top-search input {
  padding: 6px 8px 6px 12px;
}

.top-search button,
.primary-btn,
.ghost-btn,
.section-link {
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.top-search button,
.primary-btn {
  padding: 9px 16px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.primary-btn:hover,
.top-search button:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-1px);
}

.ghost-btn,
.section-link {
  padding: 9px 16px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  color: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.mobile-cats a {
  color: var(--soft);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 34px auto 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 42px;
  align-items: center;
  padding: 72px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(18px) saturate(1.18);
  transform: scale(1.1);
}

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 48%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content,
.hero-poster,
.detail-grid,
.page-hero > div,
.category-cover > img {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.lead-text {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-poster {
  display: block;
  border-radius: 24px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.48);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 72px;
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.active {
  background: var(--accent);
}

.quick-zone,
.content-section,
.site-footer,
.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-zone {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.quick-zone a {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.75);
  transition: 0.2s ease;
}

.quick-zone a:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.52);
  transform: translateY(-3px);
}

.quick-zone strong,
.quick-zone span {
  display: block;
}

.quick-zone strong {
  font-size: 18px;
}

.quick-zone span {
  color: var(--muted);
  margin-top: 5px;
}

.content-section {
  margin-top: 46px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

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

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

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

.category-tile {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0f172a;
  transition: 0.2s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transition: 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.42;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.9));
}

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

.category-tile span {
  display: block;
  margin-top: 56px;
  font-size: 22px;
  font-weight: 800;
}

.category-tile p {
  color: var(--soft);
  margin: 6px 0 0;
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.8);
  transition: 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: white;
  font-weight: 800;
  line-height: 1.35;
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.compact-card .card-body p,
.compact-card .tag-row {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
}

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

.large-rank {
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.75);
  transition: 0.2s ease;
}

.rank-row strong {
  font-size: 22px;
  color: var(--accent-2);
  text-align: center;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 12px;
}

.rank-thumb img {
  width: 82px;
  height: 110px;
  object-fit: cover;
}

.rank-title {
  font-size: 18px;
  font-weight: 800;
}

.rank-row p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
}

.side-recommend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.84));
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 64px;
}

.small-hero h1 {
  max-width: 860px;
}

.category-cover {
  min-height: 360px;
}

.category-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
}

.toolbar {
  display: flex;
  margin-bottom: 20px;
}

.page-filter {
  max-width: 520px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

.search-toolbar .page-filter {
  max-width: 720px;
}

.detail-hero {
  padding: 54px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: blur(14px);
  transform: scale(1.08);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.breadcrumb a {
  color: #fde68a;
}

.player-section {
  margin-top: 30px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: black;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), rgba(2, 6, 23, 0.52));
}

.play-layer span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.38);
}

.play-layer.hidden {
  display: none;
}

.article-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.article-main,
.article-side {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
}

.article-main h2,
.article-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-main p {
  color: var(--soft);
  margin: 0 0 22px;
}

.article-main p:last-child {
  margin-bottom: 0;
}

dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  color: white;
}

.site-footer {
  margin-top: 64px;
  padding: 42px 0 30px;
  border-top: 1px solid var(--line);
}

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

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

.site-footer p,
.copyright {
  color: var(--muted);
}

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

.footer-links a {
  color: var(--soft);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.copyright {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.searchable-card.is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

  .hero-slide {
    grid-template-columns: 1fr 260px;
    padding: 46px;
  }

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

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

  .split-section,
  .article-section {
    grid-template-columns: 1fr;
  }
}

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

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 680px;
    margin-top: 18px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    gap: 20px;
    padding: 28px;
  }

  .hero-poster {
    width: 190px;
    order: -1;
    transform: none;
  }

  .hero-dots {
    left: 28px;
    bottom: 22px;
  }

  .quick-zone {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .wide-grid,
  .category-grid,
  .category-grid.large,
  .side-recommend,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .detail-poster {
    width: min(240px, 72vw);
  }

  .rank-row {
    grid-template-columns: 36px 72px minmax(0, 1fr);
  }

  .rank-thumb img {
    width: 72px;
    height: 96px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .wide-grid,
  .category-grid,
  .category-grid.large,
  .side-recommend,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 18px;
  }
}
