:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --red: #ef4444;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(239, 68, 68, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

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

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #020617;
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
  font-size: 15px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--muted);
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.14);
}

.nav-toggle {
  display: none;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 18px;
}

main {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  isolation: isolate;
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 50%, rgba(2, 6, 23, 0.84) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  padding: 140px 420px 110px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-info .lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  margin: 0 0 22px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  color: #fde68a;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(245, 158, 11, 0.26);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-panel button {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: absolute;
  z-index: 3;
  right: calc((100vw - min(1280px, calc(100vw - 32px))) / 2);
  top: 140px;
  width: min(32vw, 360px);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
}

.home-search-wrap,
.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-wrap {
  position: relative;
  z-index: 8;
  margin-top: -36px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px auto;
  gap: 12px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel input,
.search-panel select {
  width: 100%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 48px;
  padding: 0 14px;
  outline: 0;
}

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

.section-block,
.rank-section {
  width: min(1280px, calc(100% - 32px));
  margin: 72px auto 0;
}

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

.section-heading span {
  display: block;
  color: var(--accent);
  font-weight: 900;
}

.section-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 24px 64px rgba(245, 158, 11, 0.11);
}

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

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
  line-height: 1;
  border-radius: 999px;
  padding: 7px 9px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.score {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: #f97316;
}

.card-body {
  padding: 14px;
}

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 700;
}

.card-body h3 {
  margin: 7px 0 7px;
  font-size: 17px;
  line-height: 1.32;
}

.card-body h3 a:hover {
  color: #fcd34d;
}

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

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(239, 68, 68, 0.1)),
    rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.38);
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card span,
.category-overview-card p {
  color: var(--muted);
  margin: 0;
}

.rank-panel {
  display: grid;
  grid-template-columns: 0.92fr 1.3fr;
  gap: 24px;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.15)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.rank-copy {
  padding: 18px;
}

.rank-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
}

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

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

.rank-link {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid var(--line);
}

.rank-link span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.rank-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-link em {
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
}

.page-main {
  padding-top: 46px;
  padding-bottom: 30px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 52px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.28), transparent 24rem),
    radial-gradient(circle at 88% 20%, rgba(239, 68, 68, 0.18), transparent 24rem),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.category-overview-card > a {
  display: block;
}

.category-overview-card > a > span {
  color: #fcd34d;
  font-weight: 900;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sample-links a {
  color: var(--muted);
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--subtle);
  margin: 0 0 18px;
  font-size: 14px;
}

.crumbs a:hover,
.detail-meta a:hover {
  color: #fcd34d;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.22), transparent 28rem),
    var(--panel);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
  font-size: clamp(34px, 6vw, 68px);
}

.large-tags {
  margin-top: 18px;
}

.player-section,
.content-section {
  margin-top: 34px;
  padding: 24px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.player-section h2,
.content-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.36);
  font-size: 34px;
}

.player-start.hidden {
  display: none;
}

.content-section p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

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

.search-empty {
  display: none;
  color: var(--subtle);
  text-align: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.search-empty.visible {
  display: block;
}

.movie-card.is-hidden {
  display: none;
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 88px auto 0;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 560px;
}

.footer-grid h3 {
  color: #ffffff;
  margin: 0 0 12px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: #fcd34d;
}

.copyright {
  color: var(--subtle);
  margin: 28px 0 0;
  text-align: center;
}

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

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

  .hero-content {
    padding-right: 320px;
  }

  .hero-poster {
    width: 280px;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    padding: 120px 0 300px;
  }

  .hero-poster {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 70px;
    width: 210px;
    transform: translateX(-50%) rotate(0deg);
  }

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

  .rank-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    display: block;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .mobile-nav,
  .home-search-wrap,
  .page-main,
  .section-block,
  .rank-section,
  .site-footer {
    width: min(100% - 22px, 1280px);
  }

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .hero-slider,
  .hero-content {
    min-height: 710px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.035em;
  }

  .hero-content p,
  .page-hero p,
  .detail-info .lead {
    font-size: 17px;
  }

  .page-hero,
  .detail-hero,
  .player-section,
  .content-section {
    padding: 20px;
    border-radius: 24px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .rank-link {
    grid-template-columns: 36px 1fr;
  }

  .rank-link em {
    grid-column: 2;
  }
}
