:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.34);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.header-search,
.mobile-search,
.hero-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-page-form input,
.local-filter input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  padding: 12px 14px;
}

.header-search input {
  width: 210px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button,
.primary-button,
.ghost-button,
.section-more,
.text-link {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button,
.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.ghost-button,
.section-more,
.text-link {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 0;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-copy {
  width: min(680px, calc(100% - 40px));
  margin-left: clamp(24px, 7vw, 82px);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-heading h1 {
  margin: 14px 0;
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  font-size: clamp(42px, 7vw, 82px);
}

.hero-copy p,
.page-hero p,
.detail-heading p {
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.10);
  font-size: 12px;
  font-weight: 800;
}

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

.hero-panel {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

.hero-search {
  flex: 1;
}

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

.hero-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 32px;
  background: #fbbf24;
}

.content-section,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto;
}

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

.section-head h2,
.panel-title h2,
.rank-section h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-head p,
.footer-inner p,
.category-card-large p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.20);
  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.38);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.90));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #111827;
  background: #fbbf24;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.mini-row:hover strong,
.category-card-large a:hover {
  color: #fbbf24;
}

.card-line {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 13px;
}

.card-meta a {
  color: #fbbf24;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.detail-article,
.category-card-large,
.rank-section {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
  padding: 20px;
  position: sticky;
  top: 92px;
}

.panel-title a {
  color: #fbbf24;
  font-weight: 800;
}

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

.mini-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

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

.mini-row strong,
.mini-row em {
  display: block;
}

.mini-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #111827;
}

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

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.62;
}

.category-tile span {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 2;
}

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

.category-tile strong {
  font-size: 22px;
  font-weight: 950;
}

.category-tile em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.55;
}

.page-hero {
  padding: clamp(38px, 7vw, 72px);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 42%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 64px);
}

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

.breadcrumb a {
  color: #fbbf24;
}

.local-filter {
  max-width: 620px;
  margin-top: 24px;
}

.category-list-large {
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

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

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

.category-card-large h2 {
  margin: 0;
  font-size: 26px;
}

.category-card-large ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 14px 0 18px;
  list-style: none;
}

.category-card-large li a {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
}

.rank-section {
  padding: 22px;
  margin-top: 26px;
}

.rank-card-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 30px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border: 0;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.30), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at center, rgba(245, 158, 11, 0.20), transparent 46%);
}

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

.play-large {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.34);
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 950;
}

.player-cover em {
  max-width: 720px;
  color: #cbd5e1;
  line-height: 1.7;
  font-style: normal;
}

.detail-heading {
  padding: 26px 4px 0;
}

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

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

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 32px;
}

.detail-article {
  padding: clamp(22px, 4vw, 34px);
}

.detail-article p {
  color: var(--muted-strong);
  line-height: 2;
  font-size: 17px;
}

.related-grid-section {
  width: 100%;
  margin-top: 36px;
}

.search-page-form {
  max-width: 760px;
  margin-top: 24px;
}

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.10);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero-panel,
  .split-layout,
  .player-layout,
  .detail-content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: grid;
  }

  .hero-links,
  .hero-dots {
    flex-wrap: wrap;
  }

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-copy {
    margin: 34px 20px auto;
    align-self: start;
  }

  .hero-panel {
    right: 14px;
    bottom: 14px;
    left: 14px;
    padding: 12px;
  }

  .hero-search,
  .search-page-form,
  .mobile-search {
    display: grid;
  }

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

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

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

  .detail-side {
    max-width: 340px;
  }
}

@media (max-width: 460px) {
  .header-inner,
  .content-section,
  .page-shell,
  .footer-inner,
  .footer-bottom,
  .hero-carousel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy h1 {
    font-size: 36px;
  }

  .movie-grid,
  .compact-grid,
  .rank-card-list,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
