:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --deep: #0f172a;
  --shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 48%, #f8fafc 100%);
  color: var(--ink);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.logo::before,
.footer-logo::before {
  content: "";
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.nav-link,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.2);
}

.mobile-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, #0f172a 0%, transparent 34%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding-top: 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  width: min(780px, 100%);
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero h2 {
  margin: 22px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
}

.hero-desc {
  width: min(650px, 100%);
  margin: 18px 0 0;
  color: #dbe4ef;
  font-size: 18px;
  line-height: 1.8;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

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

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.text-link,
.quick-search button,
.search-controls button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search button,
.search-controls button,
.filter-bar button {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search button:hover,
.search-controls button:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--brand);
}

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

.top-spaced {
  padding-top: 44px;
}

.content-section {
  margin: 46px 0;
}

.intro-panel,
.inner-hero,
.search-panel,
.detail-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 24px;
  padding: 32px;
  margin-top: -80px;
  position: relative;
  z-index: 5;
}

.intro-panel h2,
.section-title h2,
.inner-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.05em;
}

.intro-panel h2,
.section-title h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.intro-panel p,
.inner-hero p,
.detail-one-line,
.movie-card-body p,
.detail-content p {
  color: var(--muted);
  line-height: 1.75;
}

.quick-search,
.search-controls,
.filter-bar {
  display: flex;
  gap: 12px;
}

.quick-search input,
.search-controls input,
.search-controls select,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  padding: 28px;
}

.search-state {
  min-height: 24px;
  margin: 0 28px 16px;
  color: var(--muted);
}

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

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

.text-link {
  color: var(--brand-dark);
  background: #fff7ed;
}

.text-link.light {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta-line {
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.movie-card-body h2 a:hover {
  color: var(--brand-dark);
}

.movie-card-body p {
  min-height: 56px;
  margin: 0 0 14px;
  font-size: 14px;
}

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

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

.category-tile {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #334155);
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -42px;
  bottom: -48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-tile strong {
  font-size: 24px;
  letter-spacing: -0.05em;
}

.category-tile span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.accent-amber { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.accent-red { background: linear-gradient(135deg, #ef4444, #be123c); }
.accent-purple { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.accent-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.accent-green { background: linear-gradient(135deg, #059669, #84cc16); }
.accent-slate { background: linear-gradient(135deg, #0f172a, #475569); }
.accent-orange { background: linear-gradient(135deg, #f97316, #f59e0b); }
.accent-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.accent-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.accent-indigo { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.accent-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.accent-gray { background: linear-gradient(135deg, #374151, #111827); }

.dark-panel {
  border-radius: 28px;
  padding: 30px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 30%), linear-gradient(135deg, #0f172a, #111827);
  color: #fff;
  box-shadow: var(--shadow);
}

.light-title h2 {
  color: #fff;
}

.compact-grid,
.ranking-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 96px;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.content-section:not(.dark-panel) .compact-card {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.rank-num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.compact-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
  background: #cbd5e1;
}

.compact-card strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card em {
  display: block;
  margin-top: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

.content-section:not(.dark-panel) .compact-card em {
  color: var(--muted);
}

.inner-hero {
  padding: 44px;
  background: radial-gradient(circle at right top, rgba(245, 158, 11, 0.18), transparent 32%), #fff;
}

.inner-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.inner-hero p {
  width: min(780px, 100%);
  font-size: 17px;
}

.category-hero,
.rank-hero,
.search-hero {
  color: #fff;
  border: 0;
}

.category-hero h1,
.category-hero p,
.rank-hero h1,
.rank-hero p,
.search-hero h1,
.search-hero p {
  color: #fff;
}

.rank-hero {
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.25), transparent 36%), linear-gradient(135deg, #111827, #7f1d1d);
}

.search-hero {
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.28), transparent 36%), linear-gradient(135deg, #0f172a, #164e63);
}

.small-actions {
  margin-top: 22px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 36%), linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: #334155;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  color: #dbe4ef;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
}

.player-section {
  margin: 34px 0;
  padding: 30px;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 116px;
  height: 116px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.42);
  cursor: pointer;
  z-index: 3;
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 34px;
  padding: 34px;
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.detail-content article h2:not(:first-child) {
  margin-top: 30px;
}

.large-tags span {
  min-height: 34px;
  padding: 7px 13px;
}

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

.side-links a {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.site-footer {
  margin-top: 70px;
  background: #0f172a;
  color: #cbd5e1;
  padding: 46px 0 26px;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p {
  line-height: 1.7;
}

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

.footer-links a:hover {
  color: var(--brand);
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .all-grid,
  .category-grid,
  .category-grid.large,
  .compact-grid,
  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-panel,
  .detail-content,
  .footer-grid,
  .search-controls {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 86px;
  }

  .intro-panel {
    margin-top: 24px;
    padding: 24px;
  }

  .quick-search,
  .filter-bar {
    flex-direction: column;
  }

  .movie-grid,
  .all-grid,
  .category-grid,
  .category-grid.large,
  .compact-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .detail-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .player-section,
  .dark-panel,
  .inner-hero,
  .detail-content {
    padding: 22px;
  }

  .player-start {
    width: 92px;
    height: 92px;
  }
}
