* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 36rem),
    radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-failed {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.93), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 14px;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.2rem;
  color: #fef3c7;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

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

.desktop-nav a,
.mobile-nav a {
  position: relative;
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.25s ease;
}

.desktop-nav a::after,
.mobile-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -10px;
  height: 2px;
  background: var(--amber);
  border-radius: 999px;
  transition: right 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #fbbf24;
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after,
.mobile-nav a:hover::after,
.mobile-nav a.is-active::after {
  right: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.82);
  font-size: 1.4rem;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.hero {
  width: min(1220px, calc(100% - 28px));
  margin: 28px auto 0;
}

.hero-stage {
  position: relative;
  min-height: clamp(560px, 74vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-image {
  position: absolute;
  inset: 0;
  filter: saturate(1.04) contrast(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.70) 40%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.06) 64%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 18% 24%, rgba(245, 158, 11, 0.28), transparent 22rem),
    linear-gradient(90deg, #020617 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(760px, 92%);
  padding: clamp(42px, 8vw, 92px);
}

.eyebrow,
.section-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-title span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.85);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.45rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: #fff;
}

.hero p,
.page-hero p,
.detail-info .lead {
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  line-height: 1.9;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 18px;
}

.hero-meta span,
.detail-meta span {
  padding: 9px 14px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 0.78rem;
  font-style: normal;
}

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

.primary-btn,
.ghost-btn,
.text-btn,
.home-search button,
.advanced-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.24);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-btn:hover,
.home-search button:hover,
.advanced-filter button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 55px rgba(245, 158, 11, 0.35);
}

.ghost-btn,
.text-btn {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost-link {
  color: #fbbf24;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  right: 34px;
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.hero-mini {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.hero-mini:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.hero-mini span {
  color: #fbbf24;
  font-weight: 900;
}

.hero-mini strong,
.hero-mini em {
  display: block;
  margin-top: 6px;
}

.hero-mini strong {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-mini em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-band,
.section-wrap,
.page-hero,
.detail-hero {
  width: min(1200px, calc(100% - 28px));
  margin: 56px auto 0;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

.search-band h2,
.section-title h2,
.content-card h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.search-band p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.home-search,
.advanced-filter,
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.home-search input,
.advanced-filter input,
.advanced-filter select,
.filter-bar input,
.filter-bar button,
.stream-tabs button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.55);
  outline: 0;
}

.home-search input,
.advanced-filter input,
.filter-bar input {
  flex: 1 1 240px;
}

.filter-bar button,
.stream-tabs button {
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.filter-bar button.is-active,
.stream-tabs button.is-active,
.filter-bar button:hover,
.stream-tabs button:hover {
  color: #111827;
  background: #f59e0b;
  border-color: #f59e0b;
}

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

.section-title a {
  color: #fbbf24;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.category-tile img {
  position: absolute;
  inset: 0;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 18px;
}

.category-tile strong {
  margin-top: 132px;
  color: #fff;
  font-size: 1.24rem;
}

.category-tile em {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.5;
  font-style: normal;
}

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.78);
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.13);
}

.cover-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.24), transparent 46%),
    linear-gradient(135deg, #111827, #020617);
}

.cover-frame img {
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.movie-card:hover .cover-frame img {
  transform: scale(1.08);
}

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

.score-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 900;
}

.score-badge.large {
  top: 16px;
  right: 16px;
  font-size: 0.9rem;
}

.rank-num {
  left: 10px;
  right: auto;
  color: #111827;
  background: #f59e0b;
}

.play-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #111827;
  background: rgba(245, 158, 11, 0.94);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  display: block;
  padding: 14px;
}

.movie-info strong,
.movie-info em,
.movie-meta {
  display: block;
}

.movie-info strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info em {
  min-height: 42px;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.55;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.movie-card-dense {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-dense .cover-frame {
  aspect-ratio: auto;
  min-height: 158px;
}

.movie-card-dense .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.compact-hero,
.category-hero,
.search-hero {
  min-height: 300px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
}

.category-cover {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), transparent);
}

.category-card-large h2 {
  margin: 4px 0 10px;
  color: #fff;
}

.category-card-large p,
.mini-list,
.empty-state {
  color: var(--muted);
  line-height: 1.8;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.mini-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.empty-state {
  display: none;
  margin: 26px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  background: rgba(15, 23, 42, 0.64);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 28px;
}

.breadcrumbs a {
  color: #fbbf24;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #111827, #020617);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.detail-tags {
  margin: 22px 0 30px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.18), transparent 24rem),
    #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.90), rgba(2, 6, 23, 0.38)),
    radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.22), transparent 20rem);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.movie-player.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-circle {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 2rem;
  box-shadow: 0 0 56px rgba(245, 158, 11, 0.42);
}

.player-cover strong {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}

.player-cover em {
  color: #cbd5e1;
  font-style: normal;
}

.stream-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

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

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
}

.content-card p {
  color: #cbd5e1;
  line-height: 2;
  font-size: 1rem;
}

.site-footer {
  margin-top: 74px;
  padding: 46px 0 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(2, 6, 23, 0.95));
}

.footer-grid {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  transition: color 0.25s ease;
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 28px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

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

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

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

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

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

  .mobile-nav.is-open {
    display: grid;
    gap: 16px;
  }

  .hero-stage {
    min-height: 640px;
  }

  .hero-content {
    padding: 38px 24px;
  }

  .hero-strip,
  .search-band,
  .category-list-grid,
  .detail-layout,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-card-large {
    grid-template-columns: 130px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .hero,
  .section-wrap,
  .search-band,
  .page-hero,
  .detail-hero,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1200px);
  }

  .brand-text small {
    display: none;
  }

  .hero-stage {
    min-height: 590px;
    border-radius: 24px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.35rem;
  }

  .hero-dots {
    right: 20px;
    bottom: 20px;
  }

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

  .movie-card-dense,
  .category-card-large {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .movie-card-dense .cover-frame,
  .category-cover {
    min-height: 148px;
  }

  .search-band,
  .page-hero,
  .detail-hero,
  .content-card {
    padding: 22px;
  }
}
