:root {
  --color-bg: #0f172a;
  --color-bg-soft: #111827;
  --color-panel: #ffffff;
  --color-panel-dark: #1e293b;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-muted-dark: #cbd5e1;
  --color-line: #e2e8f0;
  --color-accent: #f59e0b;
  --color-accent-dark: #d97706;
  --radius-small: 10px;
  --radius: 16px;
  --radius-large: 26px;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.26);
  --container: 1280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  background: #f8fafc;
  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: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.38);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: #e2e8f0;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.hero-carousel {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(245, 158, 11, 0.20), transparent 35%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 52%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  bottom: clamp(56px, 9vw, 118px);
  width: min(680px, calc(100vw - 48px));
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #111827;
  background: rgba(245, 158, 11, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #dbe4ef;
  font-size: 17px;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.70);
  font-size: 12px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.34);
}

.button-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.hero-panel {
  position: absolute;
  right: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  top: 50%;
  z-index: 3;
  width: min(350px, calc(100vw - 48px));
  max-height: calc(100% - 120px);
  padding: 18px;
  overflow: auto;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-large);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-strong);
}

.hero-panel-title {
  margin-bottom: 12px;
  color: #fbbf24;
  font-weight: 900;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 15px;
  color: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translateX(4px);
}

.rank-number {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 900;
}

.rank-item img {
  width: 52px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

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

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

.rank-text em {
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

.search-strip {
  padding: 0 24px;
  margin-top: -36px;
  position: relative;
  z-index: 6;
}

.search-box {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-box label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.search-box div,
.local-filter,
.advanced-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

.search-box input,
.local-filter input,
.advanced-filter input,
.local-filter select,
.advanced-filter select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0 16px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.search-box button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: var(--color-accent);
  font-weight: 900;
}

.content-section {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 58px 24px;
}

.section-dark {
  width: 100%;
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  padding-right: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.section-header h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
}

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

.section-dark .section-header p {
  color: #cbd5e1;
}

.section-action,
.text-link {
  color: var(--color-accent-dark);
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  padding: 18px;
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 38%),
    linear-gradient(135deg, #0f172a, #334155);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.category-tile span,
.category-tile em {
  display: block;
  color: #fbbf24;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin: 10px 0 24px;
  font-size: 22px;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.50);
  box-shadow: var(--shadow-soft);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

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

.card-meta a {
  color: var(--color-accent-dark);
  font-weight: 800;
}

.card-heat {
  color: #dc2626;
  font-weight: 800;
}

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

.card-body h3 a:hover {
  color: var(--color-accent-dark);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
}

.card-tags span {
  color: #475569;
  background: #f1f5f9;
}

.movie-card-overlay {
  position: relative;
  border: 0;
  color: #ffffff;
  background: #111827;
}

.movie-card-overlay .card-cover {
  aspect-ratio: 16 / 10;
}

.movie-card-overlay .card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.05));
}

.movie-card-overlay .card-meta,
.movie-card-overlay .card-body p,
.movie-card-overlay .card-tags span {
  color: #e2e8f0;
}

.movie-card-overlay .card-tags span {
  background: rgba(255, 255, 255, 0.12);
}

.horizontal-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 380px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 130px 1fr;
}

.movie-card-horizontal .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 88px max(24px, calc((100vw - var(--container)) / 2 + 24px)) 52px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.24), transparent 38%),
    linear-gradient(135deg, #020617, #1e293b 58%, #0f172a);
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

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

.side-panel {
  position: sticky;
  top: 88px;
  padding: 18px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: var(--shadow-soft);
}

.side-panel h2 {
  margin: 0 0 12px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.category-overview-card span {
  color: var(--color-accent-dark);
  font-weight: 900;
}

.category-overview-card h2 {
  margin: 8px 0;
}

.category-overview-card p {
  color: var(--color-muted);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 96px 60px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.rank-row-cover img {
  width: 96px;
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

.rank-row-index {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 20px;
  font-weight: 950;
}

.rank-row-content h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.rank-row-content p {
  margin: 0 0 12px;
  color: #475569;
}

.rank-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 14px;
}

.rank-row-meta strong {
  color: #dc2626;
}

.detail-main {
  background:
    linear-gradient(180deg, #0f172a 0, #0f172a 340px, #f8fafc 340px, #f8fafc 100%);
}

.breadcrumb {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-hero {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 36px 24px 50px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  color: #ffffff;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  object-fit: cover;
  background: #111827;
  box-shadow: var(--shadow-strong);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
  max-width: 780px;
  color: #dbe4ef;
  font-size: 18px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
}

.detail-meta dt {
  color: #cbd5e1;
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 12px 24px 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow-strong);
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.96);
  font-weight: 900;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  font-size: 18px;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 2px 10px #000000;
}

.detail-content-grid {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.prose-card {
  padding: 24px;
  border: 1px solid var(--color-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.prose-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.prose-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.empty-state {
  padding: 26px;
  text-align: center;
  color: #64748b;
}

.site-footer {
  padding: 44px 24px 26px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
}

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

.footer-links a:hover {
  color: #fbbf24;
}

.copyright {
  width: min(100%, var(--container));
  margin: 26px auto 0;
  color: #64748b;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero-panel {
    display: none;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 12px;
  }

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

  .hero-carousel {
    height: 76vh;
  }

  .hero-content {
    bottom: 74px;
  }

  .search-box div,
  .local-filter,
  .advanced-filter {
    grid-template-columns: 1fr;
  }

  .section-header,
  .footer-inner {
    display: block;
  }

  .section-action {
    display: inline-block;
    margin-top: 12px;
  }

  .category-grid,
  .movie-grid,
  .movie-grid-overlay,
  .category-overview-grid,
  .detail-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-row {
    grid-template-columns: 78px 44px 1fr;
    gap: 12px;
  }

  .rank-row-cover img {
    width: 78px;
    height: 104px;
  }

  .rank-row-index {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .player-section,
  .detail-content-grid,
  .detail-hero,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .category-grid,
  .movie-grid,
  .movie-grid-overlay,
  .category-overview-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-scroller {
    grid-auto-columns: minmax(280px, 88vw);
  }

  .movie-card-horizontal {
    grid-template-columns: 112px 1fr;
  }

  .rank-row {
    grid-template-columns: 72px 1fr;
  }

  .rank-row-index {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  .rank-row-content {
    grid-column: 2;
  }
}
