:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #182235;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --weak: #94a3b8;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-strong: #fbbf24;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.16), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.12), transparent 32%),
    linear-gradient(180deg, #0f172a 0%, #111827 44%, #0f172a 100%);
  color: var(--text);
  font-family: 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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

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

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

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

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

.desktop-nav a,
.mobile-nav a,
.category-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.category-nav a:hover,
.category-nav a.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.13);
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.4)),
    linear-gradient(180deg, #1e293b, #0f172a);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.05) contrast(1.05);
}

.hero-bg span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.42) 58%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 92px;
  max-width: 1240px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 730px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.meta-row span {
  color: var(--muted);
  font-size: 13px;
}

.hero-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.primary-btn,
.ghost-btn,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn,
.play-button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.3);
}

.ghost-btn {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.play-button:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 44px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--accent);
}

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

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

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

.section-desc,
.page-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--weak);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 170px));
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  min-height: 265px;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 12%, rgba(245, 158, 11, 0.35), transparent 28%),
    linear-gradient(145deg, #334155, #0f172a);
}

.poster-link img {
  width: 100%;
  height: 265px;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 45%),
    radial-gradient(circle at 70% 15%, rgba(245, 158, 11, 0.26), transparent 28%);
  z-index: 1;
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  color: #111827;
  background: var(--accent-strong);
}

.poster-play {
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

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

.movie-card h3 a:hover {
  color: var(--accent-strong);
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--weak);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
}

.hero-tags {
  max-width: 760px;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 8px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 10%, rgba(245, 158, 11, 0.24), transparent 34%),
    rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
}

.category-card p {
  margin: 0;
  color: var(--weak);
  line-height: 1.7;
  font-size: 14px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.rank-item span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-strong);
  font-weight: 900;
}

.rank-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em {
  color: var(--weak);
  font-style: normal;
  font-size: 13px;
}

.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--weak);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent-strong);
}

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

.detail-poster {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 25% 10%, rgba(245, 158, 11, 0.34), transparent 35%),
    linear-gradient(145deg, #334155, #0f172a);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 560px;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-copy .lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.info-table div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--line);
}

.info-table span {
  display: block;
  color: var(--weak);
  font-size: 12px;
  margin-bottom: 6px;
}

.info-table strong {
  color: var(--text);
}

.player-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(245, 158, 11, 0.2), transparent 34%),
    rgba(2, 6, 23, 0.62);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-message {
  margin-top: 12px;
  color: var(--weak);
  font-size: 14px;
}

.article-panel {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
  padding: 28px;
  margin-bottom: 28px;
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.article-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.38);
  margin-top: 20px;
}

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

.footer-grid p {
  max-width: 560px;
  color: var(--weak);
  line-height: 1.8;
}

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

.footer-grid a {
  display: block;
  color: var(--weak);
  margin: 9px 0;
}

.footer-grid a:hover {
  color: var(--accent-strong);
}

.footer-copy {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--weak);
  font-size: 13px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-content {
    padding-bottom: 74px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section,
  .page-shell,
  .detail-hero,
  .player-section,
  .footer-grid,
  .footer-copy,
  .hero-content,
  .hero-dots {
    width: min(100% - 22px, 1240px);
  }

  .brand,
  .footer-brand {
    font-size: 18px;
  }

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

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

  .poster-link,
  .poster-link img {
    min-height: 320px;
    height: 320px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 1fr;
  }

  .rank-item em {
    grid-column: 2;
  }
}
