:root {
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: rgba(41, 37, 36, 0.86);
  --panel-strong: #292524;
  --text: #fafaf9;
  --muted: #d6d3d1;
  --muted-2: #a8a29e;
  --line: rgba(231, 229, 228, 0.12);
  --amber: #f59e0b;
  --amber-2: #d97706;
  --amber-deep: #92400e;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(217, 119, 6, 0.20), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(146, 64, 14, 0.26), transparent 30%),
    linear-gradient(135deg, #0c0a09 0%, #1c1917 45%, #0c0a09 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.42);
}

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

.nav-link {
  padding: 9px 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: #fffbeb;
  background: rgba(245, 158, 11, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

.category-ribbon {
  border-top: 1px solid var(--line);
}

.ribbon-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.ribbon-scroll::-webkit-scrollbar {
  display: none;
}

.ribbon-scroll a {
  flex: 0 0 auto;
  color: var(--muted-2);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.ribbon-scroll a:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.95) 0%, rgba(12, 10, 9, 0.76) 38%, rgba(12, 10, 9, 0.22) 100%),
    linear-gradient(0deg, #0c0a09 0%, transparent 36%, rgba(0, 0, 0, 0.38) 100%);
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  padding: 72px 0 92px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -1.5px;
}

.hero-copy p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.10);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.hero-control.prev {
  left: max(18px, calc((100% - 1200px) / 2));
}

.hero-control.next {
  right: max(18px, calc((100% - 1200px) / 2));
}

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

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

.hero-dot.active {
  width: 28px;
  background: #fbbf24;
}

.section {
  padding: 62px 0;
}

.section-tight {
  padding-top: 36px;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.5px;
}

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

.section-more {
  flex: 0 0 auto;
  color: #fbbf24;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1917;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.08) 58%);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1c1917;
  background: #fbbf24;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  font-weight: 900;
}

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

.movie-meta {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 14px;
}

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

.tag-row span {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-panel {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(68, 64, 60, 0.58)),
    rgba(41, 37, 36, 0.86);
  box-shadow: var(--shadow);
}

.category-panel h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-panel p {
  margin: 0;
  color: var(--muted);
}

.category-panel span {
  color: #fbbf24;
  font-weight: 800;
  margin-top: 22px;
}

.page-hero {
  padding: 64px 0 36px;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.20), transparent 34%),
    linear-gradient(180deg, rgba(41, 37, 36, 0.65), rgba(12, 10, 9, 0));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -1px;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.filter-bar,
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(41, 37, 36, 0.72);
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 12px 15px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
  border-color: rgba(245, 158, 11, 0.62);
}

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

.breadcrumb a {
  color: #fbbf24;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
  gap: 30px;
  align-items: start;
}

.detail-card,
.side-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(41, 37, 36, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.72));
  transition: opacity 0.25s ease;
}

.player-shell.ready .player-overlay,
.player-shell.playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-start {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 999px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
  font-size: 34px;
  cursor: pointer;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.detail-body {
  padding: 26px;
}

.detail-body h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.content-card {
  margin-top: 22px;
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

.side-card {
  padding: 18px;
}

.side-card img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 16px;
}

.side-card h3 {
  margin: 0 0 12px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.side-item strong {
  display: block;
  line-height: 1.3;
}

.side-item span {
  color: var(--muted-2);
  font-size: 13px;
}

.search-results {
  display: grid;
  gap: 12px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(41, 37, 36, 0.74);
}

.search-result-item img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.search-result-item h3 {
  margin: 0 0 6px;
}

.search-result-item p {
  margin: 0;
  color: var(--muted-2);
}

.empty-state {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted-2);
  text-align: center;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.72);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 34px 0;
  color: var(--muted-2);
}

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

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

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

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

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

@media (max-width: 760px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .main-nav {
    position: fixed;
    inset: 68px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-section,
  .hero-content {
    min-height: 560px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

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

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

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    display: none;
  }

  .search-result-item {
    grid-template-columns: 64px 1fr;
  }

  .search-result-item .btn {
    grid-column: 1 / -1;
  }
}

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

  .movie-grid,
  .movie-grid.compact,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }
}
