:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #f59e0b;
  --brand-deep: #ea580c;
  --brand-soft: #ffedd5;
  --slate: #1e293b;
  --slate-deep: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-3deg);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(90deg, #fde68a, #fed7aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fcd34d;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.header-search input,
.search-box input,
.local-filter input,
.local-filter select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--ink);
  outline: none;
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-box input:focus,
.local-filter input:focus,
.local-filter select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.icon-button,
.nav-toggle {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.25);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.nav-toggle {
  display: none;
  border-radius: 12px;
  padding: 10px 13px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 16%, rgba(251, 191, 36, 0.26), transparent 28%),
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.18), transparent 30%),
    linear-gradient(110deg, #1e293b 0%, #334155 45%, #78350f 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px);
  background-size: 34px 34px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -25% 45%;
  height: 320px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.20);
  filter: blur(70px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 44px;
  padding: 72px 0 54px;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(253, 230, 138, 0.26);
  font-size: 14px;
}

.hero-title {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.hero-title span {
  background: linear-gradient(90deg, #fde68a, #fed7aa, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 680px;
  color: #e2e8f0;
  font-size: 19px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.30);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stage {
  position: relative;
  min-height: 420px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  min-height: 420px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.hero-poster {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #334155, #78350f);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transform: scale(1.02);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.84));
}

.hero-card {
  position: relative;
  margin: 22px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.hero-card h2 {
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-card p {
  margin: 0 0 18px;
  color: #dbeafe;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

.pill.dark {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 22px;
  bottom: -4px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.active {
  width: 48px;
  background: #f59e0b;
}

.main-section {
  padding: 58px 0;
}

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

.section-title {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-desc {
  margin: 12px 0 0;
  max-width: 720px;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #92400e);
}

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

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.82));
}

.poster-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.30);
  font-weight: 900;
}

.card-body {
  padding: 17px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 850;
}

.card-title a:hover {
  color: var(--brand-deep);
}

.card-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.card-meta {
  color: #64748b;
  font-size: 13px;
}

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

.category-card {
  min-height: 168px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #92400e);
  box-shadow: var(--shadow);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.category-card .arrow {
  position: absolute;
  right: 20px;
  bottom: 16px;
  font-size: 24px;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.24), transparent 30%),
    linear-gradient(110deg, #1e293b, #0f172a 62%, #78350f);
  padding: 68px 0 54px;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.breadcrumb {
  color: #64748b;
  font-size: 14px;
  margin: 24px 0;
}

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

.local-filter {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.detail-card,
.side-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #020617;
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.78));
}

.player-cover[hidden] {
  display: none;
}

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 24px 55px rgba(234, 88, 12, 0.36);
  font-size: 32px;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.detail-meta {
  color: var(--muted);
  margin-bottom: 18px;
}

.detail-content h2,
.side-panel h2 {
  margin: 26px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.detail-content p {
  margin: 0 0 16px;
  color: #334155;
}

.side-panel {
  padding: 20px;
}

.side-cover {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e293b, #92400e);
  aspect-ratio: 2 / 3;
}

.side-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.45);
}

.related-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e293b, #92400e);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-title {
  margin: 0;
  font-weight: 850;
  line-height: 1.35;
}

.related-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
}

.empty-state {
  padding: 34px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  padding: 40px 0;
}

.site-footer strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 14px;
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

@media (max-width: 840px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .site-nav a {
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 50px 0 68px;
  }

  .hero-stage,
  .hero-slide {
    min-height: 430px;
  }

  .section-head {
    display: block;
  }

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

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

  .hero-card {
    margin: 14px;
    padding: 18px;
  }

  .hero-card h2 {
    font-size: 23px;
  }

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

  .search-box {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 22px;
  }
}
