:root {
  --brand-red: #dc2626;
  --brand-orange: #f97316;
  --brand-yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.logo-text {
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
  color: #374151;
}

.nav-links a:hover,
.mobile-nav a:hover {
  color: var(--brand-red);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 10px 20px 18px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 650;
  color: #374151;
}

main {
  min-height: 62vh;
}

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

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
  background-position: center;
  background-size: cover;
}

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

.hero-content {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 620px;
  padding: 110px 20px 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 56px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: var(--brand-yellow);
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-primary {
  color: var(--brand-red);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn-warm {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.24);
}

.hero-panel {
  position: relative;
  border-radius: 30px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.28);
}

.hero-panel-info {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  padding: 18px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.88));
}

.hero-panel-info strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

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

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

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

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 20px;
}

.section.alt {
  max-width: none;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.section.alt > .section-inner {
  max-width: 1240px;
  margin: 0 auto;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

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

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.card-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.24);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  color: #111827;
}

.card-meta {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.card-desc {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 750;
}

.page-hero {
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #ffffff;
  overflow: hidden;
}

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 76px 20px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.75;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.search-box {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  color: #111827;
}

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

.filter-btn {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #b91c1c;
  background: #fff7ed;
  font-weight: 750;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-radius: 22px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.86));
}

.category-card > * {
  position: relative;
  z-index: 1;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-no {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-red);
  text-align: center;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #fee2e2;
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: #4b5563;
  line-height: 1.65;
}

.breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #b91c1c;
  font-weight: 700;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
}

.detail-card,
.side-card,
.prose-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.player-cover-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(248, 113, 113, 0.22), rgba(2, 6, 23, 0.82));
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #dc2626;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

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

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

.detail-body {
  padding: 28px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

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

.meta-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 13px;
  font-weight: 800;
}

.lead {
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.prose-card {
  padding: 24px;
  margin-top: 24px;
}

.prose-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.prose-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 86px;
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 160ms ease;
}

.related-card:hover {
  background: #f9fafb;
}

.related-card img {
  width: 86px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #fee2e2;
}

.related-card strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.related-card span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.info-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 58px 20px 78px;
}

.info-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.info-panel h2 {
  margin-top: 0;
}

.info-panel p,
.info-panel li {
  color: #374151;
  line-height: 1.9;
}

.footer {
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 20px 28px;
}

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

.footer h2,
.footer h3 {
  color: #ffffff;
  margin: 0 0 14px;
}

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

.footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 14px;
}

.hidden-card {
  display: none;
}

.empty-result {
  display: none;
  padding: 28px;
  text-align: center;
  color: #6b7280;
  border: 1px dashed #fecaca;
  border-radius: 18px;
  background: #fff7ed;
}

.empty-result.show {
  display: block;
}

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 84px 20px 82px;
  }

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

  .section-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 48px 80px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / 4;
  }

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

@media (max-width: 620px) {
  .header-inner {
    padding: 12px 16px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

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

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

  .section,
  .page-hero-inner,
  .info-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .hero-actions,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .detail-body {
    padding: 22px;
  }

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

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