:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(251, 191, 36, 0.24);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #fbbf24;
  --orange: #f97316;
  --blue: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.14), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.12), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.25));
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.26);
}

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

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

.brand-text,
.footer-brand span:last-child {
  font-size: 22px;
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.12);
  transition: transform 0.45s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: rotate(180deg);
}

.brand-spark {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

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

.nav-links a {
  padding: 9px 14px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  height: 76vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 1s ease;
}

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.18) 55%, rgba(2, 6, 23, 0.78)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 360px);
  align-items: center;
  gap: 52px;
  padding-top: 68px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.9;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 20px;
}

.hero-meta span,
.detail-meta span,
.detail-meta strong {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
}

.detail-meta strong {
  color: var(--amber);
}

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

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 45px rgba(249, 115, 22, 0.24);
}

.btn-ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  transition: transform 0.35s ease;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.16), rgba(56, 189, 248, 0.12));
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.03);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

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

.category-strip,
.search-band,
.content-section,
.rank-preview,
.detail-content,
.player-section,
.rank-page-list {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -52px;
  position: relative;
  z-index: 8;
}

.category-tile {
  min-height: 118px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

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

.category-tile strong {
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.6;
}

.search-band {
  margin-top: 42px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2,
.player-section h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.search-band h2,
.section-heading h2,
.detail-content h2,
.player-section h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-box {
  width: min(440px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid var(--line);
}

.search-box span {
  color: var(--amber);
  font-weight: 900;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.search-box input::placeholder {
  color: #64748b;
}

.content-section,
.rank-preview,
.detail-content,
.player-section,
.rank-page-list {
  margin-top: 62px;
}

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

.section-heading p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.24);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--card-strong);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(56, 189, 248, 0.08));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 8px;
  font-size: 12px;
}

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

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

.card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.small-card .card-body p {
  min-height: auto;
}

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

.rank-item,
.rank-row {
  display: grid;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item {
  grid-template-columns: 48px 1fr auto auto;
  padding: 14px 16px;
  border-radius: 18px;
}

.rank-item:hover,
.rank-row:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.rank-num {
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.rank-item strong,
.rank-score {
  color: var(--amber);
  font-weight: 900;
}

.page-shell {
  padding: 118px 0 40px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px;
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.52)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.2), transparent 35%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 66px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted-strong);
  line-height: 1.9;
}

.inner-search {
  margin-top: 30px;
}

.flush-section {
  margin-top: 28px;
}

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

.rank-row {
  grid-template-columns: 58px 68px minmax(0, 1fr) auto 70px;
  padding: 10px 14px;
  border-radius: 18px;
}

.rank-cover img {
  width: 56px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-main strong,
.rank-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.detail-page {
  padding-bottom: 40px;
}

.detail-hero {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 88px;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.14), rgba(56, 189, 248, 0.1));
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 16px;
}

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

.detail-copy h1 {
  max-width: 850px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.08;
}

.detail-meta {
  margin: 20px 0;
}

.detail-copy p {
  max-width: 820px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.9;
}

.detail-tags {
  margin-top: 18px;
}

.slim-heading {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 18px 60px rgba(249, 115, 22, 0.3);
  font-size: 32px;
}

.player-overlay strong {
  max-width: min(720px, 90%);
  font-size: clamp(22px, 4vw, 42px);
  text-align: center;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-content article {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.detail-content p {
  color: var(--muted-strong);
  line-height: 2;
}

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

.site-footer {
  margin-top: 74px;
  padding: 42px 0 26px;
  background: rgba(15, 23, 42, 0.82);
  border-top: 1px solid var(--line);
}

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

.footer-grid p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 10px 0;
  color: var(--muted);
}

.footer-grid a:not(.footer-brand):hover {
  color: var(--amber);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.searchable-card.is-hidden {
  display: none;
}

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

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

  .hero-inner {
    grid-template-columns: 1fr 260px;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    height: 62px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 12px 14px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: 700px;
    height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 108px;
    padding-bottom: 82px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .detail-copy h1 {
    font-size: 40px;
  }

  .hero-copy p,
  .detail-copy p {
    font-size: 16px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: start;
  }

  .category-strip,
  .movie-grid,
  .large-grid,
  .related-grid,
  .rank-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-strip {
    margin-top: 28px;
  }

  .search-band,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    padding: 30px 22px;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    padding-top: 104px;
    padding-bottom: 48px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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

  .hide-sm {
    display: none;
  }

  .rank-cover img {
    width: 48px;
  }
}
