:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(30, 41, 59, 0.82);
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 25px 55px rgba(2, 6, 23, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.13), transparent 28%), linear-gradient(180deg, #0f172a 0%, #111827 46%, #0f172a 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
  color: #fff;
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-weight: 650;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  color: #fff;
  background: rgba(51, 65, 85, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.55);
  color: #dbeafe;
}

.mobile-nav.open {
  display: grid;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 620px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.84) 38%, rgba(15, 23, 42, 0.22) 100%), linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.08) 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 86px 20px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 420px;
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  color: #ffedd5;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 17px;
}

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

.hero-tags span,
.tag-row span,
.meta-list span,
.rank-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn,
.small-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 20px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover,
.small-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.36);
}

.btn.ghost,
.section-link {
  background: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  box-shadow: none;
}

.hero-poster {
  position: relative;
  min-height: 480px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-7deg) rotateX(2deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.65s ease;
}

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-card-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.hero-card-caption strong {
  display: block;
  font-size: 20px;
}

.hero-card-caption span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

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

.hero-dots button {
  width: 28px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.page-section,
.page-hero,
.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

.page-hero {
  padding-top: 78px;
  padding-bottom: 38px;
}

.page-hero h1,
.detail-title h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.page-hero p,
.section-head p,
.detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.025em;
}

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

.movie-card {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.35);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(15, 23, 42, 0.92));
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.88);
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.34);
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.card-body h2 a:hover,
.rank-info h2 a:hover {
  color: #fbbf24;
}

.card-body p {
  margin: 0 0 14px;
  min-height: 44px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.category-card {
  min-height: 180px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(30, 41, 59, 0.8));
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.24);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

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

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

.category-card p {
  margin: 0 0 16px;
  color: #cbd5e1;
  font-size: 14px;
}

.category-card span {
  color: #fbbf24;
  font-weight: 800;
}

.filter-panel {
  margin: 0 0 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.64);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.filter-panel input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  border-radius: 15px;
  padding: 13px 15px;
  background: rgba(30, 41, 59, 0.86);
  color: var(--text);
  font-size: 15px;
}

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

.filter-panel span {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.74);
  border: 1px solid var(--line);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-info p {
  margin: 0 0 10px;
  color: #cbd5e1;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
}

.detail-main,
.detail-side,
.player-card,
.content-card {
  background: rgba(30, 41, 59, 0.74);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
}

.detail-main {
  padding: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
  display: block;
}

.video-cover-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  color: #fff;
}

.video-cover-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.video-cover-button span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 30px;
  box-shadow: 0 24px 44px rgba(249, 115, 22, 0.34);
}

.video-cover-button.is-hidden {
  display: none;
}

.detail-title {
  margin: 22px 0;
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 54px);
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.content-card {
  padding: 24px;
  margin-top: 22px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 18px;
  color: #dbeafe;
}

.detail-side {
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 92px;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 18px;
}

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

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

.side-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.side-item img {
  width: 72px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 12px;
}

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

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 30px;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--muted);
  margin: 0;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

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

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 20px;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.empty-message {
  display: none;
  padding: 26px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--line);
  color: #cbd5e1;
}

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

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

  .hero-inner,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 360px;
    transform: none;
  }

  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 54px;
    padding-bottom: 76px;
  }

  .hero-poster {
    min-height: 300px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .rank-row {
    grid-template-columns: 48px 84px minmax(0, 1fr);
  }

  .rank-row .small-btn {
    grid-column: 2 / -1;
    justify-self: start;
    padding: 8px 14px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

  .header-inner {
    padding: 0 14px;
  }

  .brand {
    font-size: 18px;
  }

  .page-section,
  .page-hero,
  .detail-shell {
    padding-left: 14px;
    padding-right: 14px;
  }
}
