:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #ef4444;
  --accent-deep: #dc2626;
  --orange: #f97316;
  --gold: #f59e0b;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b 45%, #0f172a);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.32);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.34);
  font-size: 16px;
}

.site-logo span:last-child,
.footer-logo span:last-child {
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  color: #e2e8f0;
}

.site-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: #f87171;
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 4px;
  background: #ffffff;
}

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

.hero-stack {
  position: relative;
  min-height: 660px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
  align-items: center;
  gap: 56px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.82) 48%, rgba(127, 29, 29, 0.44) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(14px) saturate(1.2);
  transform: scale(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 110px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 760px;
  margin: 24px 0 0;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

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

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

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

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

.primary-btn,
.ghost-btn,
.text-btn,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-panel button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.35);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.45));
}

.hero-poster img,
.poster-wrap img,
.category-cover img,
.detail-poster img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.hero-dot.active {
  background: linear-gradient(90deg, var(--accent), var(--orange));
}

.home-search {
  margin-top: -44px;
  position: relative;
  z-index: 10;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel h2,
.section-heading h2,
.rank-panel h2,
.text-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input,
.filter-panel input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 15px;
  padding: 14px 16px;
  color: var(--text);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.content-section {
  padding: 72px 0 0;
}

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

.section-link,
.text-btn {
  color: var(--accent-deep);
  font-weight: 900;
}

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

.category-card,
.category-overview-card,
.movie-card,
.rank-panel,
.filter-panel,
.detail-main-card,
.text-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 22px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -44px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(249, 115, 22, 0.18));
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

.category-card span {
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.15;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-wrap img {
  transition: transform 0.45s ease;
}

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

.card-shine {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

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

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #b91c1c;
  background: #fee2e2;
  padding: 4px 8px;
  font-size: 12px;
}

.rank-panel {
  border-radius: var(--radius);
  padding: 22px;
}

.sticky-rank {
  position: sticky;
  top: 96px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 15px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
  background: #fee2e2;
  transform: translateX(3px);
}

.rank-line span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  font-weight: 900;
}

.rank-line strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-line em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.sub-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.35), transparent 24%),
    linear-gradient(120deg, #0f172a, #7f1d1d 58%, #0f172a);
  padding: 76px 0;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.category-overview-card h2 {
  margin: 6px 0 10px;
  font-size: 24px;
}

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

.mini-link-list {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  padding: 20px;
}

.filter-panel label {
  color: var(--text);
  font-weight: 900;
}

.wide-filter {
  gap: 14px;
}

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

.filter-chips button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #b91c1c;
  background: #fee2e2;
  font-weight: 800;
  cursor: pointer;
}

.detail-hero {
  padding: 40px 0 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.25), transparent 28%),
    linear-gradient(135deg, #020617, #111827 58%, #7f1d1d);
}

.detail-shell {
  padding-bottom: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fca5a5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.player-shell video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: contain;
  background: #000000;
}

.player-cover {
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
  cursor: pointer;
}

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

.player-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 25px 55px rgba(239, 68, 68, 0.38);
}

.play-button span {
  margin-left: 5px;
  font-size: 34px;
}

.detail-content {
  padding: 42px 0 0;
}

.detail-main-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  border-radius: var(--radius);
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.detail-copy h1 {
  color: var(--text);
  font-size: clamp(34px, 5vw, 60px);
}

.lead-text {
  margin: 18px 0 22px;
  color: #334155;
  font-size: 19px;
  font-weight: 700;
}

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

.info-grid div {
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
}

.info-grid strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.info-grid span {
  display: block;
  margin-top: 4px;
  font-weight: 900;
}

.detail-tags a {
  color: #b91c1c;
  background: #fee2e2;
}

.text-card {
  margin-top: 22px;
  border-radius: var(--radius);
  padding: 28px;
}

.text-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 18px;
  text-indent: 2em;
}

.related-section {
  padding-top: 40px;
}

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

.site-footer {
  margin-top: 76px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

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

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

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

  .sticky-rank {
    position: static;
  }
}

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

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 16px 20px;
    background: #0f172a;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

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

  .site-nav a {
    width: 100%;
    padding: 12px 0;
  }

  .hero-slider,
  .hero-stack {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
  }

  .hero-content {
    padding: 84px 0 0;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: center;
  }

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

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

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

  .category-cover {
    max-height: 280px;
  }

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

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

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

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

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

  .site-logo,
  .footer-logo {
    font-size: 20px;
  }

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

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

  .search-panel form {
    flex-direction: column;
  }

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

  .movie-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .movie-card a {
    display: contents;
  }

  .poster-wrap {
    height: 100%;
    min-height: 190px;
  }

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

  .play-button {
    width: 72px;
    height: 72px;
  }
}
