:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --gold: #f59e0b;
  --green: #14532d;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #fff7ed;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  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;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #f8fafc 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
  font-size: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 21px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--red);
  background: #fee2e2;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fee2e2;
  color: var(--red-dark);
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: grid;
  align-items: center;
  background: radial-gradient(circle at top left, #fee2e2 0, transparent 34%), linear-gradient(135deg, #fff7ed, #ffedd5 48%, #fff1f2);
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.38;
  pointer-events: none;
}

.glow.red {
  width: 360px;
  height: 360px;
  background: #ef4444;
  left: 6vw;
  top: 12vh;
}

.glow.orange {
  width: 460px;
  height: 460px;
  background: #fb923c;
  right: -80px;
  bottom: 8vh;
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  z-index: 1;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.72fr);
  gap: 56px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #b91c1c, #ea580c, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 42px);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: clamp(16px, 1.6vw, 22px);
  color: #4b5563;
  line-height: 1.85;
}

.hero-badges,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-badges span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.14);
  font-size: 13px;
  font-weight: 700;
}

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

.center-actions {
  justify-content: center;
  margin-top: 30px;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 26px rgba(220, 38, 38, 0.24);
}

.btn.secondary {
  color: #9a3412;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.btn.ghost {
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(153, 27, 27, 0.18);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 34px;
  min-height: 520px;
  background: linear-gradient(135deg, #fee2e2, #fed7aa);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.28));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-controls {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(153, 27, 27, 0.2);
  cursor: pointer;
}

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

.hero-search {
  margin-top: 24px;
  max-width: 720px;
}

.hero-search label {
  display: block;
  margin-bottom: 8px;
  color: #9a3412;
  font-weight: 800;
}

.hero-search div,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-search input,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 18px;
  color: var(--text);
  outline: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.hero-search button {
  flex: 0 0 auto;
  border: 0;
  min-height: 50px;
  border-radius: 999px;
  padding: 0 26px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  font-weight: 800;
  cursor: pointer;
}

.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 34px;
}

.section-head span,
.page-hero span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.section-head h2,
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

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

.category-tile,
.category-panel-main {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: var(--shadow);
}

.category-tile::before,
.category-panel-main::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  right: -30px;
  top: -30px;
}

.category-tile span,
.category-panel-main span {
  position: relative;
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong,
.category-panel-main p {
  position: relative;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.category-tile.suspense,
.category-tile.history {
  background: linear-gradient(135deg, #7f1d1d, #b45309);
}

.category-tile.fantasy,
.category-tile.world {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.category-tile.romance,
.category-tile.comedy {
  background: linear-gradient(135deg, #db2777, #fb7185);
}

.category-tile.drama,
.category-tile.documentary {
  background: linear-gradient(135deg, #166534, #65a30d);
}

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

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

.movie-card {
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #fed7aa);
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
}

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

.movie-meta {
  display: flex;
  gap: 8px;
  color: #ea580c;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2,
.compact-card h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card p,
.compact-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  font-size: 14px;
}

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

.tag-row.large {
  margin: 18px 0 22px;
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  min-height: 98px;
}

.compact-card img {
  width: 72px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  background: #fee2e2;
}

.rank-no {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
  font-size: 12px;
}

.toolbar {
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.toolbar select {
  flex: 0 0 220px;
}

.sticky-toolbar {
  position: sticky;
  top: 86px;
  z-index: 10;
}

.page-hero {
  padding: 86px 0 70px;
  background: radial-gradient(circle at top right, #fed7aa, transparent 34%), linear-gradient(135deg, #fff7ed, #fff1f2);
  text-align: center;
}

.page-hero.compact {
  padding-top: 92px;
}

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

.category-panel {
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.category-panel-main h2 {
  position: relative;
  margin: 12px 0;
  font-size: 32px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.mini-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  font-size: 13px;
}

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

.detail-hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.9)), var(--poster);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
  transform: scale(1.05);
}

.detail-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: end;
  padding: 76px 0 56px;
}

.detail-cover img {
  width: 310px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

.crumb {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #fed7aa;
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 74px);
  letter-spacing: -0.06em;
}

.lead {
  max-width: 850px;
  margin: 0;
  font-size: 20px;
  line-height: 1.85;
  color: #ffedd5;
}

.detail-meta span,
.detail-page .tag-row span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #fff;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.34), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 24px 38px rgba(0, 0, 0, 0.32);
  font-size: 34px;
}

.player-cover strong {
  font-size: 24px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 2;
  font-size: 16px;
}

.site-footer {
  color: #fff;
  background: linear-gradient(135deg, #052e16, #14532d, #052e16);
  padding: 46px 0 20px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.site-footer p {
  color: #dcfce7;
  line-height: 1.8;
}

.site-footer h2 {
  font-size: 18px;
  color: #fdba74;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(220, 252, 231, 0.2);
  color: #bbf7d0;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .category-grid,
  .movie-grid.small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-slide,
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 420px;
  }

  .hero-poster img {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding-top: 34px;
  }

  .hero-slide {
    gap: 28px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 360px;
  }

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

  .toolbar select {
    flex-basis: auto;
  }

  .category-grid,
  .category-panels,
  .movie-grid,
  .movie-grid.small,
  .ranking-grid,
  .archive-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover img {
    width: min(320px, 100%);
  }

  .detail-hero-grid {
    padding-top: 42px;
  }

  .compact-card {
    grid-template-columns: 64px 1fr;
  }

  .compact-card img {
    width: 64px;
    height: 84px;
  }
}
