:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --orange: #f97316;
  --amber: #facc15;
  --night: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 22px;
}

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

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--primary), var(--orange));
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  border-radius: 13px;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.24);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
  background: #fff1f2;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: #f1f5f9;
  padding: 11px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #334155;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 18px;
  border-top: 1px solid var(--line);
  background: white;
}

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

.mobile-nav-link {
  padding: 11px 14px;
  border-radius: 14px;
  color: #334155;
  font-weight: 800;
}

.mobile-nav-link:hover {
  color: var(--primary);
  background: #fff1f2;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  color: white;
  background: var(--night);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 660px;
}

.hero-slide.is-active {
  display: block;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(249, 115, 22, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.64) 48%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 58px;
  min-height: 660px;
  padding: 82px 0 112px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.24);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(220, 38, 38, 0.32);
}

.btn.ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn.ghost.dark {
  color: #1f2937;
  border-color: rgba(15, 23, 42, 0.14);
  background: white;
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--orange));
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 13px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 26px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 30px;
  background: linear-gradient(90deg, var(--primary), var(--orange));
}

.section-block {
  padding: 68px 0;
}

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

.section-head h2,
.page-hero h1,
.category-hero h1,
.ranking-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-head.inverse h2,
.section-head.inverse .section-kicker {
  color: white;
}

.text-link {
  color: var(--primary);
  font-weight: 900;
}

.text-link.light {
  color: #fed7aa;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  opacity: 0.72;
  transition: 0.3s ease;
}

.category-tile span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.94;
}

.filter-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.filter-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-main input,
.filter-main select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: none;
  padding: 0 14px;
  color: #0f172a;
  background: white;
}

.filter-main input:focus,
.filter-main select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-empty {
  display: none;
  margin: 18px 0 0;
  padding: 18px;
  border-radius: 16px;
  color: #7f1d1d;
  background: #fee2e2;
  font-weight: 800;
}

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

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

.home-grid,
.category-list,
.ranking-list {
  margin-top: 8px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: white;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card.is-hidden {
  display: none;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: 0.28s ease;
}

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: white;
  background: rgba(220, 38, 38, 0.88);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 32px;
  border-radius: 999px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.22;
}

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

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

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

.tag-row.large span {
  font-size: 13px;
  background: #fff7ed;
}

.movie-card.compact .card-body p {
  min-height: 0;
}

.ranking-band {
  background:
    radial-gradient(circle at 12% 12%, rgba(249, 115, 22, 0.28), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 52%, #7f1d1d);
}

.page-main {
  min-height: 68vh;
}

.page-hero.simple {
  padding: 70px 0 40px;
}

.page-hero.simple p:last-child,
.category-hero p,
.ranking-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.category-overview {
  display: grid;
  gap: 18px;
  padding: 20px 0 72px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.overview-cover img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-overview-card p {
  margin: 0;
  color: var(--orange);
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 30px;
}

.category-overview-card span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
}

.category-hero,
.ranking-hero {
  padding: 70px 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.16), transparent 30%),
    linear-gradient(135deg, #fff7ed, white);
  border-bottom: 1px solid var(--line);
}

.category-hero-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.detail-main {
  background: linear-gradient(180deg, #0f172a 0, #111827 420px, #f8fafc 421px, #ffffff 100%);
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 62px 0 42px;
  color: white;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
}

.detail-info .btn {
  margin-top: 24px;
}

.player-section {
  padding: 28px 0 16px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: white;
  text-align: center;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.26), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: 0.22s ease;
}

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

.player-button {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  font-size: 34px;
  box-shadow: 0 22px 42px rgba(220, 38, 38, 0.34);
  cursor: pointer;
}

.player-overlay strong {
  max-width: 80%;
  font-size: 22px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 26px 0 10px;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.content-card.accent {
  background: linear-gradient(135deg, #fff7ed, white);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.site-footer {
  margin-top: 34px;
  color: #cbd5e1;
  background:
    radial-gradient(circle at 20% 10%, rgba(220, 38, 38, 0.22), transparent 34%),
    linear-gradient(135deg, #0f172a, #111827 55%, #1e293b);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0;
}

.footer-logo {
  color: white;
  font-size: 22px;
}

.site-footer p {
  max-width: 360px;
  color: #94a3b8;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-hero,
  .detail-content,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .category-hero-inner {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: 610px;
  }

  .hero-content {
    padding: 62px 0 94px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-desc,
  .detail-line {
    font-size: 16px;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-block {
    padding: 46px 0;
  }

  .overview-cover {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-cover img {
    height: 130px;
  }

  .detail-hero {
    padding-top: 36px;
  }

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

  .content-card {
    padding: 22px;
  }
}
