:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.20);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f97316;
  --accent-2: #facc15;
  --brand: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #dbeafe;
  font-weight: 650;
  font-size: 15px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.nav-links a,
.mobile-panel a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
}

.top-search input,
.search-box input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  outline: none;
  padding: 11px 16px;
}

.top-search button,
.search-box button,
.primary-btn,
.ghost-btn,
.player-start,
.small-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.top-search button,
.search-box button,
.primary-btn,
.player-start,
.small-btn {
  color: #111827;
  background: linear-gradient(135deg, #f97316, #facc15);
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.24);
}

.top-search button {
  padding: 10px 16px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.ghost-btn {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(226, 232, 240, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.top-search button:hover,
.search-box button:hover,
.player-start:hover,
.small-btn:hover {
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.80);
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 12px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.hero {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.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;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.46);
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.28) 100%),
    radial-gradient(circle at 18% 28%, rgba(249, 115, 22, 0.26), transparent 24rem),
    radial-gradient(circle at 64% 44%, rgba(56, 189, 248, 0.16), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 390px;
  align-items: center;
  gap: 44px;
  padding: 94px 0 82px;
}

.eyebrow {
  color: var(--accent-2);
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 520px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.62));
  border: 1px solid rgba(226, 232, 240, 0.20);
  box-shadow: var(--shadow);
}

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

.hero-poster-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(226, 232, 240, 0.18);
  backdrop-filter: blur(12px);
}

.hero-poster-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

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

.hero-tab {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  border: 0;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

.hero-tab.active {
  background: linear-gradient(90deg, #f97316, #facc15);
}

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

.tag-row span,
.meta-chip,
.category-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.62);
  color: #dbeafe;
  padding: 5px 10px;
  font-size: 13px;
}

.section {
  padding: 58px 0;
}

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

.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p,
.site-footer p,
.movie-card p,
.category-card p,
.rank-line p {
  color: var(--muted);
}

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

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

.movie-card,
.category-card,
.info-panel,
.player-section,
.search-panel,
.sitemap-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.58));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.20);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.30);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.26), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
}

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

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.30);
}

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

.movie-meta-line,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-meta-line span,
.detail-meta span,
.rank-meta span {
  color: #dbeafe;
}

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

.movie-card p {
  margin: 0 0 12px;
  min-height: 46px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card p {
  min-height: 78px;
}

.category-count {
  color: var(--accent-2);
  font-weight: 900;
}

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

.rank-line {
  display: grid;
  grid-template-columns: 62px 86px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.rank-line img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.80);
}

.rank-num {
  color: var(--accent-2);
  font-size: 26px;
  font-weight: 950;
  text-align: center;
}

.rank-line h3 {
  margin: 0 0 4px;
}

.rank-line p {
  margin: 4px 0 0;
}

.score {
  color: var(--accent-2);
  font-weight: 900;
  text-align: right;
}

.page-hero {
  align-items: flex-start;
  padding: 54px 0 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero p {
  max-width: 700px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin: 28px 0;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
}

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

.detail-title p {
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.player-section {
  margin-top: 34px;
  padding: 22px;
}

.player-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.20), rgba(2, 6, 23, 0.72));
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-shell.playing .player-cover {
  opacity: 0;
}

.player-start {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  font-size: 34px;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

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

.info-panel {
  padding: 26px;
}

.info-panel h2,
.info-panel h3 {
  margin-top: 0;
}

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

.side-links a {
  display: block;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.side-links a:hover {
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.36);
}

.search-panel,
.sitemap-panel {
  padding: 24px;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-box button,
.small-btn {
  padding: 0 20px;
}

#searchResults {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.sitemap-columns {
  columns: 4 220px;
  column-gap: 32px;
}

.sitemap-columns a {
  display: block;
  break-inside: avoid;
  padding: 6px 0;
  color: #dbeafe;
}

.sitemap-columns a:hover {
  color: var(--accent);
}

.site-footer {
  margin-top: 60px;
  padding: 38px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.64);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.cover-fallback {
  background:
    radial-gradient(circle at 30% 18%, rgba(249, 115, 22, 0.32), transparent 13rem),
    radial-gradient(circle at 70% 72%, rgba(56, 189, 248, 0.20), transparent 13rem),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.cover-fallback img {
  display: none;
}

@media (max-width: 1080px) {
  .nav-links,
  .top-search {
    display: none;
  }

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

  .hero-content,
  .detail-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 380px;
  }

  .hero-poster img {
    height: 420px;
  }

  .grid,
  .grid.compact,
  #searchResults {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding: 58px 0 82px;
    gap: 24px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 0;
    height: 360px;
  }

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

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

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

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

  .rank-line img {
    width: 64px;
  }

  .score {
    grid-column: 3;
    text-align: left;
  }

  .detail-hero,
  .info-panel,
  .player-section,
  .search-panel,
  .sitemap-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .search-box,
  .footer-grid,
  .section-head,
  .page-hero {
    display: block;
  }

  .search-box button {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
  }
}

@media (max-width: 460px) {
  .grid,
  .grid.compact,
  #searchResults,
  .category-grid {
    grid-template-columns: 1fr;
  }

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