:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-panel: rgba(15, 23, 42, 0.78);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, 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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: white;
  font-size: 17px;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #1e293b;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  background: #0f172a;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-links {
  display: grid;
  gap: 12px;
  padding: 18px 0;
}

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

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

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

.hero-fade,
.hero-side-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-fade {
  background: linear-gradient(to top, var(--bg) 0%, rgba(2, 6, 23, 0.74) 45%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-side-fade {
  background: linear-gradient(to right, var(--bg) 0%, rgba(2, 6, 23, 0.82) 36%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 92px 0;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-copy h1,
.sub-hero h1 {
  margin: 22px 0 18px;
  max-width: 840px;
  color: white;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy p,
.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--amber);
  color: white;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  background: var(--amber-dark);
}

.btn-ghost {
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(15, 23, 42, 0.48);
  color: #e2e8f0;
  backdrop-filter: blur(10px);
}

.section-block {
  padding: 72px 0;
}

.section-band {
  background: rgba(15, 23, 42, 0.52);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 8px 0 0;
  color: white;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-card:hover .card-poster img,
.category-tile:hover img,
.related-card:hover img,
.rank-card:hover img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.93);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 54px;
  margin: 0 0 6px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--amber);
}

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

.card-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  font-size: 12px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(2, 6, 23, 0.46);
  color: white;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  background: #020617;
  color: white;
  padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #0f172a;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.1));
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile span,
.category-tile strong {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 52px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.category-tile strong {
  bottom: 20px;
  color: white;
  font-size: 18px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 320px);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.sub-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  background:
    radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(135deg, #020617 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
}

.ranking-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: blur(1px);
}

.sub-hero .shell {
  position: relative;
  z-index: 2;
}

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

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.8);
}

.category-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
}

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

.category-overview-card span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.category-overview-card h2 a:hover {
  color: var(--amber);
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted-strong);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
}

.mini-links a:hover {
  color: white;
  background: rgba(245, 158, 11, 0.22);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 70px 180px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.45);
}

.rank-num {
  color: var(--amber);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

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

.rank-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-body h2 a:hover {
  color: var(--amber);
}

.rank-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--muted-strong);
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.rank-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-shell {
  padding: 32px 0 78px;
}

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

.player-card,
.detail-content,
.side-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.player-card {
  overflow: hidden;
}

.video-wrap {
  position: relative;
  background: black;
  aspect-ratio: 16 / 9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.68));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 18px;
  padding: 16px 24px;
  background: var(--amber);
  color: white;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 22px 46px rgba(245, 158, 11, 0.28);
}

.player-overlay button span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.detail-content {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-content h1 {
  margin: 20px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.detail-meta {
  margin: 0 0 18px;
  color: var(--muted);
}

.detail-tags {
  margin-bottom: 30px;
}

.detail-content section {
  border-top: 1px solid var(--border);
  padding-top: 26px;
  margin-top: 26px;
}

.detail-content h2,
.side-card h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 22px;
}

.detail-content p {
  margin: 0 0 16px;
  color: #dbe4ef;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.side-card {
  padding: 20px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.poster-card p {
  margin: 0;
  color: var(--muted-strong);
}

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

.related-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.related-poster {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: #020617;
}

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

.related-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

.related-card h3 a:hover {
  color: var(--amber);
}

.related-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
  color: var(--muted-strong);
  font-size: 13px;
}

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

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--muted-strong);
  text-align: center;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: #0f172a;
}

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

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 560px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--amber);
}

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

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

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

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

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

  .category-overview-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-section {
    min-height: 74vh;
  }

  .hero-side-fade {
    background: linear-gradient(to top, var(--bg) 0%, rgba(2, 6, 23, 0.72) 62%, rgba(2, 6, 23, 0.18) 100%);
  }

  .grid-three,
  .grid-four,
  .category-grid,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

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

  .rank-num {
    text-align: left;
  }

  .rank-poster,
  .category-cover {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, var(--shell));
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    font-size: 11px;
  }

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

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .section-block {
    padding: 54px 0;
  }

  .card-body h2 {
    min-height: auto;
  }

  .related-card {
    grid-template-columns: 96px 1fr;
  }
}
