:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --brand-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.13), transparent 26rem),
    radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.08), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #fff;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

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

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--brand-soft);
  color: #fff;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  cursor: pointer;
}

.header-search {
  position: relative;
  width: min(260px, 26vw);
}

.site-search-input,
.filter-keyword,
.site-filter {
  width: 100%;
  border: 1px solid var(--border);
  outline: none;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
}

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

.site-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 88vw);
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}

.site-search-results.is-open {
  display: block;
}

.search-result-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  color: var(--muted-strong);
}

.search-result-item:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #fff;
}

.search-result-item img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.search-result-item strong {
  display: block;
  color: #fff;
  margin-bottom: 2px;
}

.search-result-item span {
  display: block;
  font-size: 13px;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
}

.hero-backdrop img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-bg span {
  position: absolute;
  inset: 0;
}

.shade-bottom,
.detail-bg span {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.92) 24%, rgba(2, 6, 23, 0.2) 100%);
}

.shade-side {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 72px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
}

.hero-copy h1,
.page-hero-card h1,
.detail-title-wrap h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero-card p,
.detail-title-wrap p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 21px);
  margin: 0 0 24px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted-strong);
  margin-bottom: 18px;
}

.hero-pill,
.detail-meta a {
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

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

.primary-btn {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.26);
}

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

.primary-btn:hover {
  background: var(--brand-dark);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.36);
}

.ghost-btn {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.64);
  color: #fff;
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--brand);
}

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

.no-top {
  padding-top: 28px;
}

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

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

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

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

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.72));
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.9));
}

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

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

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

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

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

.movie-card h2 a:hover {
  color: #fde68a;
}

.movie-card p {
  min-height: 46px;
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.58);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 9px;
  background: rgba(15, 23, 42, 0.62);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(245, 158, 11, 0.32);
  transform: translateX(3px);
}

.rank-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.mini-rank {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: #fbbf24;
  font-weight: 900;
}

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

.rank-row-text strong {
  line-height: 1.35;
}

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

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

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

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

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

.category-tile-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.4));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0 20px;
}

.category-tile strong {
  margin-top: 118px;
  font-size: 24px;
}

.category-tile em {
  color: var(--muted-strong);
  font-style: normal;
  font-size: 14px;
  padding-bottom: 20px;
}

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

.page-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
  padding: clamp(28px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.page-hero-card h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-selects {
  display: flex;
  gap: 14px;
}

.site-filter {
  min-width: 160px;
  border-radius: 16px;
}

.empty-state {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
}

.detail-main {
  padding-bottom: 80px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 90px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: #fde68a;
}

.detail-title-wrap {
  max-width: 860px;
}

.detail-title-wrap h1 {
  font-size: clamp(38px, 7vw, 72px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  margin-top: -72px;
  position: relative;
  z-index: 4;
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
}

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.76));
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.36);
  font-size: 34px;
  padding-left: 5px;
}

.detail-side {
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
}

.detail-side-info {
  padding: 18px;
}

.detail-side-info strong,
.detail-side-info span {
  display: block;
}

.detail-side-info span {
  color: var(--muted);
  margin-top: 4px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 46px;
}

.detail-copy,
.detail-facts {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.64);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.detail-copy h2,
.detail-facts h2,
.site-footer h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-copy p {
  color: var(--muted-strong);
  margin: 0 0 26px;
  font-size: 17px;
}

.detail-facts dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.detail-facts dt {
  color: var(--muted);
}

.detail-facts dd {
  margin: 0;
  color: #fff;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.86);
  padding: 54px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 40px;
}

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

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

.footer-links a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.5);
}

.footer-bottom {
  margin-top: 30px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

  .rank-panel {
    position: static;
  }

  .detail-side {
    display: none;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    border-radius: 14px;
  }

  .header-search {
    width: min(240px, 42vw);
  }

  .hero-slider,
  .hero-content {
    min-height: 76vh;
  }

  .hero-copy h1,
  .page-hero-card h1,
  .detail-title-wrap h1 {
    letter-spacing: -0.04em;
  }

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

  .filter-selects {
    flex-direction: column;
  }
}

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

  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .header-search {
    order: 5;
    width: 100%;
  }

  .site-nav {
    top: 116px;
  }

  .hero-slider,
  .hero-content {
    min-height: 82vh;
  }

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

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

  .section-block {
    padding-top: 48px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card h2 {
    font-size: 16px;
  }

  .movie-card p {
    min-height: 42px;
    font-size: 13px;
  }

  .category-tile {
    min-height: 180px;
  }

  .category-tile strong {
    margin-top: 94px;
    font-size: 20px;
  }

  .detail-hero,
  .detail-hero-inner {
    min-height: 500px;
  }

  .detail-layout {
    margin-top: -40px;
  }

  .movie-player {
    border-radius: 20px;
  }

  .play-circle {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
