:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: #0f172a;
  --panel-soft: #111827;
  --panel-line: #1e293b;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow-strong: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.28);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.11), transparent 26rem),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.11), transparent 30rem),
    var(--page-bg);
}

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

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(100% - 32px, var(--container));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 60%, #d97706);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.42);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  color: white;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent);
}

.mobile-menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.86);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  border-radius: 99px;
}

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

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-link.active {
  background: var(--accent-soft);
}

.home-main,
.page-main,
.detail-main {
  padding-top: 68px;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-layer-left {
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 38%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-layer-bottom {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(24px, calc((100vw - var(--container)) / 2));
  width: min(620px, calc(100% - 48px));
  transform: translateY(-46%);
}

.section-kicker,
.hero-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
  color: var(--text-soft);
  font-size: 14px;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.hero-desc {
  max-width: 58ch;
  margin: 0 0 22px;
  color: #dbe4f0;
  font-size: 18px;
  line-height: 1.75;
}

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

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

.primary-btn,
.ghost-btn,
.search-panel button,
.ranking-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-btn,
.search-panel button,
.ranking-action {
  color: white;
  background: var(--accent);
  box-shadow: 0 14px 38px rgba(245, 158, 11, 0.28);
}

.primary-btn:hover,
.search-panel button:hover,
.ranking-action:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.ghost-btn {
  color: #f8fafc;
  border-color: rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.66);
}

.ghost-btn:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section,
.page-hero,
.breadcrumb,
.movie-detail-panel,
.player-section,
.ranking-list,
.category-overview-list {
  width: min(100% - 32px, var(--container));
  margin-left: auto;
  margin-right: auto;
}

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

.intro-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: end;
}

.intro-search h2,
.section-heading h2,
.rank-panel h2,
.detail-text h2,
.category-overview-head h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.intro-search p,
.page-hero p,
.category-overview-card p,
.detail-text p {
  color: var(--text-soft);
  line-height: 1.85;
}

.search-panel,
.large-search,
.filter-box {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.large-search input,
.filter-box input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.large-search,
.filter-box {
  margin-top: 28px;
  flex-direction: column;
}

.large-search span,
.filter-box span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.large-search input,
.filter-box input {
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.55);
}

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

.section-heading a,
.category-overview-head a {
  color: var(--accent);
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
}

.poster-card {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

.poster-card img,
.compact-card img,
.ranking-cover img,
.detail-poster img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-card img {
  transition: transform 0.32s ease, filter 0.32s ease;
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 44%);
  opacity: 0.72;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.region-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card:hover .poster-card img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 12px 2px 0;
}

.movie-card h2 {
  margin: 0 0 6px;
  color: white;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--accent);
}

.movie-meta,
.movie-card-desc,
.movie-card-tags {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-card-desc {
  display: -webkit-box;
  min-height: 40px;
  margin-top: 5px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-tags {
  color: #d6a449;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow-soft);
}

.rank-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rank-panel li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.36);
}

.rank-panel li a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.rank-number {
  grid-row: span 2;
  color: var(--accent);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  color: white;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow-soft);
}

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.category-tile:hover,
.category-overview-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
}

.category-tile strong {
  color: white;
  font-size: 20px;
}

.category-tile span,
.category-tile em {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  font-style: normal;
}

.category-tile em {
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.category-tile em a {
  overflow: hidden;
  color: var(--text-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  margin-top: 42px;
  padding: 56px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.88));
  box-shadow: var(--shadow-strong);
}

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

.page-hero p {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 17px;
}

.category-pills {
  margin-top: 26px;
}

.category-pills a {
  padding: 9px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(2, 6, 23, 0.34);
}

.category-pills a:hover {
  color: white;
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(245, 158, 11, 0.12);
}

.category-overview-list {
  display: grid;
  gap: 24px;
  padding-top: 44px;
}

.category-overview-card {
  padding: 28px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.compact-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
}

.compact-card:hover {
  background: rgba(245, 158, 11, 0.12);
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card strong {
  color: white;
}

.compact-card em {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.page-tools {
  padding-top: 34px;
}

.ranking-list {
  display: grid;
  gap: 16px;
  padding-top: 42px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 96px;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.84);
}

.ranking-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.ranking-cover span {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ranking-info h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--text-muted);
  line-height: 1.65;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 30px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.player-section {
  padding-top: 24px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: black;
  box-shadow: var(--shadow-strong);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
}

.player-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.2), transparent 20rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.08));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  box-shadow: 0 0 0 14px rgba(245, 158, 11, 0.14), 0 18px 48px rgba(0, 0, 0, 0.5);
  font-size: 30px;
  transform: translate(-50%, -50%);
}

.player-cover:hover .player-button {
  background: var(--accent-hover);
}

.movie-detail-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  padding: 42px 0 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
}

.detail-copy {
  align-self: center;
}

.detail-copy h1 {
  font-size: clamp(32px, 4.8vw, 56px);
}

.detail-one-line {
  max-width: 800px;
  color: #dbe4f0;
  font-size: 18px;
  line-height: 1.85;
}

.detail-text {
  padding-top: 46px;
}

.detail-text h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 28px;
}

.detail-text p {
  margin-bottom: 28px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 1fr 1fr;
  gap: 30px;
  padding: 44px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-column h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 18px;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-column a {
  color: var(--text-muted);
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-copy {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

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

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

  .split-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

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

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

  .hero-carousel {
    min-height: 78vh;
  }

  .hero-content {
    top: auto;
    bottom: 92px;
    left: 20px;
    width: calc(100% - 40px);
    transform: none;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero-desc,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-search,
  .footer-inner,
  .movie-detail-panel,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .six-grid,
  .four-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-action {
    width: 100%;
  }

  .movie-detail-panel {
    gap: 24px;
  }

  .detail-poster {
    max-width: 220px;
  }
}

@media (max-width: 460px) {
  .six-grid,
  .four-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

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