:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-2: #0b1120;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --orange: #f97316;
  --amber: #f59e0b;
  --white: #ffffff;
  --dark-text: #111827;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #f8fafc;
  color: var(--dark-text);
  line-height: 1.65;
}

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: 50;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.32);
}

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

.logo-text small {
  color: var(--dim);
  font-size: 12px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 650;
}

.nav-links a {
  color: #e2e8f0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fdba74;
}

.header-search {
  position: relative;
  flex: 0 1 320px;
}

.header-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: #1e293b;
  color: #fff;
  padding: 10px 42px 10px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
  border-color: rgba(249, 115, 22, 0.9);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.header-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #1e293b;
  color: #fff;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel .nav-links,
.mobile-panel .header-search {
  display: flex;
  margin: 14px 0 0;
}

.mobile-panel .nav-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(249, 115, 22, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.86) 36%, rgba(15, 23, 42, 0.28) 72%, rgba(15, 23, 42, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 680px;
  padding: 96px 20px 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 42px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  border: 1px solid rgba(251, 146, 60, 0.45);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 6px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-title {
  margin: 14px 0 18px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 720px;
  color: #e2e8f0;
  font-size: 18px;
  margin: 0 0 26px;
}

.hero-meta,
.card-meta,
.movie-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--dim);
  font-size: 14px;
}

.hero-meta span,
.detail-meta span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  padding: 6px 12px;
}

.hero-actions,
.section-actions,
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.35);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.56);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.hero-poster-title {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 20px;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 20px 72px;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #111827 60%, #1e293b);
  padding: 54px 0;
}

.page-hero .page-shell {
  padding-top: 0;
  padding-bottom: 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

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

.section {
  margin-bottom: 54px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-title .spark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.section-note {
  margin: 8px 0 0;
  color: #64748b;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.16);
  border-color: rgba(249, 115, 22, 0.3);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.rating-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

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

.movie-card h3 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 850;
}

.movie-card h3 a:hover {
  color: var(--orange);
}

.movie-card p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 16%, rgba(251, 146, 60, 0.5), transparent 35%),
    linear-gradient(145deg, #111827, #1e293b);
  padding: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -50px;
  bottom: -50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 850;
}

.category-card p,
.category-card ul {
  position: relative;
  z-index: 2;
}

.category-card p {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
}

.category-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
  color: #fed7aa;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 88px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.rank-no {
  font-size: 24px;
  font-weight: 900;
  color: var(--orange);
}

.rank-cover img {
  width: 88px;
  height: 116px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.rank-info h3 a:hover {
  color: var(--orange);
}

.rank-info p {
  margin: 0;
  color: #64748b;
}

.rank-score {
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  padding: 8px 14px;
  font-weight: 850;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

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

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

.detail-main,
.detail-side {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.detail-main {
  overflow: hidden;
}

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

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.52));
  cursor: pointer;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(249, 115, 22, 0.42);
  cursor: pointer;
}

.detail-body {
  padding: 26px;
}

.detail-body h1 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.detail-body h2,
.detail-side h2 {
  margin: 26px 0 10px;
  color: #0f172a;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.detail-body p {
  color: #475569;
  margin: 0 0 14px;
}

.detail-side {
  padding: 20px;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 16px;
}

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

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

.side-link {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 8px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-link:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.side-link img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  color: #0f172a;
  line-height: 1.3;
}

.side-link span {
  color: #64748b;
  font-size: 13px;
}

.search-results-empty {
  display: none;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
  background: #fff;
  color: #64748b;
  padding: 24px;
  text-align: center;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 20px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-inner h3,
.footer-inner h4 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-inner p,
.footer-inner a {
  color: #94a3b8;
}

.footer-inner a:hover {
  color: #fdba74;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1100px) {
  .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: 860px) {
  .header-inner {
    gap: 12px;
  }

  .header-inner > .header-search,
  .header-inner > .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 76px;
  }

  .hero-poster {
    max-width: 300px;
    transform: none;
  }

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

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

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

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

  .rank-cover img {
    width: 72px;
    height: 96px;
  }

  .rank-score {
    grid-column: 3;
    width: max-content;
  }

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

@media (max-width: 560px) {
  .logo-text small {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-title {
    font-size: 32px;
  }

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

  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-body,
  .detail-side {
    padding: 18px;
  }
}
