:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --card: #ffffff;
  --dark: #0f172a;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --blue: #0ea5e9;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  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: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

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

.nav-link {
  padding: 9px 14px;
  color: #334155;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.22);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff3ec;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--orange);
  border-radius: 20px;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  padding: 0 0 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.28), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(236, 72, 153, 0.24), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #581c87 48%, #7f1d1d 100%);
}

.hero-slider {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1200px) / 2 + 20px));
  bottom: 118px;
  width: min(650px, calc(100vw - 48px));
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-desc {
  max-width: 610px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.tag-row span {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.36);
}

.btn-soft {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn-soft:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  color: #fff;
  font-size: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-control:hover {
  background: rgba(249, 115, 22, 0.78);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

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

.hero-search {
  position: relative;
  z-index: 3;
  width: min(920px, calc(100vw - 40px));
  margin: -42px auto 0;
  padding: 10px;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--text);
}

.hero-search button {
  border: 0;
  color: #fff;
  padding: 0 22px;
  border-radius: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--red));
  cursor: pointer;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 74px 20px;
}

.section-light {
  max-width: none;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.section-light > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section-gradient {
  max-width: none;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #312e81 48%, #9f1239);
}

.section-gradient > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head-invert .eyebrow,
.section-head-invert .section-more {
  color: #fed7aa;
}

.section-more,
.text-link {
  color: var(--orange);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

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

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

.poster-mask {
  position: absolute;
  inset: auto 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s ease;
  backdrop-filter: blur(8px);
}

.movie-card:hover .poster-mask {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.32);
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-info h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-info p {
  margin: 0 0 14px;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card-compact .movie-info h3 {
  font-size: 16px;
}

.movie-card-compact .movie-info p {
  min-height: 42px;
  font-size: 13px;
}

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

.category-tile,
.category-overview-card {
  display: block;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
  backdrop-filter: blur(14px);
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.18);
}

.category-thumbs,
.overview-thumb-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-thumbs img,
.overview-thumb-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

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

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: 0.25s ease;
}

.rank-row:hover {
  transform: translateX(5px);
  box-shadow: var(--soft-shadow);
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-num {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

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

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

.page-hero {
  padding: 92px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.34), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.24), transparent 30%),
    linear-gradient(135deg, #111827, #312e81 54%, #7f1d1d);
}

.page-hero > div {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.small-hero {
  padding-top: 78px;
  padding-bottom: 78px;
}

.filter-panel {
  margin: 0 0 24px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

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

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid #e2e8f0;
  outline: 0;
  padding: 0 14px;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--text);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.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: 18px;
  color: var(--text);
  background: #fff;
}

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

.overview-thumb-row {
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

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

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 800;
}

.detail-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 70px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: center;
}

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

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

.detail-main {
  padding: 38px;
  color: #fff;
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 18%, rgba(249, 115, 22, 0.28), transparent 32%),
    linear-gradient(135deg, #111827, #312e81 48%, #7f1d1d);
  box-shadow: var(--shadow);
}

.detail-main h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.player-section {
  padding-top: 0;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #fff;
  border: 0;
  background: rgba(2, 6, 23, 0.42);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.42);
}

.player-cover strong {
  max-width: 80%;
  text-align: center;
  font-size: 24px;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  color: #fff;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
}

.player-message:not(:empty) {
  display: block;
}

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

.content-card {
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 12px;
}

.content-card p {
  margin: 0;
  color: #475569;
}

.info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
}

.info-card dt {
  color: var(--muted);
  font-weight: 900;
}

.info-card dd {
  margin: 0;
}

.site-footer {
  padding: 52px 20px 26px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.footer-inner p {
  max-width: 420px;
  color: #94a3b8;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.25s ease;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.28);
}

.footer-bottom {
  max-width: 1200px;
  margin: 34px auto 0;
  padding-top: 22px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .dense-grid,
  .rank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

@media (max-width: 760px) {
  .mobile-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 66px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

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

  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    bottom: 112px;
  }

  .hero-control {
    display: none;
  }

  .hero-search,
  .filter-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-search {
    display: grid;
  }

  .hero-search input,
  .hero-search button {
    min-height: 48px;
  }

  .section {
    padding: 54px 16px;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .dense-grid,
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-info {
    padding: 13px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .movie-info p {
    display: none;
  }

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

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

  .detail-main {
    padding: 26px;
  }

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

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

@media (max-width: 460px) {
  .header-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-logo {
    font-size: 15px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

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

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

  .overview-thumb-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
