:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(30, 41, 59, 0.62);
  --panel-strong: rgba(30, 41, 59, 0.86);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fde68a;
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --line: rgba(148, 163, 184, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.12), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

body,
button,
input,
select {
  font: inherit;
}

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

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

button,
select,
input {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(127, 29, 29, 0.42);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  color: white;
  font-size: 15px;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.25);
}

.brand-text {
  font-size: clamp(18px, 2.2vw, 26px);
  background: linear-gradient(90deg, #fde68a, #fca5a5, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--amber-light);
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 220px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(253, 230, 138, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 0 10px 16px;
  color: var(--text);
  background: transparent;
  outline: none;
}

.header-search button {
  width: 44px;
  align-self: stretch;
  color: var(--text);
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.mobile-toggle {
  display: none;
  color: white;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(253, 230, 138, 0.12);
}

main {
  min-height: 70vh;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.78), transparent 65%);
}

.hero-content {
  position: absolute;
  left: max(6vw, 24px);
  right: max(6vw, 24px);
  bottom: clamp(72px, 11vh, 120px);
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 38px rgba(0, 0, 0, 0.54);
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.footer-tags,
.hot-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.tag-chip,
.detail-tags a,
.hot-keywords a {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(253, 230, 138, 0.18);
}

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

.primary-button,
.ghost-button,
.detail-actions button,
.detail-actions a,
.search-panel button,
.sort-buttons button,
.filter-pills button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.search-panel button,
.sort-buttons button.is-active,
.filter-pills button.is-active {
  background: linear-gradient(90deg, var(--amber), var(--red));
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.22);
}

.ghost-button,
.detail-actions button,
.detail-actions a,
.sort-buttons button,
.filter-pills button {
  background: rgba(30, 41, 59, 0.84);
  color: #e2e8f0;
}

.primary-button:hover,
.ghost-button:hover,
.detail-actions button:hover,
.detail-actions a:hover,
.search-panel button:hover,
.sort-buttons button:hover,
.filter-pills button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.content-section {
  margin-bottom: 72px;
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.13);
  color: var(--amber-light);
}

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

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.feature-grid,
.ranking-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.movie-card {
  position: relative;
  min-width: 0;
}

.card-link,
.large-link,
.horizontal-link,
.category-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-link:hover,
.large-link:hover,
.horizontal-link:hover,
.category-card a:hover {
  transform: translateY(-6px);
  background: var(--panel-strong);
  border-color: rgba(245, 158, 11, 0.32);
  box-shadow: 0 24px 70px rgba(127, 29, 29, 0.28);
}

.card-cover,
.large-cover,
.horizontal-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(220, 38, 38, 0.12));
}

.card-cover {
  aspect-ratio: 16 / 9;
}

.large-cover {
  aspect-ratio: 16 / 9;
}

.card-cover img,
.large-cover img,
.horizontal-cover img,
.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-link:hover img,
.large-link:hover img,
.horizontal-link:hover img,
.category-card a:hover img {
  transform: scale(1.06);
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-weight: 800;
  font-size: 12px;
}

.duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.card-body {
  padding: 16px;
}

.card-body h3,
.horizontal-info h3,
.large-copy h3 {
  margin: 0;
  color: #f8fafc;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.card-link:hover h3,
.horizontal-link:hover h3,
.large-link:hover h3 {
  color: var(--amber-light);
}

.card-body p,
.horizontal-info p,
.large-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-meta,
.large-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.image-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.large-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
}

.large-copy h3 {
  font-size: clamp(22px, 3vw, 30px);
}

.large-meta {
  justify-content: space-between;
  padding: 14px 18px;
}

.horizontal-link {
  display: flex;
  gap: 14px;
}

.horizontal-cover {
  width: 150px;
  min-height: 96px;
  flex: 0 0 auto;
}

.horizontal-info {
  min-width: 0;
  padding: 14px 14px 14px 0;
}

.horizontal-info h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
}

.horizontal-stack {
  display: grid;
  gap: 14px;
}

.soft-panel {
  padding: 28px;
  border: 1px solid rgba(253, 230, 138, 0.12);
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.18), rgba(245, 158, 11, 0.11));
}

.filter-pills,
.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pills {
  margin-bottom: 24px;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

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

.poster-wall .card-cover {
  aspect-ratio: 3 / 4;
}

.poster-wall .card-body p,
.poster-wall .card-meta {
  display: none;
}

.waterfall {
  column-count: 3;
  column-gap: 20px;
}

.waterfall .movie-card {
  break-inside: avoid;
  margin: 0 0 20px;
}

.waterfall .movie-card:nth-child(3n) .card-cover {
  aspect-ratio: 4 / 5;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 48px;
}

.compact-hero {
  min-height: 300px;
  display: flex;
  align-items: end;
  border-bottom: 1px solid rgba(127, 29, 29, 0.28);
}

.compact-hero > div {
  width: 100%;
  padding: 36px;
  border: 1px solid rgba(253, 230, 138, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.16), transparent 22rem),
    linear-gradient(90deg, rgba(127, 29, 29, 0.22), rgba(30, 41, 59, 0.52));
  box-shadow: var(--shadow);
}

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

.category-card a {
  padding: 0;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-card-body {
  padding: 20px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card-body p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.category-card-body span {
  color: var(--amber-light);
  font-weight: 800;
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  margin-bottom: 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-panel input,
.filter-panel select,
.search-panel input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.84);
  outline: none;
}

.search-panel {
  display: block;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.hot-keywords {
  margin-top: 16px;
}

.empty-state {
  padding: 48px 20px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

.detail-page {
  padding-top: 32px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.detail-main,
.detail-sidebar {
  min-width: 0;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
  cursor: pointer;
  font-weight: 900;
  font-size: 18px;
}

.play-icon {
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
}

.video-player.is-started .player-cover-button {
  display: none;
  pointer-events: none;
}

.detail-copy {
  padding: 26px 0 0;
}

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

.crumbs a {
  color: var(--amber-light);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line);
}

.detail-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.detail-panel h2,
.detail-sidebar h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-panel p,
.text-page p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.detail-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-tags a {
  color: #fde68a;
}

.narrow-page {
  width: min(900px, calc(100% - 32px));
}

.text-page p + p {
  margin-top: 18px;
}

.site-footer {
  border-top: 1px solid rgba(127, 29, 29, 0.42);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 0.8fr;
  gap: 30px;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: var(--amber-light);
  font-size: 18px;
}

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

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

.footer-grid a:hover {
  color: var(--amber-light);
}

.footer-tags a {
  display: inline-flex;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

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

  .three-col,
  .feature-grid,
  .ranking-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

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

  .waterfall {
    column-count: 2;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
    height: 62px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .hero-slider {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 76px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 42px;
  }

  .hero-arrow {
    display: none;
  }

  .page-shell,
  .page-hero {
    width: min(100% - 24px, 1180px);
  }

  .page-shell {
    padding: 36px 0;
  }

  .compact-hero > div {
    padding: 26px;
  }

  .four-col,
  .three-col,
  .poster-wall,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .horizontal-cover {
    width: 124px;
  }

  .horizontal-info p {
    display: none;
  }

  .soft-panel {
    padding: 18px;
  }

  .waterfall {
    column-count: 1;
  }

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

  .search-panel button,
  .detail-actions button,
  .detail-actions a,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .category-thumbs {
    height: 120px;
  }
}
