:root {
  color-scheme: light;
  --page-bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fee2e2;
  --red: #dc2626;
  --red-dark: #991b1b;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --shadow: 0 20px 45px rgba(127, 29, 29, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(251, 191, 36, 0.22), transparent 30rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 40%, #fff 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(254, 202, 202, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--red-dark);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

.brand-name {
  font-size: 22px;
}

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

.nav-link,
.mobile-link {
  color: #4b5563;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--red-dark);
  background: #fee2e2;
}

.header-cta,
.primary-button,
.secondary-button,
.section-more,
.play-now,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-cta,
.primary-button,
.play-now,
.search-button {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.22);
}

.header-cta {
  padding: 10px 18px;
}

.primary-button,
.secondary-button,
.search-button {
  padding: 13px 22px;
}

.secondary-button,
.section-more {
  color: var(--red-dark);
  background: #fff;
  border: 1px solid #fecaca;
}

.section-more {
  padding: 10px 16px;
}

.header-cta:hover,
.primary-button:hover,
.secondary-button:hover,
.section-more:hover,
.play-now:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.25);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: #fee2e2;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--red-dark);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid #fee2e2;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: #fff;
  background: #111827;
}

.hero-slide {
  display: none;
  min-height: 640px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 35%, rgba(251, 191, 36, 0.25), transparent 24rem),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(127, 29, 29, 0.82) 44%, rgba(17, 24, 39, 0.28) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.95), transparent 35%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: grid;
  align-content: center;
  max-width: 720px;
  padding: 96px 0 120px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #ffedd5;
  font-size: 18px;
}

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

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

.hero-meta {
  margin-top: 24px;
}

.hero-meta .badge {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  background: #fbbf24;
}

.section {
  padding: 72px 0;
}

.section.tight {
  padding-top: 36px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.eyebrow {
  color: var(--red);
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #fee2e2;
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: #fca5a5;
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #7f1d1d;
}

.movie-grid.compact .poster-link {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover img,
.category-card:hover img,
.rank-row:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 58%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border-radius: 999px;
}

.play-chip {
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 32px;
  color: #7f1d1d;
  background: #fef3c7;
}

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

.card-meta,
.info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

.card-desc {
  min-height: 52px;
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
}

.category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}

.filter-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.08);
}

.filter-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.form-field label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.hero-search input {
  width: 100%;
  color: #111827;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 16px;
  outline: none;
}

.form-field input,
.form-field select {
  padding: 12px 14px;
}

.form-field input:focus,
.form-field select:focus,
.hero-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 30px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-search input {
  padding: 13px 18px;
  border-radius: 999px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: end;
  padding: 24px;
  color: #fff;
  background: #111827;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(127, 29, 29, 0.32));
}

.category-card-content {
  position: relative;
  z-index: 2;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-card p {
  margin: 0 0 18px;
  color: #ffedd5;
}

.page-title {
  padding: 56px 0 28px;
}

.page-title p {
  max-width: 760px;
  color: #4b5563;
  font-size: 17px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 90px 160px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
}

.rank-number {
  color: var(--red-dark);
  font-size: 36px;
  font-weight: 950;
  text-align: center;
}

.rank-row a.poster-link {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

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

.rank-row p {
  margin: 0;
  color: #4b5563;
}

.detail-hero {
  padding: 56px 0 36px;
  background:
    radial-gradient(circle at 70% 10%, rgba(251, 191, 36, 0.24), transparent 28rem),
    linear-gradient(135deg, #111827, #7f1d1d 58%, #d97706);
  color: #fff;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 8px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.32);
}

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

.detail-title h1 {
  color: #fff;
}

.detail-title p {
  max-width: 760px;
  color: #ffedd5;
  font-size: 18px;
}

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

.detail-meta .badge {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.player-wrap {
  overflow: hidden;
  background: #030712;
  border-radius: 30px;
  box-shadow: 0 25px 65px rgba(3, 7, 18, 0.28);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, 0.36);
  cursor: pointer;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.player-start {
  position: relative;
  z-index: 3;
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.42);
}

.player-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  color: #ffedd5;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
}

.article-panel,
.side-panel {
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.08);
}

.article-panel {
  padding: 28px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 24px;
}

.article-panel p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 16px;
}

.side-panel {
  padding: 18px;
}

.side-panel .movie-card {
  margin-bottom: 16px;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.pagination-links a,
.pagination-links span {
  padding: 10px 14px;
  color: var(--red-dark);
  font-weight: 800;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 999px;
}

.pagination-links .current {
  color: #fff;
  background: var(--red);
}

.empty-state {
  display: none;
  padding: 24px;
  color: #4b5563;
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: var(--radius);
}

.site-footer {
  margin-top: 64px;
  padding: 44px 0;
  color: #ffedd5;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 2fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.site-footer p {
  margin: 12px 0 0;
  color: #fed7aa;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  padding: 8px 12px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

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

  .category-layout,
  .content-grid,
  .detail-hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .hero-content {
    padding: 82px 0 104px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .search-button {
    width: 100%;
  }

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

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

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

  .card-desc {
    display: none;
  }

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

  .rank-row .play-now {
    grid-column: 1 / -1;
  }

  .detail-cover {
    max-width: 420px;
  }

  .player-caption {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .hero h1,
  .hero h2,
  .page-title h1,
  .detail-title h1 {
    letter-spacing: -0.05em;
  }

  .hero-dot {
    width: 28px;
  }
}
