:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.84);
  --border: rgba(255, 255, 255, 0.10);
  --border-bright: rgba(251, 191, 36, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --blue: #38bdf8;
  --green: #22c55e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 2%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(56, 189, 248, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

img.media-missing {
  opacity: 0;
}

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

button,
input,
select {
  font: inherit;
}

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

.header-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.4);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero {
  position: relative;
  min-height: 660px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

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

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

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

.hero-slide img {
  filter: saturate(1.1) contrast(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 36%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 64px;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-weight: 700;
}

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

.gradient-title {
  background: linear-gradient(90deg, #fff7ed, #fbbf24 44%, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 690px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.control-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.28);
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 55px rgba(245, 158, 11, 0.4);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.btn-soft {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.26);
  box-shadow: none;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  width: min(100%, 980px);
  margin-top: 38px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.search-box input {
  width: 100%;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: 0.24s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fbbf24;
}

.page-hero,
.detail-hero {
  padding: 72px 0 34px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0));
}

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

.page-title {
  max-width: 860px;
}

.page-title h1,
.detail-title h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-title p,
.detail-title p {
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.breadcrumb b {
  color: rgba(255, 255, 255, 0.24);
}

.section {
  padding: 58px 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.78));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-bright);
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.16);
}

.movie-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 20%, rgba(245, 158, 11, 0.26), transparent 14rem),
    linear-gradient(135deg, #1e293b, #020617);
}

.movie-card-small .movie-media {
  aspect-ratio: 16 / 10;
}

.movie-media img {
  transition: transform 0.6s ease, opacity 0.3s ease;
}

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

.movie-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.72));
}

.movie-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: auto;
  right: 12px;
  color: #fff;
  background: rgba(239, 68, 68, 0.92);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-line {
  margin-top: 10px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.66));
  transition: 0.28s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 80% 18%, rgba(251, 191, 36, 0.35), transparent 14rem);
  transition: opacity 0.28s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-bright);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card span,
.category-card strong,
.category-card em {
  position: relative;
  z-index: 1;
}

.category-card span {
  color: var(--amber-light);
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 24px;
}

.category-card em {
  color: var(--muted);
  font-style: normal;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
}

.filter-button.is-active,
.filter-button:hover {
  color: #111827;
  background: #fbbf24;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 122px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  transition: 0.24s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 22px;
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e293b, #020617);
}

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

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 38px 0 68px;
}

.player-card,
.info-card,
.side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.82)),
    var(--poster-bg, linear-gradient(135deg, #1e293b, #020617));
}

.player-overlay img {
  position: absolute;
  inset: 0;
  opacity: 0.56;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
}

.player-overlay.is-hidden {
  display: none;
}

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 0 0 16px rgba(251, 191, 36, 0.13), 0 20px 60px rgba(245, 158, 11, 0.42);
}

.play-button span {
  margin-left: 6px;
  font-size: 34px;
  font-weight: 900;
}

.player-caption {
  padding: 20px 22px;
  border-top: 1px solid var(--border);
}

.player-caption h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.info-card {
  padding: 26px;
  margin-top: 24px;
}

.info-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.info-card p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  line-height: 1.92;
}

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

.meta-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.meta-box strong {
  font-size: 15px;
}

.side-card {
  padding: 20px;
  margin-bottom: 20px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  transition: 0.22s ease;
}

.mini-card:hover {
  background: rgba(251, 191, 36, 0.12);
}

.mini-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  line-height: 1.35;
}

.mini-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}

.pagination a:hover,
.pagination span {
  color: #0f172a;
  background: #fbbf24;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  color: var(--muted);
}

.footer-brand {
  color: var(--text);
}

.footer-shell p {
  max-width: 720px;
  line-height: 1.75;
}

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

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

.copyright {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid-wide,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  .header-shell {
    height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 13px 16px;
  }

  .hero {
    min-height: 700px;
  }

  .hero-panel,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero-dots {
    justify-content: center;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .rank-item {
    grid-template-columns: 54px 96px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .shell,
  .hero-shell,
  .header-shell,
  .footer-shell {
    width: min(100% - 24px, 1240px);
  }

  .brand {
    font-size: 18px;
  }

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

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

  .hero-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .rank-list,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 0;
  }

  .rank-item {
    grid-template-columns: 52px 88px minmax(0, 1fr);
  }
}
