:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-2: #243247;
  --text: #ffffff;
  --muted: #94a3b8;
  --line: #334155;
  --amber: #f59e0b;
  --orange: #ea580c;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

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

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.logo-text,
.footer-logo span:last-child {
  font-size: 24px;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #e2e8f0;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.header-search,
.mobile-search,
.page-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.58);
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.header-search input,
.mobile-search input,
.page-filter input {
  width: 220px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 7px 10px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.page-filter input::placeholder {
  color: #94a3b8;
}

.header-search button,
.mobile-search button,
.page-filter button,
.primary-btn,
.ghost-btn,
.section-more,
.rank-action {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.page-filter button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.rank-action:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.35);
}

.ghost-btn,
.section-more {
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.7);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.mobile-menu {
  display: none;
  padding: 0 16px 18px;
}

.mobile-menu.open {
  display: block;
}

.mobile-nav,
.mobile-sub-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-nav-link,
.mobile-sub-link {
  border-radius: 12px;
  padding: 12px 14px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.72);
}

.mobile-nav-link.active {
  color: #fbbf24;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(15, 23, 42, 0.08));
}

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

.hero-copy {
  max-width: 680px;
  display: grid;
  gap: 22px;
}

.hero-kicker,
.detail-meta,
.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-kicker span,
.hero-tags span,
.detail-tags span,
.card-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.82);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
}

.hero-kicker span:first-child {
  background: var(--amber);
  color: #ffffff;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: #cbd5e1;
  font-size: 19px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
}

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

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

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 44px;
  background: var(--amber);
}

.page-main {
  padding: 52px 0 24px;
}

.content-section {
  margin-bottom: 64px;
}

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

.section-head h2,
.page-hero h1,
.detail-card h1,
.side-card h2,
.detail-card h2 {
  margin: 0;
  color: #ffffff;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-head p,
.page-hero p,
.footer-grid p,
.detail-card p,
.rank-content p {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.1));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover,
.rank-content h3 a:hover,
.footer-grid a:hover {
  color: #fbbf24;
}

.card-meta,
.card-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card {
  display: block;
  min-height: 154px;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(251, 191, 36, 0.12);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.45);
}

.category-tile span,
.category-card h2 {
  display: block;
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
  border-radius: 28px;
  padding: 44px;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.25), transparent 34%), linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: var(--shadow);
}

.page-hero.slim h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.eyebrow {
  margin: 0 0 10px;
  color: #fbbf24 !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: auto 130px 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: 18px;
  padding: 14px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.list-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #334155;
  color: #fbbf24;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #334155;
}

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

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-content p,
.rank-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-meta {
  margin-top: 7px;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 30px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
}

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

.detail-card,
.side-card {
  border-radius: 22px;
  padding: 26px;
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-card h2 {
  margin-top: 26px;
  margin-bottom: 12px;
  font-size: 25px;
}

.detail-card p {
  font-size: 17px;
}

.detail-card .lead {
  color: #fbbf24;
  font-size: 21px;
  font-style: italic;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.divider {
  height: 1px;
  margin: 26px 0;
  background: var(--line);
}

.detail-side {
  position: sticky;
  top: 104px;
}

.side-card h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.side-list {
  display: grid;
  gap: 16px;
}

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

.empty-state {
  display: none;
  margin: 26px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
}

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

.is-hidden {
  display: none !important;
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-grid p,
.footer-grid ul {
  margin: 12px 0 0;
}

.footer-grid ul {
  display: grid;
  gap: 9px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

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

  .header-search {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 620px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.28));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 78px;
  }

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

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

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

  .page-hero {
    display: grid;
    padding: 30px;
  }

  .detail-side {
    position: static;
  }
}

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

  .header-inner {
    min-height: 64px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 19px;
  }

  .hero {
    height: 560px;
  }

  .hero-copy {
    gap: 16px;
  }

  .hero p {
    font-size: 16px;
  }

  .section-head {
    display: grid;
  }

  .movie-grid,
  .featured-grid,
  .search-page .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: auto 92px 1fr;
  }

  .rank-action {
    display: none;
  }

  .rank-content p {
    display: none;
  }

  .page-filter,
  .mobile-search {
    width: 100%;
  }

  .page-filter input,
  .mobile-search input {
    width: 100%;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }
}
