:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.78);
  --line: rgba(100, 116, 139, 0.26);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(30, 64, 175, 0.18), transparent 35rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #ffffff;
}

.logo-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
  font-size: 14px;
}

.logo-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #d1d5db;
  font-weight: 600;
}

.nav-links a,
.mobile-nav a,
.footer-links a,
.section-link,
.breadcrumb a {
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.nav-links .is-active,
.mobile-nav a:hover,
.mobile-nav .is-active,
.footer-links a:hover,
.section-link:hover,
.breadcrumb a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #d1d5db;
  font-weight: 600;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.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-bg {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: brightness(0.42) blur(2px);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.72)),
    linear-gradient(0deg, #0f172a 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
  padding: 88px 0 112px;
}

.hero-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(36px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

.hero h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 850;
}

.hero p {
  margin: 0 auto 24px;
  max-width: 760px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.tag-list,
.detail-meta,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.hero-tags span,
.tag-list span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.48);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

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

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

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

.section {
  padding: 72px 0;
}

.flush-top {
  padding-top: 26px;
}

.intro-section {
  padding-bottom: 30px;
}

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

.section-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  font-weight: 900;
}

.section-head p,
.page-hero p,
.site-footer p,
.detail-card p,
.overview-card p {
  margin: 0;
  color: var(--dim);
  line-height: 1.75;
}

.section-link {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
}

.search-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  outline: none;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  transition: border 0.22s ease, box-shadow 0.22s ease;
}

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

.filter-row {
  justify-content: flex-start;
  margin-top: 16px;
}

.filter-btn {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border 0.22s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
}

.no-results {
  margin: 16px 0 0;
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.96);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  background: #273449;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.48);
}

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

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .card-poster img,
.mini-card:hover img,
.top-rank-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.88);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 32px;
  opacity: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent 55%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.22s ease;
}

.movie-card:hover .card-body strong {
  color: var(--accent);
}

.card-body em {
  min-height: 40px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.45;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.movie-card-compact {
  border-radius: 18px;
  box-shadow: none;
}

.movie-card-compact .card-body {
  padding: 12px 4px 2px;
  background: transparent;
}

.movie-card-compact .card-body em {
  min-height: 0;
  -webkit-line-clamp: 1;
}

.category-preview {
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
  transition: transform 0.5s ease;
}

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

.category-card span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), transparent);
}

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

.category-card strong {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-card em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-main {
  padding: 42px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: #94a3b8;
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.15), transparent 42%),
    rgba(30, 41, 59, 0.72);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: 42px;
}

.overview-list {
  display: grid;
  gap: 24px;
}

.overview-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) 1.22fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.overview-card h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 28px;
}

.overview-card .btn {
  margin-top: 22px;
}

.mini-row,
.mini-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.mini-list {
  grid-template-columns: 1fr;
}

.mini-card {
  display: grid;
  gap: 8px;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.45;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.mini-card span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-rank-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.top-rank-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

.top-rank-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.top-rank-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.top-rank-info em,
.top-rank-info strong,
.top-rank-info small {
  display: block;
}

.top-rank-info em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.top-rank-info strong {
  margin: 6px 0;
  color: #ffffff;
  font-size: 22px;
}

.top-rank-info small {
  color: #cbd5e1;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 30px;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.32);
}

.play-overlay strong {
  font-size: 18px;
}

.detail-card,
.side-panel > div {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.88);
  box-shadow: var(--shadow);
}

.detail-card h2,
.related-panel h2,
.site-footer h2 {
  margin: 24px 0 12px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
}

.detail-card h2:first-child,
.related-panel h2:first-child,
.site-footer h2:first-child {
  margin-top: 0;
}

.detail-meta {
  justify-content: flex-start;
  margin: 12px 0 22px;
}

.one-line {
  color: #fbbf24 !important;
  font-size: 18px;
  font-style: italic;
}

.tag-list {
  justify-content: flex-start;
}

.side-panel {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 88px;
}

.poster-panel {
  display: grid;
  gap: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
}

.related-panel .mini-card {
  grid-template-columns: 82px 1fr;
  align-items: center;
}

.related-panel .mini-card img {
  width: 82px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
  padding: 46px 0;
}

.site-footer p {
  margin-top: 16px;
  max-width: 460px;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--dim);
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

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

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

  .small-grid,
  .rank-grid,
  .rank-list-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .side-panel {
    position: static;
  }
}

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

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-content {
    padding: 70px 0 96px;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .small-grid,
  .rank-grid,
  .rank-list-grid,
  .category-grid,
  .mini-row,
  .top-rank-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero,
  .compact-hero,
  .detail-card,
  .side-panel > div {
    padding: 24px;
    border-radius: 24px;
  }

  .related-panel .mini-card {
    grid-template-columns: 72px 1fr;
  }

  .related-panel .mini-card img {
    width: 72px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .small-grid,
  .rank-grid,
  .rank-list-grid,
  .category-grid,
  .mini-row,
  .top-rank-layout {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

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

  .card-body em {
    font-size: 13px;
  }

  .section {
    padding: 50px 0;
  }
}
