:root {
  color-scheme: dark;
  --bg: #0a0e1a;
  --bg-soft: #101624;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.12);
  --border-amber: rgba(245, 158, 11, 0.34);
  --text: #f3f4f6;
  --muted: #a7b0c0;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.12), transparent 32rem),
    linear-gradient(180deg, #0a0e1a 0%, #0d1322 48%, #080b13 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-amber);
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #111827;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.35);
}

.brand-text,
.footer-brand {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--amber-soft), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.nav-dropdown button {
  border: 0;
  background: transparent;
  color: var(--text);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown button:hover {
  color: var(--amber-soft);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  display: grid;
  min-width: 170px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(14, 20, 34, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #d5dae4;
}

.dropdown-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--amber-soft);
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 11px;
  background: var(--panel);
  color: var(--text);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #d9dee9;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.96) 0%, rgba(10, 14, 26, 0.72) 45%, rgba(10, 14, 26, 0.86) 100%),
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.18), transparent 28rem);
  z-index: 1;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 44px;
  align-items: center;
  min-height: 640px;
  padding: 64px 0;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid var(--border-amber);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-soft);
  font-size: 0.92rem;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.36);
}

.hero h1 span,
.page-hero h1 span,
.detail-title h1 span {
  display: block;
  background: linear-gradient(90deg, #ffffff, #fbbf24 52%, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #d1d7e3;
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #111827;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  max-width: 560px;
  margin-top: 28px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 16px;
  background: transparent;
  color: #fff;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--amber);
  color: #111827;
  font-weight: 800;
}

.hero-side {
  position: relative;
  display: grid;
  gap: 16px;
}

.focus-card,
.glass-panel,
.section-panel,
.page-hero,
.filter-bar,
.player-panel,
.detail-copy,
.related-panel,
.category-card,
.rank-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.focus-card {
  overflow: hidden;
}

.focus-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.focus-card-body {
  padding: 22px;
}

.focus-card h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.hero-mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  transition: 0.2s ease;
}

.hero-mini-list a:hover {
  border-color: var(--border-amber);
  background: rgba(245, 158, 11, 0.12);
}

main {
  padding: 56px 0 72px;
}

.section-panel,
.page-hero,
.filter-bar,
.detail-copy,
.related-panel,
.player-panel {
  margin-bottom: 34px;
  padding: 28px;
}

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

.section-heading h2,
.category-card h2,
.detail-copy h2,
.related-panel h2,
.player-panel h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.section-heading p,
.category-card p,
.detail-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-amber);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.9));
}

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

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

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 700;
}

.type-badge {
  left: 10px;
  top: 10px;
  padding: 5px 9px;
}

.year-badge {
  right: 10px;
  top: 10px;
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #111827;
}

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

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.4;
}

.movie-card h2 a:hover {
  color: var(--amber-soft);
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.3em;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.movie-meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

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

.category-card {
  padding: 22px;
  min-height: 190px;
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-amber);
  background: rgba(245, 158, 11, 0.1);
}

.category-card strong {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber-soft);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 16px;
  align-items: end;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: #d9dfeb;
  font-size: 0.92rem;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-bar option {
  background: #101624;
}

.empty-state {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 84px minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  box-shadow: none;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #111827;
  font-weight: 900;
}

.rank-thumb {
  width: 84px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

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

.rank-title h2 {
  margin: 0;
  font-size: 1.05rem;
}

.rank-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.rank-score {
  justify-self: end;
  color: var(--amber-soft);
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.detail-meta span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 0.9rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  color: #fff;
}

.play-overlay.is-hidden {
  display: none;
}

.play-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #111827;
  font-size: 2.4rem;
  box-shadow: 0 24px 58px rgba(245, 158, 11, 0.35);
  transform: translateZ(0);
}

.play-caption {
  margin-top: 124px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
  font-weight: 700;
}

.detail-copy {
  line-height: 1.88;
}

.detail-copy h2 {
  margin-top: 0;
  color: #fff;
}

.detail-copy p + h2 {
  margin-top: 28px;
}

.related-panel .movie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-footer {
  border-top: 1px solid var(--border-amber);
  background: rgba(8, 11, 19, 0.94);
  padding: 44px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.1fr;
  gap: 28px;
}

.site-footer p {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--amber-soft);
  font-size: 1rem;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

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

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

  .hero-side {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 44px 0;
  }

  .hero-side,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 48px 70px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }
}

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

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

  .hero-search {
    align-items: stretch;
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search input {
    padding: 12px 14px;
  }

  .section-panel,
  .page-hero,
  .filter-bar,
  .detail-copy,
  .related-panel,
  .player-panel {
    padding: 20px;
  }

  .focus-card img {
    height: 240px;
  }
}
