:root {
  color-scheme: dark;
  --page: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.15), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(249, 115, 22, 0.12), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.38);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-copy strong,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.nav-link,
.dropdown-panel a,
.mobile-menu a {
  border-radius: 12px;
  color: var(--soft);
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link {
  display: inline-flex;
  padding: 10px 14px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown-panel a:hover,
.mobile-menu a:hover {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.11);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 190px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.dropdown-panel a {
  padding: 9px 10px;
  color: var(--soft);
  font-size: 14px;
}

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

.header-search {
  width: min(280px, 24vw);
}

.header-search label {
  display: block;
  position: relative;
}

.header-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.header-search input,
.filter-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  padding: 11px 14px;
}

.header-search input:focus,
.filter-search input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-menu.is-open {
  display: grid;
}

.mobile-menu a {
  padding: 10px 12px;
  font-weight: 700;
}

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

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

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

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

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

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 48%),
    radial-gradient(circle at 72% 48%, rgba(245, 158, 11, 0.16), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 90px 0 70px;
}

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

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-bottom: 30px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
  font-weight: 800;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn,
.section-link,
.filter-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border 0.22s ease;
}

.btn {
  min-height: 50px;
  padding: 0 20px;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.26);
}

.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--soft);
  background: rgba(15, 23, 42, 0.68);
}

.btn:hover,
.section-link:hover,
.filter-buttons button:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 46px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--amber-light), var(--orange));
}

main {
  position: relative;
}

.section,
.page-hero,
.detail-wrap {
  padding: 68px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-lead,
.footer-grid p {
  max-width: 720px;
  color: var(--muted);
}

.section-link {
  min-width: 108px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transform: translateZ(0);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.92) 100%);
  opacity: 0.92;
}

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

.card-play,
.big-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.36);
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translateY(0) scale(1);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--amber-light);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 8px;
  font-size: 12px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

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

.tag-list span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -54px;
  bottom: -54px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card p {
  color: var(--muted);
}

.category-samples {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.84);
}

.page-hero {
  background:
    radial-gradient(circle at 25% 0%, rgba(245, 158, 11, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), transparent);
}

.tool-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
}

.filter-search {
  flex: 1 1 320px;
}

.filter-search input {
  padding: 13px 15px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  min-height: 40px;
  padding: 0 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
}

.filter-buttons button.is-active {
  border-color: rgba(245, 158, 11, 0.55);
  color: #ffffff;
  background: rgba(245, 158, 11, 0.22);
}

.empty-state {
  display: none;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 82px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  transition: border 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  background: rgba(15, 23, 42, 0.94);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.rank-poster {
  width: 82px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.detail-wrap {
  padding-top: 36px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.68) 56%, rgba(2, 6, 23, 0.88));
  cursor: pointer;
}

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

.big-play {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  font-size: 30px;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 22px;
}

.detail-panel,
.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.detail-panel {
  padding: 24px;
}

.detail-title {
  margin-bottom: 16px;
}

.detail-lead {
  font-size: 18px;
}

.detail-cover {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

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

.content-panel {
  margin-top: 28px;
  padding: 28px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  color: var(--soft);
}

.related-section {
  margin-top: 42px;
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

  .detail-cover {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

  .section-head,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero,
  .hero-content {
    min-height: 70vh;
  }

  .hero-content {
    padding: 70px 0 56px;
  }

  .hero h1 {
    font-size: 42px;
  }

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

  .tool-panel {
    align-items: stretch;
    flex-direction: column;
  }

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