:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #f1f5f9;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fafc;
  font-family: 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%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.22);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  background: #fff;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  opacity: 0.88;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff7ad;
}

.header-search {
  position: relative;
  width: min(310px, 24vw);
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 11px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.86);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(390px, 88vw);
  display: none;
  overflow: hidden;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: block;
}

.search-panel a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.search-panel a:hover {
  background: #fff7ed;
}

.search-panel img {
  width: 54px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.search-panel strong {
  display: block;
  font-size: 14px;
}

.search-panel span {
  color: var(--muted);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
}

.hero-kicker,
.page-hero p {
  margin: 0 0 12px;
  color: #fed7aa;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2 {
  width: min(820px, 100%);
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-content strong {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 13px;
  color: #fff;
  background: rgba(249, 115, 22, 0.82);
  border-radius: 999px;
}

.hero-content p:not(.hero-kicker) {
  width: min(760px, 100%);
  margin: 0 0 30px;
  color: #e5e7eb;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 999px;
  font-size: 34px;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section {
  padding: 72px max(16px, calc((100vw - 1200px) / 2));
}

.white-section {
  background: #fff;
}

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

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

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

.section-more {
  color: var(--red);
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.card-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-category,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  right: 12px;
  left: auto;
  background: rgba(0, 0, 0, 0.62);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

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

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: #64748b;
  font-size: 13px;
}

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

.horizontal-card {
  flex-direction: row;
}

.horizontal-card .poster-frame {
  width: 210px;
  flex: 0 0 210px;
  aspect-ratio: auto;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  content: "";
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 999px;
  opacity: 0.13;
}

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

.category-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 16px;
  font-weight: 900;
}

.category-tile h3 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  padding: 70px max(16px, calc((100vw - 1200px) / 2));
  color: #fff;
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.45), transparent 32%), linear-gradient(135deg, var(--red-dark), var(--orange));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}

.page-hero span {
  display: block;
  width: min(760px, 100%);
  color: #ffedd5;
  font-size: 18px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.filter-button {
  border: 0;
  color: #475569;
  background: #f8fafc;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.filter-button.is-active,
.filter-button:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  box-shadow: none;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 38px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #fff;
  border-radius: 999px;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.pagination a.is-active,
.pagination a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  box-shadow: none;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.82));
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
  padding: 58px 0;
}

.detail-cover {
  overflow: hidden;
  margin: 0;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #fed7aa;
  font-size: 14px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}

.detail-one-line {
  width: min(820px, 100%);
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
}

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

.player-section {
  background: #0f172a;
}

.player-shell {
  position: relative;
  width: min(1100px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: #000;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 36px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
}

.player-cover strong {
  width: min(720px, 90%);
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.15;
}

.player-status {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
}

.detail-text article {
  width: min(900px, 100%);
  margin: 0 auto;
  color: #334155;
  font-size: 18px;
}

.detail-text h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 30px;
}

.detail-text p + h2 {
  margin-top: 34px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
  padding: 54px max(16px, calc((100vw - 1200px) / 2)) 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 8px 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 980px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .mobile-search {
    position: relative;
  }

  .hero-carousel {
    height: 520px;
  }

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

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

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

@media (max-width: 680px) {
  .nav-wrap {
    height: 66px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    height: 470px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

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

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

  .horizontal-card {
    flex-direction: column;
  }

  .horizontal-card .poster-frame {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 9;
  }

  .detail-layout {
    min-height: auto;
    padding: 38px 0;
  }

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