:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --accent-2: #38bdf8;
  --green: #34d399;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.20), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(56, 189, 248, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #050816 42%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 9px;
}

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

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 16px 16px;
}

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

.category-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(15, 23, 42, 0.34);
}

.category-strip-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}

.category-pill,
.tag,
.filter-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  padding: 8px 13px;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-pill:hover,
.tag:hover,
.filter-chip:hover {
  background: var(--accent-soft);
  border-color: var(--line-strong);
  color: #fff;
}

.hero {
  position: relative;
  padding: 56px 0 42px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.70) 46%, rgba(2, 6, 23, 0.18) 100%),
    radial-gradient(circle at 72% 22%, rgba(245, 158, 11, 0.22), transparent 28rem);
}

.hero-shell {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.7fr);
  gap: 34px;
  align-items: stretch;
}

.hero-copy {
  align-self: center;
  padding: 34px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 700;
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.78;
}

.hero-actions,
.section-actions,
.search-form,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.button,
button.button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(245, 158, 11, 0.35);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(145deg, #111827, #2d1b08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.92)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.50), transparent 58%);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 28px;
}

.hero-slide-content h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.hero-slide-content p {
  margin: 0 0 16px;
  color: var(--muted-strong);
  line-height: 1.72;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: 24px;
  top: 24px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 28px;
  background: var(--accent);
}

.section,
.page-section {
  padding: 42px 0;
}

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

.section-title,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-subtitle,
.page-hero p {
  color: var(--muted);
  margin: 8px 0 0;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78));
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.22), transparent 46%),
    linear-gradient(145deg, #111827, #020617);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.90));
}

.heat-badge,
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
}

.heat-badge {
  position: absolute;
  left: 12px;
  top: 12px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 9px;
}

.movie-card h2 {
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 8px;
}

.movie-card h2 a:hover,
.side-title:hover,
.rank-title:hover {
  color: #fbbf24;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted-strong);
  line-height: 1.65;
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags .tag {
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-md);
  padding: 22px;
  background:
    radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.24), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.76));
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

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

.category-card p {
  color: var(--muted-strong);
  line-height: 1.65;
  margin: 0;
}

.filter-panel,
.info-panel,
.detail-panel,
.player-panel,
.rank-panel {
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.filter-panel {
  padding: 18px;
  margin: 0 0 24px;
}

.search-form input,
.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  color: #fff;
  padding: 0 16px;
  outline: none;
}

.search-form input,
.filter-panel input {
  flex: 1 1 260px;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--line-strong);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, #111827, #020617);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-title {
  display: inline-block;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 6px;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  padding: 34px 0 56px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.player-play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 22px 58px rgba(245, 158, 11, 0.42);
  font-size: 32px;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.detail-panel,
.info-panel {
  padding: 24px;
}

.detail-title {
  font-size: clamp(30px, 4vw, 50px);
  margin-top: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-strong);
  margin-bottom: 18px;
}

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(2, 6, 23, 0.38);
}

.detail-panel h2,
.info-panel h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-panel p,
.info-panel p {
  color: var(--muted-strong);
  line-height: 1.85;
}

.side-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.side-poster {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, #111827, #020617);
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-title {
  display: block;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 6px;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 30px;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 6px;
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.empty-state {
  padding: 50px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

@media (max-width: 1024px) {
  .hero-shell,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 460px;
  }

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

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

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

  .header-inner {
    height: 62px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-shell {
    min-height: auto;
    gap: 22px;
  }

  .hero-stage {
    min-height: 420px;
  }

  .section-head,
  .page-hero {
    display: block;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

  .rank-item {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .rank-badge {
    grid-column: 2 / -1;
    width: fit-content;
  }
}

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

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

  .hero-stage {
    min-height: 390px;
  }

  .hero-slide-content {
    padding: 20px;
  }

  .player-play-button {
    width: 72px;
    height: 72px;
  }
}
