:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #0f1d33;
  --card: rgba(15, 29, 51, 0.82);
  --card-strong: #111f35;
  --text: #f8fafc;
  --muted: #b7c4d8;
  --line: rgba(148, 163, 184, 0.18);
  --brand: #f59e0b;
  --brand-2: #06b6d4;
  --brand-3: #2563eb;
  --radius: 22px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.18), transparent 36rem),
    linear-gradient(180deg, #08111f 0%, #0b1324 48%, #0a1020 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 31, 0.82);
  backdrop-filter: blur(22px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #08111f;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #0b1324;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 650px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 17, 31, 0.96) 0%, rgba(8, 17, 31, 0.74) 38%, rgba(8, 17, 31, 0.25) 100%),
    linear-gradient(0deg, #08111f 0%, rgba(8, 17, 31, 0.18) 48%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  bottom: 96px;
  width: min(720px, calc(100% - 48px));
}

.hero-kicker,
.section-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 6px;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.02;
  font-weight: 900;
}

.hero-movie-title {
  margin-top: 0 !important;
  font-size: clamp(26px, 4vw, 46px) !important;
  color: #e0f2fe;
}

.hero-content p {
  max-width: 650px;
  color: #d8e3f4;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 13px;
  padding: 6px 10px;
}

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

.primary-btn,
.ghost-btn,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), #f97316);
  color: #111827;
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.25);
}

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

.ghost-btn,
.section-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  color: white;
  cursor: pointer;
  font-size: 32px;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 30px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 54px;
  background: var(--brand);
}

main {
  width: 100%;
}

.content-section,
.home-search-band,
.category-overview-list,
.detail-hero,
.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.home-search-band {
  margin-top: -44px;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 29, 51, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.home-search-band span {
  color: var(--brand);
  font-weight: 800;
}

.home-search-band h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

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

.section-heading h2,
.category-overview-head h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
}

.section-heading p,
.category-overview-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(18, 33, 56, 0.96);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(245, 158, 11, 0.24));
}

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #111827;
  font-weight: 900;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  min-height: 52px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 900;
}

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

.movie-card.is-compact h3 {
  min-height: 46px;
  font-size: 16px;
}

.movie-card.is-compact p {
  min-height: 54px;
  -webkit-line-clamp: 2;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.two-column-section {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 32px;
}

.hot-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hot-list li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.hot-list span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  font-weight: 900;
}

.hot-list a {
  font-weight: 800;
}

.hot-list em {
  color: #67e8f9;
  font-style: normal;
  font-weight: 900;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 20px;
}

.category-title {
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.7;
}

.category-preview {
  display: grid;
  gap: 8px;
}

.category-preview a {
  color: #bfdbfe;
  font-weight: 700;
}

.page-hero {
  padding: 94px max(24px, calc((100vw - 1280px) / 2)) 72px;
  background:
    radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.2), transparent 34rem),
    linear-gradient(135deg, rgba(37, 99, 235, 0.62), rgba(6, 182, 212, 0.28));
}

.page-hero-small {
  padding-top: 70px;
  padding-bottom: 58px;
}

.page-hero h1 {
  max-width: 920px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.search-box,
.filter-selects label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.filter-selects select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.88);
  color: white;
  padding: 0 14px;
}

.filter-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.empty-state {
  margin: 24px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.category-overview-list {
  display: grid;
  gap: 28px;
  padding: 48px 0;
}

.detail-page {
  padding-bottom: 42px;
}

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

.detail-poster-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #93c5fd;
  font-weight: 800;
}

.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.85;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta-grid span {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  font-weight: 700;
}

.player-section {
  padding: 18px 0 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-gate {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.14), rgba(8, 17, 31, 0.82));
  color: white;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #f97316);
  color: #111827;
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.32);
}

.detail-text {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 34px;
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 900;
}

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

.detail-text p {
  margin: 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 17, 31, 0.74);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--muted);
}

.footer-inner strong {
  color: white;
  font-size: 20px;
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

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

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

  .two-column-section,
  .detail-hero,
  .filter-panel {
    grid-template-columns: 1fr;
  }
}

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(8, 17, 31, 0.96);
  }

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

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

  .hero-slider,
  .hero-image {
    min-height: 590px;
  }

  .hero-content {
    bottom: 86px;
  }

  .hero-control {
    display: none;
  }

  .home-search-band,
  .section-heading,
  .category-overview-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .listing-grid,
  .compact-grid,
  .category-grid,
  .filter-selects,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding-top: 62px;
    padding-bottom: 48px;
  }

  .detail-hero {
    padding-top: 38px;
  }
}
