:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --red: #ef4444;
  --red-dark: #dc2626;
  --amber: #f59e0b;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800) 48%, var(--slate-900));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
}

.navbar {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #ffffff;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-text {
  font-size: clamp(18px, 2vw, 26px);
  background: linear-gradient(90deg, #fb7185, #fca5a5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), #fb7185);
  color: white;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32);
  font-size: 14px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-search {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--red);
  color: #ffffff;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-search:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

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

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 10px;
}

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

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  color: white;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.page-shell,
.hero-inner,
.section,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 18% 20%, rgba(239, 68, 68, 0.24), transparent 30%), linear-gradient(135deg, #0f172a, #1e293b 58%, #020617);
  color: #ffffff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 280px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2), transparent 62%);
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fecaca;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 span,
.page-hero h1 span {
  display: block;
  color: #fca5a5;
}

.hero-lead,
.page-hero p,
.detail-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
  margin: 20px 0 0;
}

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

.button,
.button-soft,
.button-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 800;
  transition: 0.2s ease;
}

.button {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.3);
}

.button:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

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

.button-soft:hover {
  background: rgba(255, 255, 255, 0.18);
}

.button-dark {
  color: var(--slate-900);
  background: #ffffff;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(26px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.hero-card {
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #475569, #111827);
}

.hero-poster img,
.poster-link img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.hero-poster img.is-missing,
.poster-link img.is-missing,
.detail-poster img.is-missing {
  opacity: 0;
}

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

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

.hero-info {
  padding: 24px;
}

.hero-info h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
}

.hero-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
}

.hero-dots {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  padding: 52px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--red-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

.feature-card,
.category-card,
.info-card,
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 24px;
  min-height: 150px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.feature-card b {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--red), #fb7185);
  color: #ffffff;
  margin-bottom: 16px;
}

.feature-card h3,
.category-card h2,
.info-card h2,
.content-card h2 {
  margin: 0 0 10px;
}

.feature-card p,
.category-card p,
.info-card p,
.content-card p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

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

.movie-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
}

.poster-link,
.detail-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #ef4444);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 18px;
}

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.poster-play {
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: rgba(239, 68, 68, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.3);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  min-height: 43px;
}

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

.movie-card p {
  margin: 0 0 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.movie-tags span,
.detail-tags span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fecaca;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  padding: 6px 9px;
  border-radius: 10px;
  background: #f1f5f9;
}

.page-hero,
.detail-hero {
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.28), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 60%, #020617);
  color: #ffffff;
}

.page-hero .page-shell {
  padding: 64px 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  padding: 0 14px;
  background: #f8fafc;
  color: var(--ink);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.filter-controls {
  display: flex;
  gap: 10px;
}

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

.category-card {
  display: grid;
  min-height: 210px;
  padding: 24px;
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.35);
}

.category-card .button-dark {
  align-self: end;
  margin-top: 20px;
  justify-self: start;
  background: #111827;
  color: #ffffff;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.rank-row b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #fee2e2;
  color: #b91c1c;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.detail-hero .page-shell {
  padding: 56px 0;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.player-section {
  padding-top: 46px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.22), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
}

.play-cover span {
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.45);
}

.player-shell.is-playing .play-cover {
  display: none;
}

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

.content-card,
.info-card {
  padding: 26px;
}

.content-card + .content-card,
.info-card + .info-card {
  margin-top: 20px;
}

.content-card p,
.info-card p {
  font-size: 16px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.side-thumb {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #ef4444);
}

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

.side-thumb img.is-missing {
  opacity: 0;
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.site-footer {
  margin-top: 56px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer h3 {
  color: #ffffff;
  margin: 0 0 14px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

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

.empty-state.is-visible {
  display: block;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero-inner,
  .detail-hero .page-shell {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 520px;
  }

  .feature-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .filter-controls {
    flex-direction: column;
  }

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

@media (max-width: 620px) {
  .navbar,
  .page-shell,
  .hero-inner,
  .section,
  .footer-grid,
  .footer-bottom,
  .mobile-menu {
    width: min(100% - 24px, 1180px);
  }

  .hero-inner {
    padding-top: 42px;
  }

  .hero-stage {
    min-height: 460px;
  }

  .feature-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .section-heading {
    display: block;
  }

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-row .button-dark {
    grid-column: 2;
    justify-self: start;
  }
}
