:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --pink: #db2777;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}

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

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

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--primary);
  background: #fee2e2;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
}

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

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  color: #475569;
  font-weight: 650;
}

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

.hero-shell {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.6s ease, transform 1.1s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-content {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 24px 88px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 22px rgba(220, 38, 38, 0.24);
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-shadow: 0 16px 32px rgba(0, 0, 0, 0.38);
}

.hero-one-line {
  max-width: 720px;
  margin: 0 0 12px;
  color: #e2e8f0;
  font-size: clamp(17px, 2.1vw, 22px);
  font-weight: 650;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 16px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

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

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.34);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 38px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: #ffffff;
}

.quick-panel {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: -44px auto 0;
  padding: 0 24px;
}

.quick-panel-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.quick-panel p {
  margin: 0;
  color: #cbd5e1;
}

.quick-links a {
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-weight: 750;
}

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

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

.section-head h2,
.content-page h2,
.detail-card h2,
.info-side h2 {
  margin: 10px 0 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-head a {
  color: var(--primary);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-card {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background-color: #1e293b;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  opacity: 0;
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.movie-card h3 a:hover,
.ranking-row h2 a:hover {
  color: var(--primary);
}

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

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

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

.movie-card .tag-row span,
.detail-tags span {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.split-main .movie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rank-card,
.detail-card,
.side-card,
.content-page,
.search-panel {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.rank-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.rank-card-head span {
  font-size: 22px;
  font-weight: 850;
}

.rank-card-head a {
  color: var(--primary);
  font-weight: 800;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li + li {
  border-top: 1px solid var(--line);
}

.rank-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
}

.rank-list span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 30% 20%, rgba(220, 38, 38, 0.42), transparent 30%), linear-gradient(135deg, #020617, #7f1d1d);
}

.compact-hero {
  min-height: 320px;
  display: flex;
  align-items: end;
  padding: 96px 24px 48px;
  background-position: center;
  background-size: cover;
}

.compact-hero > div {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.compact-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
}

.category-tile span {
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
}

.category-tile strong {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.ranking-cover {
  position: relative;
  min-height: 136px;
  background-position: center;
  background-size: cover;
  border-radius: 16px;
}

.ranking-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 10px;
  font-weight: 900;
}

.ranking-row h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.ranking-row p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.14);
}

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

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 800;
}

.pagination a.is-active,
.pagination a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  border-color: transparent;
}

.detail-hero {
  min-height: 440px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 96px 24px 64px;
}

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

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

.detail-title-row h1 {
  max-width: 900px;
  margin: 16px 0 12px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.detail-title-row p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  font-size: 19px;
}

.detail-layout {
  max-width: 1280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin: -42px auto 0;
  padding: 0 24px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.45));
}

.video-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.42);
  font-size: 34px;
  transition: transform 0.22s ease;
}

.video-overlay:hover span {
  transform: scale(1.06);
}

.movie-player-shell.is-playing .video-overlay {
  display: none;
}

.video-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.92);
  border-radius: 12px;
  font-weight: 700;
}

.video-message:not(:empty) {
  display: block;
}

.detail-card {
  padding: 26px;
}

.detail-card p,
.content-page p {
  margin: 14px 0 0;
  color: #475569;
  font-size: 16px;
}

.review-card {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.poster-side {
  aspect-ratio: 2 / 3;
  background-color: #1e293b;
  background-position: center;
  background-size: cover;
}

.info-side {
  padding: 22px;
}

.info-side dl {
  margin: 18px 0 0;
}

.info-side dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.info-side dt {
  color: var(--muted);
}

.info-side dd {
  margin: 0;
  font-weight: 800;
}

.detail-tags {
  margin-top: 18px;
}

.related-section {
  padding-bottom: 64px;
}

.content-page {
  max-width: 900px;
  margin: 64px auto;
  padding: 32px;
}

.content-page h2 + p {
  margin-bottom: 28px;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  margin: 0 auto;
  padding: 36px 24px;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-links a {
  color: #e2e8f0;
  font-weight: 750;
}

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

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

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

  .rank-card {
    position: static;
  }

  .detail-side {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .nav-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero-shell {
    min-height: 620px;
  }

  .hero-control {
    top: auto;
    bottom: 72px;
    transform: none;
  }

  .hero-control:hover {
    transform: scale(1.05);
  }

  .quick-panel-inner,
  .search-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .poster-side {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-content {
    padding: 0 18px 96px;
  }

  .hero-summary {
    display: none;
  }

  .section-block,
  .quick-panel,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .ranking-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .ranking-cover {
    min-height: 110px;
  }

  .compact-hero {
    padding: 84px 16px 40px;
  }

  .detail-hero-inner {
    padding: 84px 16px 54px;
  }
}
