:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-2: #1e293b;
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --line: #1e293b;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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(100% - 32px, 1280px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.25);
}

.brand-text {
  font-size: 1.25rem;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 0.94rem;
  font-weight: 650;
  transition: color 180ms ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fbbf24;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 1px solid #263244;
  outline: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--text);
  padding: 11px 14px;
}

.header-search input {
  width: 230px;
}

.header-search button,
.mobile-search button,
.search-main button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  padding: 11px 18px;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #263244;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.mobile-menu {
  border-top: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-menu-inner {
  display: grid;
  gap: 10px;
  padding: 16px 0 20px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 700;
}

.mobile-link.is-active,
.mobile-link:hover {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1000ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.84) 40%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(0deg, #020617 0%, transparent 44%, rgba(2, 6, 23, 0.26) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 720px);
  padding-top: 24px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.9rem;
  font-weight: 750;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-meta,
.detail-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
}

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

.hero-desc {
  max-width: 640px;
  margin: 22px 0 30px;
  color: #d1d5db;
  font-size: 1.12rem;
  line-height: 1.75;
}

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

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button {
  background: var(--accent);
  color: #111827;
}

.button:hover {
  background: #fbbf24;
  transform: translateY(-2px) scale(1.02);
}

.button-secondary {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  transition: background 180ms ease, transform 180ms ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-2px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 180ms ease, background 180ms ease;
}

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

.main-content {
  padding: 64px 0 0;
}

.section {
  margin-bottom: 76px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.movie-card {
  position: relative;
  min-width: 0;
}

.movie-card .movie-poster {
  aspect-ratio: 2 / 3;
}

.movie-card-wide .movie-poster {
  aspect-ratio: 16 / 9;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease, filter 300ms ease;
}

.movie-card:hover .movie-poster img,
.compact-card:hover img {
  transform: scale(1.08);
  filter: brightness(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 48%);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 240ms ease, transform 240ms ease;
  font-weight: 900;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #facc15);
  color: #111827;
  font-weight: 900;
}

.movie-info {
  padding: 14px 2px 0;
}

.movie-info h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.36;
}

.movie-info h3 a:hover {
  color: #fbbf24;
}

.movie-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  margin: 9px 0 0;
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 0.9rem;
  -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 {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 750;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 28px;
}

.panel {
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.panel-inner {
  padding: 24px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 15px;
  background: rgba(30, 41, 59, 0.7);
  transition: background 180ms ease, transform 180ms ease;
}

.compact-card:hover {
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-2px);
}

.compact-card img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 240ms ease;
}

.compact-card strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.compact-card small {
  color: var(--muted);
}

.compact-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent);
  color: #111827;
  font-weight: 900;
}

.compact-card .compact-rank + img {
  display: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.category-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.92));
  padding: 24px;
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card span {
  margin-top: 20px;
  color: #fbbf24;
  font-weight: 850;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 54px;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2), transparent 28rem), linear-gradient(135deg, #0f172a, #020617);
  border-bottom: 1px solid #1e293b;
}

.page-hero h1,
.detail-title {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.75;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 190px));
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.search-main {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 24px;
}

.search-main input {
  width: 100%;
  border: 1px solid #263244;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--text);
  padding: 14px 18px;
  outline: 0;
}

.result-count {
  margin: 0 0 18px;
  color: var(--muted);
}

.cards-empty {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--muted);
}

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

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

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-shell {
  padding-top: 42px;
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.22));
  transition: opacity 220ms ease, visibility 220ms ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.35);
}

.play-text {
  font-weight: 900;
  letter-spacing: 0.08em;
}

.detail-card {
  margin-top: 22px;
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  padding: 26px;
}

.detail-title {
  margin-top: 0;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-cover {
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.sticky-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.side-panel {
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 110px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-item img {
  width: 110px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 950;
}

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.rank-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.rank-heat {
  color: #fbbf24;
  font-weight: 900;
  white-space: nowrap;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid #1e293b;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.footer-about p,
.site-footer a,
.site-footer li {
  color: var(--muted);
}

.footer-about p {
  max-width: 560px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 18px 16px;
  text-align: center;
  color: var(--muted-2);
}

@media (max-width: 1120px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

  .sticky-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-control {
    top: auto;
    bottom: 78px;
  }

  .hero-prev {
    left: 14px;
  }

  .hero-next {
    right: 14px;
  }

  .hero-desc {
    font-size: 1rem;
  }

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

  .movie-grid,
  .movie-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .rank-item img {
    width: 84px;
    height: 58px;
  }

  .rank-heat {
    grid-column: 3;
  }

  .detail-card,
  .side-panel,
  .panel-inner {
    padding: 18px;
  }
}

@media (max-width: 440px) {
  .movie-grid,
  .movie-grid-wide {
    grid-template-columns: 1fr;
  }

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