:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-strong: #263449;
  --line: #334155;
  --line-soft: rgba(148, 163, 184, 0.22);
  --text: #ffffff;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #f59e0b;
  --brand-soft: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 34rem),
    radial-gradient(circle at 80% 18%, rgba(59, 130, 246, 0.10), transparent 32rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.26);
}

.logo-text {
  font-size: 22px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  padding: 9px;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 24px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.45);
}

main {
  min-height: 70vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: saturate(1.12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.85));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 24px 92px;
  max-width: 1280px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: var(--muted);
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-button,
.home-search button {
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
}

.ghost-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.54);
  border-color: var(--line-soft);
}

.ghost-button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.primary-button:hover,
.ghost-button:hover,
.home-search button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.content-section,
.search-band,
.detail-layout {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.search-band {
  padding: 42px 0 10px;
}

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

.section-heading.center {
  display: block;
  text-align: center;
}

.section-heading.compact {
  align-items: center;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-heading a {
  color: var(--brand);
  font-weight: 800;
}

.home-search {
  max-width: 720px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.7);
  box-shadow: var(--shadow);
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  outline: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  padding: 0 14px;
}

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.10);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster-frame img,
.category-card:hover img,
.ranking-card:hover img {
  transform: scale(1.08);
}

.year-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  padding: 17px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.card-content h3 {
  display: -webkit-box;
  min-height: 56px;
  margin: 10px 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-content p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 98px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  padding: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto;
  gap: 0 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.6);
}

.rank-item img {
  grid-row: span 2;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  color: var(--text);
  font-weight: 800;
}

.rank-meta {
  color: var(--subtle);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92));
}

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

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.row-card {
  scroll-snap-align: start;
}

.page-hero {
  width: min(1280px, calc(100% - 48px));
  margin: 34px auto 0;
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(37, 99, 235, 0.10)),
    rgba(30, 41, 59, 0.72);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 56px);
}

.category-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.58);
}

.category-overview {
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.category-overview-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.ranking-grid {
  display: grid;
  gap: 14px;
}

.ranking-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.7);
  overflow: hidden;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 64px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-number {
  color: var(--brand);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-card img {
  width: 150px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ranking-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.ranking-card span:last-child {
  color: var(--subtle);
  font-size: 13px;
}

.detail-layout {
  padding-top: 28px;
}

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

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

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 26px;
  align-items: start;
}

.player-card,
.detail-info {
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.35), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.player-start span {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.32);
  font-size: 28px;
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-info {
  padding: 26px;
}

.detail-info h1 {
  margin-top: 8px;
}

.detail-one-line {
  margin: 18px 0;
  color: var(--muted);
  font-size: 17px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--brand);
  background: rgba(245, 158, 11, 0.11);
}

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

.detail-block {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.detail-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-block p {
  margin: 0;
  color: var(--muted);
}

.related-section {
  padding-top: 44px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.95);
}

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

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

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--muted);
}

.copyright {
  margin: 0;
  padding: 0 0 28px;
  color: var(--subtle);
  text-align: center;
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .split-section,
  .detail-main {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

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

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding: 0 20px 78px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .search-band,
  .detail-layout,
  .page-hero,
  .footer-inner {
    width: min(100% - 28px, 1280px);
  }

  .home-search,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.three-col,
  .movie-grid.four-sample {
    grid-template-columns: 1fr;
  }

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

  .category-hero,
  .category-overview-head,
  .footer-inner {
    display: block;
  }

  .ranking-card a {
    grid-template-columns: 48px 92px 1fr;
    gap: 12px;
  }

  .ranking-card img {
    width: 92px;
    height: 70px;
  }

  .ranking-card p {
    display: none;
  }

  .footer-links {
    margin-top: 18px;
    flex-wrap: wrap;
  }
}

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

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button,
  .home-search button {
    width: 100%;
  }
}
