:root {
  color-scheme: light;
  --bg: #fafaf9;
  --paper: #ffffff;
  --paper-soft: #fffbeb;
  --ink: #1c1917;
  --muted: #78716c;
  --line: rgba(120, 113, 108, 0.18);
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(41, 37, 36, 0.12);
  --radius: 24px;
  --radius-small: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 38rem),
    linear-gradient(180deg, #fffbeb 0, #fafaf9 34rem, #f5f5f4 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(250, 250, 249, 0.82);
  backdrop-filter: blur(20px);
}

.nav-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--brand-dark);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #78350f);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

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

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #44403c;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.header-search input {
  width: min(220px, 28vw);
  border: 0;
  outline: 0;
  background: transparent;
  padding: 6px 4px 6px 10px;
}

.header-search button,
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(146, 64, 14, 0.28);
}

.btn.secondary {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(146, 64, 14, 0.16);
}

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

.hero {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 0;
  overflow: hidden;
  border-radius: 36px;
  min-height: clamp(560px, 72vh, 720px);
  background: #1c1917;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-track {
  min-height: inherit;
  display: flex;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hero-slide {
  flex: 0 0 100%;
  position: relative;
  min-height: inherit;
  display: grid;
  align-items: center;
  padding: clamp(30px, 6vw, 72px);
  background-image:
    radial-gradient(circle at 84% 18%, rgba(245, 158, 11, 0.34), transparent 24rem),
    linear-gradient(90deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.78) 42%, rgba(28, 25, 23, 0.38) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 690px;
  color: #fff7ed;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero p {
  margin: 0 0 22px;
  max-width: 58ch;
  color: rgba(255, 251, 235, 0.82);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(120, 113, 108, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  color: #57534e;
  background: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.hero .pill {
  border-color: rgba(252, 211, 77, 0.28);
  color: #fde68a;
  background: rgba(0, 0, 0, 0.24);
}

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

.hero-dots {
  position: absolute;
  left: clamp(30px, 6vw, 72px);
  bottom: 30px;
  display: flex;
  gap: 9px;
  z-index: 3;
}

.hero-dot {
  width: 38px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #f59e0b;
}

.hero-side-panel {
  position: absolute;
  right: clamp(18px, 4vw, 52px);
  bottom: clamp(22px, 5vw, 60px);
  width: min(360px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  color: #fff7ed;
  background: rgba(28, 25, 23, 0.48);
  backdrop-filter: blur(18px);
  z-index: 2;
}

.hero-side-panel strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.hero-mini-list {
  display: grid;
  gap: 10px;
}

.hero-mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.hero-mini-list a:hover {
  background: rgba(245, 158, 11, 0.22);
}

.page-hero {
  padding: 54px 0 24px;
}

.page-hero h1,
.section-title h2 {
  margin: 10px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p,
.section-title p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.section {
  padding: 44px 0;
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(120, 113, 108, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(41, 37, 36, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 26px 70px rgba(41, 37, 36, 0.14);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.62), transparent 38%),
    linear-gradient(145deg, #78350f, #292524);
}

.poster::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 251, 235, 0.72);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.04em;
}

.poster img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster img.is-hidden {
  opacity: 0;
}

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

.card-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff7ed;
  font-size: 12px;
  font-weight: 900;
  background: rgba(28, 25, 23, 0.74);
  backdrop-filter: blur(10px);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

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

.card-meta {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

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

.category-tile,
.info-panel,
.filter-panel,
.pagination a,
.related-box,
.movie-prose,
.player-section,
.rank-row {
  border: 1px solid rgba(120, 113, 108, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 52px rgba(41, 37, 36, 0.08);
}

.category-tile {
  padding: 22px;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  background: #fff7ed;
}

.category-tile h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
}

.category-count {
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 900;
}

.filter-panel {
  margin: 18px 0 24px;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-panel input,
.filter-panel select {
  min-height: 42px;
  border: 1px solid rgba(120, 113, 108, 0.2);
  border-radius: 999px;
  background: #fff;
  padding: 0 14px;
  outline: none;
}

.filter-panel input {
  flex: 1 1 260px;
}

.result-count {
  color: var(--muted);
  font-weight: 800;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.pagination a {
  padding: 9px 13px;
  color: var(--brand-dark);
  font-weight: 900;
}

.pagination a.is-current {
  color: #fff;
  background: var(--brand);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.player-section {
  overflow: hidden;
  background: #1c1917;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.34), transparent 28rem),
    #0c0a09;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #0c0a09;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff7ed;
  background:
    linear-gradient(180deg, rgba(12, 10, 9, 0.18), rgba(12, 10, 9, 0.76)),
    var(--player-cover);
  background-size: cover;
  background-position: center;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #7c2d12);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
  font-size: 36px;
}

.player-caption {
  padding: 16px 18px 18px;
  color: rgba(255, 251, 235, 0.78);
}

.movie-prose,
.info-panel,
.related-box {
  padding: 22px;
}

.movie-prose h2,
.related-box h2,
.info-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.movie-prose p,
.info-panel p {
  margin: 0 0 14px;
  color: #57534e;
}

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

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

.detail-meta {
  margin: 16px 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #78350f);
  font-weight: 1000;
}

.rank-row h3 {
  margin: 0;
  font-size: 20px;
}

.rank-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.footer {
  margin-top: 54px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

.footer a {
  color: var(--brand-dark);
  font-weight: 800;
}

.hidden-by-filter {
  display: none !important;
}

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

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

@media (max-width: 820px) {
  .nav-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    margin-left: 0;
  }

  .header-search input {
    width: 100%;
  }

  .hero {
    min-height: 640px;
    border-radius: 28px;
  }

  .hero-slide {
    align-items: start;
    padding-bottom: 220px;
  }

  .hero-side-panel {
    left: 18px;
    right: 18px;
    bottom: 70px;
    width: auto;
  }

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

  .section-title {
    display: block;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row .btn {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
  }
}
