:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-strong: #fff1e6;
  --text: #171717;
  --muted: #6b7280;
  --line: rgba(153, 27, 27, 0.12);
  --accent: #ef4444;
  --accent-dark: #b91c1c;
  --accent-soft: rgba(239, 68, 68, 0.12);
  --orange: #f97316;
  --pink: #ec4899;
  --shadow: 0 24px 60px rgba(127, 29, 29, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(248, 113, 113, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.18), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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: 60;
  background: rgba(255, 247, 237, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--orange), var(--pink));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #7f1d1d;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.12);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--accent-dark);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  background: #12070a;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 7, 10, 0.96), rgba(18, 7, 10, 0.58), rgba(18, 7, 10, 0.9)),
    radial-gradient(circle at 70% 18%, rgba(249, 115, 22, 0.5), transparent 30rem),
    radial-gradient(circle at 38% 76%, rgba(236, 72, 153, 0.32), transparent 28rem);
  z-index: -2;
}

.hero-track {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: center;
  gap: 56px;
  padding: 86px 0 62px;
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.58s ease, transform 0.58s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-content {
  color: #ffffff;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #fb923c;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content h1 {
  max-width: 800px;
  font-size: clamp(3rem, 9vw, 5.8rem);
}

.hero-summary {
  margin: 24px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.hero-image {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: inherit;
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.hero-actions,
.filter-selects,
.footer-links,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
  gap: 14px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange), var(--pink));
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.34);
}

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

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

.text-link {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.hero-tags span,
.tag-row span,
.content-side dd span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #9f1239;
  background: rgba(255, 237, 213, 0.92);
  font-size: 0.8rem;
  font-weight: 800;
}

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition: all 0.2s ease;
}

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

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading.with-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.search-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.search-box input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  outline: 0;
}

.search-box input {
  padding: 0 16px;
}

.filter-select {
  min-width: 150px;
  padding: 0 14px;
}

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

.no-result {
  margin: 18px 0;
  padding: 20px;
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(127, 29, 29, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(239, 68, 68, 0.36);
  box-shadow: 0 24px 54px rgba(127, 29, 29, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

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

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

.card-badge,
.rank-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-badge {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  background: rgba(127, 29, 29, 0.72);
}

.rank-mark {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
}

.card-body {
  padding: 14px;
}

.card-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  min-height: 2.7em;
}

.card-body h3 a:hover {
  color: var(--accent-dark);
}

.card-summary {
  margin: 8px 0 12px;
  color: #525252;
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile {
  display: grid;
  gap: 14px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 237, 213, 0.84)),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 16rem);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(127, 29, 29, 0.16);
}

.category-tile span {
  color: var(--accent-dark);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.category-tile strong {
  color: #525252;
  font-weight: 700;
}

.category-tile em {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}

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

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

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

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

.movie-card.compact .card-body h3 {
  min-height: auto;
}

.movie-card.compact .tag-row {
  display: none;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 34px;
}

.page-hero.slim {
  min-height: 260px;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #525252;
  font-size: 1.08rem;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 237, 213, 0.78)),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.16), transparent 24rem);
  box-shadow: var(--shadow);
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #991b1b, #fb923c);
  box-shadow: 0 24px 60px rgba(127, 29, 29, 0.16);
}

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

.detail-info h1 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
}

.detail-lead {
  margin: 18px 0 0;
  color: #525252;
  font-size: 1.08rem;
}

.detail-tags {
  margin: 20px 0 28px;
}

.player-section {
  margin-top: 44px;
}

.player-section h2,
.detail-content h2,
.related-wrap h2 {
  margin: 0 0 18px;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #09090b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #09090b;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.28), rgba(0, 0, 0, 0.64));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.4);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin-top: 44px;
}

.content-main,
.content-side {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.content-main p {
  margin: 0 0 26px;
  color: #404040;
}

.content-main p:last-child {
  margin-bottom: 0;
}

.content-side dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.content-side dt {
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.content-side dd {
  margin: 0;
  color: #404040;
  font-weight: 700;
}

.content-side dd:has(span) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-wrap {
  width: 100%;
  padding-bottom: 80px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 10px 0 0;
  color: var(--muted);
}

.footer-links a {
  color: #7f1d1d;
  font-weight: 800;
}

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

[data-card][hidden] {
  display: none;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

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

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-carousel,
  .hero-track {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 78px;
  }

  .hero-image {
    width: min(280px, 78vw);
    justify-self: center;
    order: -1;
  }

  .filter-panel,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
  }

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

  .category-grid,
  .category-grid.large,
  .ranking-list,
  .ranking-list.full {
    grid-template-columns: 1fr;
  }

  .section-heading.with-link {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .section-wrap,
  .page-hero,
  .detail-page,
  .footer-inner,
  .hero-track {
    width: min(100% - 22px, 1180px);
  }

  .site-logo,
  .footer-logo {
    font-size: 1.05rem;
  }

  .movie-grid,
  .all-grid,
  .related-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

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

  .detail-hero,
  .content-main,
  .content-side {
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 2.6rem;
  }
}
