:root {
  color-scheme: light;
  --bg: #fafaf9;
  --panel: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --muted-2: #a8a29e;
  --line: #e7e5e4;
  --accent: #dc2626;
  --accent-dark: #991b1b;
  --accent-soft: #fee2e2;
  --stone-900: #1c1917;
  --shadow: 0 18px 40px rgba(28, 25, 23, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img,
video {
  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.9);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

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

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  padding: 10px 14px;
  color: #57534e;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 14px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero {
  position: relative;
  min-height: 80vh;
  color: #ffffff;
  overflow: hidden;
  background: #000000;
}

.hero-stage {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
  background: radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.46), transparent 36%), #000000;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.img-missing {
  opacity: 0 !important;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.16)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 14vh 7vw 260px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fecaca;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  color: #f5f5f4;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
  color: #57534e;
  background: #f5f5f4;
  border-radius: 999px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-bottom {
  position: absolute;
  left: 7vw;
  right: 7vw;
  bottom: 60px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 24px;
  align-items: end;
}

.hero-search-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-search-card p {
  margin: 8px 0 16px;
  color: #d6d3d1;
  font-size: 14px;
  line-height: 1.6;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.hero-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  padding: 12px 14px;
  border-radius: 999px;
  background: #ffffff;
}

.hero-search button {
  border: 0;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
}

.hero-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.hero-mini {
  position: relative;
  min-height: 108px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-mini-img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  opacity: 0.78;
}

.hero-mini span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 12px #000000;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 7vw;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

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

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

main,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.content-section,
.filter-panel,
.category-block,
.detail-text,
.player-section {
  margin-top: 36px;
}

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

.section-heading h2,
.filter-panel h2,
.detail-text h2 {
  margin: 6px 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.filter-panel p,
.page-hero p,
.detail-text p,
.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

.section-link {
  color: var(--accent);
  border: 1px solid #fecaca;
  background: #fff5f5;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: radial-gradient(circle at 20% 15%, rgba(220, 38, 38, 0.4), transparent 30%), #1c1917;
}

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

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

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
}

.poster-play {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--accent);
}

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

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  background: #f5f5f4;
}

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

.category-tile {
  display: block;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.category-thumbs span {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 10px;
  background: #1c1917;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.category-tile p,
.category-tile small {
  color: var(--muted);
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 150px 130px;
  gap: 10px;
}

.filter-empty {
  grid-column: 1 / -1;
  color: var(--accent) !important;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.compact-movie {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 10px;
  background: var(--accent);
  font-weight: 900;
}

.compact-thumb {
  width: 58px;
  height: 62px;
  overflow: hidden;
  border-radius: 12px;
  background: #1c1917;
}

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

.compact-info strong {
  display: block;
  margin-bottom: 4px;
}

.compact-info small {
  color: var(--muted);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 20%, rgba(220, 38, 38, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.compact-hero {
  padding: clamp(34px, 6vw, 70px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 34px;
  padding: clamp(22px, 4vw, 42px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #1c1917;
  box-shadow: var(--shadow);
}

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

.detail-line {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-tags span {
  background: #ffffff;
  border: 1px solid var(--line);
}

.player-section {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.main-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.3), rgba(0, 0, 0, 0.72));
}

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

.play-circle {
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.32);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 3;
  margin: 0;
  color: #ffffff;
  font-size: 13px;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-text > div {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

[hidden] {
  display: none !important;
}

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

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

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

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

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero {
    min-height: 920px;
  }

  .hero-content {
    padding: 92px 22px 360px;
  }

  .hero-bottom {
    left: 22px;
    right: 22px;
    bottom: 58px;
  }

  .hero-rail {
    grid-auto-columns: 72%;
  }

  main,
  .page-main {
    padding: 28px 16px 54px;
  }

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

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

  .category-grid,
  .ranking-list,
  .full-ranking,
  .filter-panel,
  .detail-hero,
  .detail-text {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 460px) {
  .movie-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-movie {
    grid-template-columns: 48px 1fr;
  }

  .rank-num {
    display: none;
  }
}
