:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.10), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), #fde68a);
  box-shadow: 0 14px 36px rgba(251, 191, 36, 0.35);
}

.brand-text {
  font-size: 1.08rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: var(--gold);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.56);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.20) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.96));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  min-height: 74vh;
  gap: 56px;
  padding: 80px 0 96px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-badges,
.mini-tags,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges {
  margin: 26px 0 0;
}

.hero-badges span,
.mini-tags span,
.movie-meta-line span,
.filter-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
}

.hero-badges span {
  padding: 8px 12px;
}

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

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

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), #fde68a);
  box-shadow: 0 16px 36px rgba(251, 191, 36, 0.28);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.ghost-button {
  border: 1px solid rgba(248, 250, 252, 0.24);
  color: var(--text);
  background: rgba(15, 23, 42, 0.38);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.66));
}

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

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.36);
}

.hero-dots button.active {
  background: var(--gold);
}

.search-panel,
.page-hero {
  margin-top: 36px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  align-items: center;
  gap: 24px;
}

.search-panel h2,
.section-heading h2,
.player-info h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.search-panel p,
.section-heading p,
.page-hero p,
.category-overview-body p,
.site-footer p,
.detail-one-line,
.player-info p,
.detail-article p,
.detail-side dd {
  color: var(--muted);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 48px 0 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
}

.search-box input:focus {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.search-box span {
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--gold);
  transform: translateY(-50%);
}

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

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

.section-more {
  flex: none;
  color: var(--gold);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  overflow: hidden;
  min-height: 136px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.48);
}

.category-tile img {
  width: 82px;
  height: 104px;
  border-radius: 16px;
  object-fit: cover;
}

.category-tile h3,
.movie-card h3,
.category-overview-body h2 {
  margin: 0;
  line-height: 1.25;
}

.category-tile p,
.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 8px 0;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.category-tile span {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-chip {
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: #111827;
  background: var(--gold);
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--gold-2));
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.movie-meta-line span,
.mini-tags span {
  padding: 3px 7px;
  font-size: 0.72rem;
}

.movie-card h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.5em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1rem;
}

.movie-card h3 a:hover,
.category-overview-body a:hover,
.breadcrumb a:hover {
  color: var(--gold);
}

.page-main {
  padding-bottom: 72px;
}

.compact-hero,
.category-hero {
  margin-top: 38px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.page-search {
  max-width: 680px;
  margin-top: 24px;
}

.filter-bar {
  margin: 26px 0 28px;
}

.filter-pill {
  padding: 8px 14px;
  cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover {
  color: #111827;
  background: var(--gold);
}

.no-results {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
}

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

.category-overview-body ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.detail-main {
  padding-bottom: 72px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background-image: var(--detail-bg);
  background-position: center;
  background-size: cover;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.70), rgba(2, 6, 23, 0.28)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 1));
  backdrop-filter: blur(2px);
}

.detail-hero-inner {
  position: relative;
  padding: 34px 0 62px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 40px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(2.2rem, 5.6vw, 5rem);
}

.detail-one-line {
  max-width: 780px;
  margin: 22px 0 0;
  font-size: 1.1rem;
}

.player-section {
  margin-top: -44px;
  position: relative;
  z-index: 3;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.92);
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  background: black;
}

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

.big-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: var(--gold);
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.34);
  transform: translate(-50%, -50%);
}

.big-play.is-hidden {
  display: none;
}

.player-info {
  padding: 20px 24px 24px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding-top: 42px;
}

.detail-article,
.detail-side {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--panel);
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 12px 0 0;
  font-size: 1.02rem;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: var(--gold);
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 7px 0;
  color: var(--muted);
}

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

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

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

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

  .mobile-menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 58px 0 82px;
  }

  .hero-poster {
    max-width: 220px;
    transform: none;
  }

  .search-panel,
  .category-overview-card,
  .detail-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-poster {
    max-width: 240px;
  }

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

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

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

  .category-tile img {
    width: 74px;
    height: 96px;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

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