* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #020617;
  --dark-2: #0f172a;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.16);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.site-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.35);
}

.brand-text {
  font-size: 21px;
  line-height: 1;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #f87171;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-bar input {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  padding: 11px 16px;
  min-width: 230px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16);
}

.nav-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.section-more,
.pagination a {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.nav-search button,
.mobile-search button,
.primary-button {
  color: #ffffff;
  background: var(--red);
  padding: 11px 18px;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.32);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 26px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: #1e293b;
  padding: 16px 24px 22px;
}

.mobile-panel.open {
  display: block;
}

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

.mobile-search input {
  width: 100%;
  min-width: 0;
}

.mobile-links {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(90deg, #0f172a, #7f1d1d, #9a3412);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.hero-layer,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(127, 29, 29, 0.72), rgba(2, 6, 23, 0.32)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.eyebrow {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red);
}

.hero h1,
.detail-info h1,
.page-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #64748b;
  font-size: 14px;
}

.hero-meta,
.detail-meta {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 16px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 11px;
}

.card-meta span {
  background: #f1f5f9;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  padding: 6px 11px;
  font-size: 13px;
}

.tag-row span {
  background: #fee2e2;
  color: #991b1b;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
}

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

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

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

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

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

.quick-pills,
.content-section,
.category-section,
.rank-list,
.detail-main,
.player-section,
.filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 0;
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill-link,
.category-tile {
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  padding: 12px 18px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, color 0.2s ease;
}

.pill-link:hover,
.category-tile:hover {
  color: var(--red);
  transform: translateY(-2px);
}

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

.section-heading h2,
.category-section h2,
.story-card h2 {
  margin: 10px 0 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-more,
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  background: #ffffff;
  padding: 12px 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.section-more:hover,
.pagination a:hover,
.pagination a.current {
  color: #ffffff;
  background: var(--red);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 800;
  line-height: 1.45;
  color: #0f172a;
}

.card-title:hover {
  color: var(--red);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.card-body .tag-row {
  margin: 12px 0 0;
}

.card-body .tag-row span {
  font-size: 12px;
  padding: 4px 8px;
}

.focus-section {
  padding-bottom: 52px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.rail-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  scroll-snap-align: start;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.rail-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 56%);
}

.rail-card span {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, #0f172a, #7f1d1d, #ea580c);
  color: #ffffff;
  padding: 88px 24px;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 45%;
  height: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(8px);
}

.page-hero > div {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero .eyebrow {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.small-hero {
  padding-top: 66px;
  padding-bottom: 66px;
}

.filter-bar {
  padding-top: 30px;
}

.filter-bar label {
  display: grid;
  gap: 10px;
  max-width: 520px;
  color: #334155;
  font-weight: 800;
}

.filter-bar input {
  width: 100%;
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.wide-section {
  padding-bottom: 54px;
}

.empty-state {
  display: none;
  border-radius: 18px;
  background: #ffffff;
  color: #64748b;
  padding: 28px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.empty-state.visible {
  display: block;
}

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

.category-section {
  padding-bottom: 10px;
}

.category-section:last-of-type {
  padding-bottom: 58px;
}

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

.category-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  padding: 20px;
  font-size: 18px;
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 16px;
  padding-bottom: 58px;
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 92px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 20px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #1e293b;
}

.rank-title {
  display: inline-flex;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.rank-title:hover {
  color: var(--red);
}

.rank-row p {
  margin: 0 0 10px;
  color: #64748b;
  line-height: 1.65;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
  color: #ffffff;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 58px 24px;
  display: grid;
  grid-template-columns: 330px 1fr;
  align-items: center;
  gap: 42px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  background: #1e293b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
  max-width: 840px;
}

.detail-line {
  color: rgba(255, 255, 255, 0.84);
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.15), rgba(2, 6, 23, 0.66));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 46px rgba(220, 38, 38, 0.42);
}

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

.detail-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-top: 34px;
}

.story-card {
  border-radius: 22px;
  background: #ffffff;
  padding: 30px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.story-card p {
  margin: 16px 0 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 56px;
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #cbd5e1;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
}

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

.site-footer p {
  margin: 0;
  line-height: 1.75;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 20px 24px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 590px;
  }

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

  .detail-wrap {
    grid-template-columns: 220px 1fr;
    gap: 26px;
  }

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

@media (max-width: 700px) {
  .site-nav {
    height: 64px;
    padding: 0 16px;
  }

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

  .hero-content,
  .quick-pills,
  .content-section,
  .category-section,
  .rank-list,
  .detail-main,
  .player-section,
  .filter-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero p,
  .page-hero p,
  .detail-line {
    font-size: 17px;
  }

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

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

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

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

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

  .rank-row {
    grid-template-columns: 44px 72px 1fr;
    gap: 12px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .rank-poster {
    width: 72px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .all-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .card-title {
    min-height: auto;
  }
}
