:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  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.17), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

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

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

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

.desktop-nav,
.mobile-nav,
.footer-links,
.hero-actions,
.category-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link-active {
  color: white;
  background: rgba(245, 158, 11, 0.16);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

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

.mobile-nav.open {
  display: flex;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

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

.hero-bg::after,
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-bg::after {
  background: linear-gradient(to top, #020617 2%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.18));
}

.hero-bg::before {
  z-index: 1;
  background: linear-gradient(to right, #020617 0%, rgba(2, 6, 23, 0.84) 36%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 72vh;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 78px 0 96px;
}

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

.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.12);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 20px;
}

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

.button-primary,
.button-ghost,
.category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.25);
}

.button-ghost,
.category-button {
  border: 1px solid var(--border);
  color: white;
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-card {
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

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

.hero-card-body {
  padding: 22px;
}

.hero-card-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.hero-card-body p {
  margin: 0;
  color: var(--soft);
  font-size: 14px;
}

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

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

.hero-dot.is-active {
  background: var(--accent);
}

.hero-panel {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  margin: -72px auto 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.hero-search,
.hot-entry {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search {
  display: flex;
  gap: 12px;
}

.quick-search input {
  flex: 1;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: white;
  background: rgba(2, 6, 23, 0.7);
  padding: 0 16px;
  outline: none;
}

.quick-search button,
.filter-panel select,
.filter-panel input {
  border: 1px solid var(--border);
  color: white;
  background: rgba(2, 6, 23, 0.72);
}

.quick-search button {
  min-width: 96px;
  border-radius: 16px;
  cursor: pointer;
}

.hot-entry h2,
.hero-search h2 {
  margin: 0 0 10px;
}

.hot-entry p,
.hero-search p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.section-block {
  margin: 58px auto;
}

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

.section-heading h2 {
  margin: 0 0 7px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  color: #fed7aa;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(15, 23, 42, 0.96);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111827;
  transition: transform 0.35s ease;
}

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

.score-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.score-badge {
  right: 12px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-line a {
  color: #fed7aa;
}

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

.movie-card p {
  margin: 0;
  color: var(--soft);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags,
.category-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span,
.category-mini {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.38);
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 13rem),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--soft);
}

.page-hero,
.detail-hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 50px;
}

.page-hero p {
  max-width: 820px;
  color: var(--soft);
  font-size: 18px;
}

.filter-panel {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.78);
  margin-bottom: 24px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  height: 48px;
  border-radius: 14px;
  padding: 0 13px;
  outline: none;
}

.filter-empty {
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.78);
  padding: 18px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ranking-list {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  overflow: hidden;
}

.ranking-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.ranking-extra {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 56px 0;
  align-items: end;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
  color: #fed7aa;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.detail-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--soft);
  margin-bottom: 18px;
}

.detail-info span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.36);
  padding: 7px 11px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
}

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

.play-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 42px rgba(249, 115, 22, 0.32);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.content-card,
.side-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.8);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 16px;
}

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

.related-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
  padding: 10px;
}

.related-link img {
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.related-link strong {
  display: block;
  line-height: 1.3;
}

.related-link span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

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

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

  .hero-content,
  .detail-layout,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

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

  .detail-hero-inner {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

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

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

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    display: flex;
    padding-top: 70px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

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

  .hero-panel {
    margin-top: -36px;
  }

  .quick-search {
    flex-direction: column;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 44px 1fr;
  }

  .ranking-extra {
    grid-column: 2;
  }

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

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

@media (max-width: 460px) {
  .site-header-inner,
  .container,
  .page-hero-inner,
  .detail-hero-inner,
  .hero-content,
  .hero-panel,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-actions,
  .category-actions,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

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