:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --gold: #facc15;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.28);
}

.brand__text {
  font-size: 18px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--red);
  background: #fef2f2;
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

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

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

.mobile-link:hover {
  color: var(--red);
  background: #fef2f2;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(248, 113, 113, 0.95), transparent 30%), linear-gradient(135deg, #7f1d1d 0%, #dc2626 42%, #fb923c 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 88px;
}

.hero__glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.3;
}

.hero__glow--one {
  top: -120px;
  right: 10%;
  background: #fff;
}

.hero__glow--two {
  left: -90px;
  bottom: 12%;
  background: var(--gold);
}

.hero-slider {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  animation: slideFade 0.35s ease both;
}

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

.hero-slide__content h1 {
  max-width: 760px;
  margin: 14px 0 22px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-lead {
  max-width: 690px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(18px, 2.4vw, 23px);
}

.eyebrow {
  margin: 0;
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero-slide__poster {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 32px;
  box-shadow: 0 35px 80px rgba(127, 29, 29, 0.45);
  background: rgba(17, 24, 39, 0.38);
  transform: rotate(1deg);
}

.hero-slide__poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero-slide__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 55%);
}

.hero-slide__poster span {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  font-size: 24px;
  font-weight: 800;
}

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

.hero-actions--page {
  margin-top: 24px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--red);
  background: #fff;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.18);
}

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

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

.ghost-button--dark {
  color: var(--red);
  border-color: #fecaca;
  background: #fff;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.section {
  padding: 58px 0;
}

.section--search {
  padding: 28px 0 0;
}

.section--warm {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.section--cool {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}

.section--muted {
  background: #f3f4f6;
}

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

.section-heading h2 {
  margin: 0 0 4px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 800;
}

.search-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.search-panel__label {
  display: block;
  margin-bottom: 10px;
  color: #374151;
  font-weight: 800;
}

.search-panel__box {
  display: flex;
  gap: 10px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px #fee2e2;
}

.search-panel button {
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--red);
  font-weight: 800;
  cursor: pointer;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fecaca;
  box-shadow: var(--shadow);
}

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

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.26s ease, filter 0.26s ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.05);
  filter: saturate(1.08);
}

.movie-card__poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .movie-card__poster::after {
  opacity: 1;
}

.movie-card__play {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 3;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.95);
  font-size: 13px;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
}

.movie-card__body {
  padding: 13px;
}

.movie-card__body h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.28;
  font-weight: 850;
}

.movie-card__body h2 a:hover {
  color: var(--red);
}

.movie-card__meta,
.movie-card__line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-card__line {
  min-height: 40px;
  margin-top: 7px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card--compact .movie-card__line {
  display: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--red);
  background: #fef2f2;
  font-size: 12px;
  font-weight: 750;
}

.tag-row--hero span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

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

.category-tile {
  min-height: 138px;
  padding: 20px;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
}

.category-tile strong {
  display: block;
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #dc2626 55%, #fb923c);
}

.page-hero .container {
  padding: 72px 0;
}

.page-hero h1 {
  max-width: 780px;
  margin: 12px 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  font-weight: 920;
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.page-hero--categories {
  background: linear-gradient(135deg, #1f2937, #991b1b 55%, #f97316);
}

.page-hero--ranking {
  background: linear-gradient(135deg, #451a03, #b45309 50%, #dc2626);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.06);
  opacity: 0.78;
}

.category-card span,
.category-card p {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-card span {
  bottom: 78px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  bottom: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.05);
  transform: scale(1.08);
  opacity: 0.38;
}

.detail-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(127, 29, 29, 0.82));
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
  margin: 10px 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  font-weight: 920;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 850px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.detail-content,
.detail-side {
  min-width: 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.28), rgba(127, 29, 29, 0.42));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.player-card.is-ready .player-start {
  display: none;
}

.player-start__icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 20px 35px rgba(220, 38, 38, 0.35);
}

.story-card,
.side-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.story-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.2;
}

.story-card p {
  margin: 0 0 22px;
  color: #374151;
  font-size: 16px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.info-table div {
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
}

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

.info-table span {
  color: var(--ink);
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-card {
  margin-top: 0;
}

.side-card__list {
  display: grid;
  gap: 14px;
}

.side-card__list .movie-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
}

.side-card__list .movie-card__poster {
  aspect-ratio: auto;
  min-height: 130px;
}

.side-card__list .movie-card__body h2 {
  font-size: 15px;
}

.side-card__list .tag-row {
  display: none;
}

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

.site-footer__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 32px;
}

.brand--footer {
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 520px;
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
}

.footer-links a {
  color: #9ca3af;
  font-size: 14px;
}

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

.site-footer__bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    padding: 46px 0 66px;
  }

  .hero-slide,
  .hero-slide.is-active {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-slide__poster,
  .hero-slide__poster img {
    min-height: auto;
    height: auto;
  }

  .hero-slide__poster img {
    aspect-ratio: 16 / 10;
  }

  .hero-dots {
    bottom: -32px;
  }

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

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

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

  .detail-poster {
    width: min(250px, 72vw);
  }

  .detail-side {
    position: static;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .container,
  .site-header__inner,
  .site-footer__inner,
  .hero__inner {
    width: min(100% - 24px, 1180px);
  }

  .brand__text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .section {
    padding: 40px 0;
  }

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

  .search-panel__box {
    flex-direction: column;
  }

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

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

  .movie-card__body {
    padding: 11px;
  }

  .movie-card__body h2 {
    font-size: 15px;
  }

  .movie-card__line {
    display: none;
  }

  .page-hero .container,
  .detail-hero__inner {
    padding-top: 42px;
    padding-bottom: 48px;
  }

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

  .side-card__list .movie-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}
