:root {
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: rgba(28, 25, 23, 0.78);
  --panel-strong: rgba(41, 37, 36, 0.92);
  --line: rgba(245, 158, 11, 0.18);
  --text: #fafaf9;
  --muted: #c7bfb9;
  --muted-dark: #a8a29e;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #ef4444;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.24), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(239, 68, 68, 0.18), transparent 28%),
    linear-gradient(180deg, #0c0a09 0%, #1c1917 48%, #0c0a09 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(12, 10, 9, 0.78);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber-light), var(--amber), var(--red));
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.32);
}

.logo-text {
  font-size: 1.2rem;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.94);
}

main {
  min-height: 70vh;
}

.hero-shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 26px auto 0;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 34px;
  background: #1c1917;
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  min-height: 660px;
}

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

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

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

.hero-backdrop img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.2);
  transform: scale(1.08);
  opacity: 0.54;
}

.hero-backdrop::after,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(12, 10, 9, 0.74) 46%, rgba(12, 10, 9, 0.32) 100%),
    radial-gradient(circle at 72% 20%, rgba(245, 158, 11, 0.28), transparent 32%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 660px;
  padding: clamp(32px, 6vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: center;
  gap: clamp(24px, 5vw, 68px);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 24px 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-light);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.8rem;
}

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

.primary-button,
.ghost-button,
.quick-search button,
.wide-link,
.text-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, background 0.2s ease;
}

.primary-button,
.quick-search button,
.wide-link {
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.26);
}

.ghost-button,
.text-button {
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover,
.wide-link:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.hero-controls {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  right: clamp(24px, 6vw, 76px);
  bottom: 26px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: var(--amber-light);
}

.content-section,
.search-panel,
.page-hero,
.detail-hero-inner,
.player-section {
  width: min(1240px, calc(100% - 32px));
  margin: 54px auto;
}

.surface-panel,
.sidebar-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

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

.search-panel h2,
.section-heading h2,
.sidebar-card h2,
.detail-text h2,
.player-info h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.quick-search,
.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  outline: none;
  color: #fff;
  background: rgba(12, 10, 9, 0.7);
}

.filter-bar {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
  margin-bottom: 16px;
}

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

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

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

.section-more {
  color: var(--amber-light);
  font-weight: 800;
}

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

.category-chip {
  min-height: 104px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.04));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.44);
}

.category-chip span {
  font-weight: 900;
  font-size: 1.05rem;
}

.category-chip strong {
  color: var(--amber-light);
  font-size: 1.6rem;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 22px;
  background: rgba(28, 25, 23, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(41, 37, 36, 0.9);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #292524;
}

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

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.78);
  backdrop-filter: blur(10px);
}

.poster-badge {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: #fef3c7;
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-play {
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--amber-light);
}

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

.movie-card h3 {
  min-height: 2.7em;
  margin: 0 0 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1rem;
  line-height: 1.35;
}

.meta-line,
.line-clamp,
.result-count {
  color: var(--muted-dark);
  font-size: 0.88rem;
}

.line-clamp {
  min-height: 3.1em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card .tag-row {
  margin-top: 10px;
}

.movie-card .tag {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 0.72rem;
}

.hot-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.sidebar-card {
  padding: 20px;
}

.compact-list,
.rank-list {
  display: grid;
  gap: 8px;
}

.compact-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.compact-link:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.12);
}

.rank-number {
  color: var(--amber-light);
  font-weight: 900;
}

.rank-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.compact-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.compact-meta {
  color: var(--muted-dark);
  font-size: 0.78rem;
}

.wide-link {
  width: 100%;
  margin-top: 14px;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.stat-pill strong {
  color: var(--amber-light);
}

.page-hero {
  padding: clamp(34px, 7vw, 72px);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(127, 29, 29, 0.12)),
    rgba(28, 25, 23, 0.74);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

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

.category-overview-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 26px;
  background: var(--panel);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 10px;
}

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

.category-overview-body {
  padding: 22px;
}

.category-index {
  color: var(--amber-light);
  font-weight: 900;
}

.category-overview-body h2 {
  margin: 8px 0;
  font-size: 1.7rem;
}

.category-overview-body p {
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  margin-top: 0;
}

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

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 52px 0;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

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

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

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #000;
}

.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
}

.player-cover-button span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1c1917;
  background: var(--amber-light);
  box-shadow: 0 18px 52px rgba(245, 158, 11, 0.35);
}

.player-cover-button.is-hidden {
  display: none;
}

.player-info {
  padding: 22px;
}

.player-info p,
.detail-text p {
  color: var(--muted);
}

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

.detail-text {
  padding: 24px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(12, 10, 9, 0.78);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted-dark);
}

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.is-filtered-out {
  display: none !important;
}

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

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

  .split-layout {
    grid-template-columns: 1fr;
  }

  .hot-sidebar {
    position: static;
  }
}

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

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

  .mobile-nav.is-open {
    display: grid;
    gap: 6px;
  }

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

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

  .hero-poster {
    max-width: 260px;
  }

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

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

@media (max-width: 620px) {
  .content-section,
  .search-panel,
  .page-hero,
  .detail-hero-inner,
  .player-section,
  .hero-shell {
    width: min(100% - 20px, 1240px);
  }

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

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(2.2rem, 15vw, 4rem);
  }

  .footer-bottom {
    flex-direction: column;
  }
}
