* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --red: #ef4444;
  --red-dark: #991b1b;
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper-soft);
  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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(127, 29, 29, 0.96));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.36);
  font-size: 16px;
}

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

.nav-link {
  color: #e5e7eb;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(239, 68, 68, 0.22);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel a {
  display: block;
  color: #f8fafc;
  padding: 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.hero-slider {
  position: relative;
  min-height: 660px;
  color: #fff;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 28%, rgba(239, 68, 68, 0.36), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.35) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.14));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  gap: 44px;
  align-items: center;
  padding: 66px 0 76px;
}

.hero-copy {
  max-width: 720px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  color: #fecaca;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 22px;
  max-width: 660px;
  color: #e2e8f0;
  font-size: 19px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.36);
}

.btn-light {
  color: #991b1b;
  background: #fff;
  box-shadow: 0 18px 34px rgba(248, 250, 252, 0.22);
}

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

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.hero-panel:hover .hero-poster img {
  transform: scale(1.05);
}

.hero-poster .play-chip {
  right: 16px;
  bottom: 16px;
}

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

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 60px;
  background: #ef4444;
}

.quick-search {
  position: relative;
  z-index: 5;
  width: min(980px, calc(100% - 32px));
  margin: -36px auto 0;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.quick-search input,
.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 76% 20%, rgba(239, 68, 68, 0.45), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e293b 48%, #7f1d1d);
  padding: 70px 0 64px;
}

.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

.section {
  padding: 72px 0;
}

.section-dark {
  color: #fff;
  background: #0f172a;
}

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

.section-head h2,
.section-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 680px;
}

.section-dark .section-head p {
  color: #cbd5e1;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 38px 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(239, 68, 68, 0.42);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.section-dark .movie-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: #111827;
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  filter: brightness(0.78);
}

.movie-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.35);
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
}

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

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.section-dark .movie-meta,
.section-dark .movie-line,
.section-dark .rank-meta {
  color: #94a3b8;
}

.movie-line {
  min-height: 44px;
  margin-top: 8px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 26px;
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #111827, #7f1d1d);
  box-shadow: var(--shadow);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 950;
}

.category-card p {
  margin: 0 0 24px;
  color: #e5e7eb;
}

.category-card span {
  font-weight: 900;
  color: #fecaca;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.6fr 0.6fr;
  gap: 14px;
  margin: 28px auto 32px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.rank-list a {
  display: grid;
  grid-template-columns: 52px 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  color: #ef4444;
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.rank-list img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.rank-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 950;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(239, 68, 68, 0.38), transparent 30%),
    linear-gradient(135deg, #020617, #0f172a 54%, #7f1d1d);
  padding: 54px 0 42px;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-copy p {
  margin: 0;
  max-width: 850px;
  color: #e2e8f0;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.watch-section {
  padding: 42px 0 0;
  background: #0f172a;
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.player-card,
.side-card,
.content-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.24), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button-core {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 18px 48px rgba(220, 38, 38, 0.45);
  font-size: 34px;
  transform: translateZ(0);
}

.play-button-core span {
  margin-left: 6px;
}

.player-title {
  padding: 18px 20px 20px;
  color: #fff;
}

.player-title h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 950;
}

.player-title p {
  margin: 0;
  color: #94a3b8;
}

.side-card {
  padding: 18px;
  color: #fff;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 950;
}

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

.small-card a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  color: #e5e7eb;
  font-weight: 800;
}

.small-card img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: #020617;
}

.detail-content {
  padding: 42px 0 72px;
  background: #0f172a;
}

.content-card {
  padding: 28px;
  color: #f8fafc;
}

.content-card + .content-card {
  margin-top: 24px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 950;
}

.content-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 17px;
}

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

.search-results {
  margin-top: 34px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 22px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr;
  gap: 34px;
}

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fca5a5;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-size: 14px;
}

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

  .hero-content,
  .watch-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 420px;
  }

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

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

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .brand {
    font-size: 20px;
  }

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

  .hero-content {
    gap: 24px;
    padding-top: 42px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .section {
    padding: 50px 0;
  }

  .section-head {
    display: block;
  }

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

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

  .rank-list a {
    grid-template-columns: 44px 64px 1fr;
  }

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

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

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-card h2,
  .movie-card h3 {
    font-size: 15px;
  }

  .movie-line,
  .tag-row {
    display: none;
  }

  .page-hero {
    padding: 48px 0;
  }
}
