:root {
  --bg: #f7f8fb;
  --paper: #ffffff;
  --ink: #14151a;
  --muted: #667085;
  --line: #e5e7eb;
  --red: #dc2626;
  --orange: #f97316;
  --yellow: #facc15;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img {
  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: 60;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 28px;
}

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

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 24px rgba(220, 38, 38, 0.25);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

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

.nav-link,
.mobile-link {
  padding: 9px 13px;
  color: #374151;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--red);
  background: #fff1f2;
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input,
.mobile-search input,
.search-page-form input {
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.header-search button {
  padding: 10px 16px;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #111827;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}

.mobile-search button {
  padding: 0 16px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.28), transparent 34%), linear-gradient(135deg, #dc2626 0%, #f97316 58%, #facc15 120%);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(12px);
}

.hero-grid {
  position: relative;
  z-index: 1;
  min-height: 560px;
  padding: 74px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--red);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 630px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

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

.primary-button,
.secondary-button,
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 52px;
  padding: 0 28px;
  color: var(--red);
  background: #fff;
  box-shadow: 0 18px 28px rgba(127, 29, 29, 0.18);
}

.secondary-button {
  min-height: 52px;
  padding: 0 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 120px));
  gap: 14px;
  margin-top: 34px;
}

.hero-stats span {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-stats strong,
.hero-stats small {
  display: block;
}

.hero-stats strong {
  font-size: 24px;
  line-height: 1;
}

.hero-stats small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-showcase {
  position: relative;
}

.hero-slide {
  display: none;
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(127, 29, 29, 0.35);
  isolation: isolate;
}

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

.hero-poster {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.8) 100%);
  z-index: -1;
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px;
}

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

.hero-tags span {
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.85);
}

.hero-caption h2 {
  margin: 16px 0 8px;
  font-size: 32px;
  line-height: 1.15;
}

.hero-caption p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-link {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

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

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

.section-block {
  padding: 52px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading a {
  color: var(--red);
  font-weight: 700;
}

.inline-heading {
  margin-bottom: 18px;
}

.chip-row,
.side-links,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip-row a,
.side-links a,
.filter-bar button,
.pager a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #374151;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.chip-row a:hover,
.side-links a:hover,
.filter-bar button:hover,
.filter-bar button.is-active,
.pager a:hover {
  color: var(--red);
  border-color: #fecaca;
  box-shadow: var(--soft-shadow);
  transform: translateY(-1px);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-card-horizontal .poster-link {
  width: 148px;
  min-width: 148px;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

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

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

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.88);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--red);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-content {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

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

.tag-line {
  margin-top: 12px;
}

.tag-line span,
.detail-tags a {
  padding: 5px 9px;
  color: #b91c1c;
  font-size: 12px;
  border-radius: 999px;
  background: #fff1f2;
}

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

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

.movie-card-horizontal {
  display: flex;
  gap: 14px;
  padding: 12px;
}

.movie-card-horizontal .card-content {
  padding: 0;
}

.movie-card-horizontal .movie-title {
  min-height: auto;
  font-size: 16px;
}

.movie-card-horizontal p {
  min-height: auto;
}

.meta-line {
  margin-top: 9px;
  color: #6b7280;
  font-size: 13px;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #c4c7ce;
}

.rank-card,
.side-card,
.detail-card,
.player-card,
.rank-side {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-card,
.side-card,
.rank-side {
  padding: 22px;
}

.mini-rank {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-rank a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.mini-rank strong {
  color: var(--red);
  font-size: 18px;
}

.mini-rank span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

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

.site-footer {
  margin-top: 44px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 52px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}

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

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

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

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

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

.page-main {
  min-height: 58vh;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #ea580c 65%, #f59e0b);
}

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

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

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

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.detail-crumbs .crumb {
  margin: 0;
  color: #6b7280;
}

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

.detail-crumbs .crumb a:hover {
  color: var(--red);
}

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

.category-tile,
.catalog-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-tile {
  min-height: 120px;
}

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

.category-tile span,
.catalog-tile strong {
  display: block;
  color: #111827;
  font-size: 20px;
  font-weight: 850;
}

.category-tile p,
.catalog-tile span {
  margin: 12px 0 0;
  color: var(--muted);
}

.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}

.pager:last-child {
  margin: 30px 0 0;
}

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

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.rank-number {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-row {
  display: flex;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.rank-poster {
  width: 160px;
  min-width: 160px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.rank-title {
  display: inline-block;
  color: #111827;
  font-size: 19px;
  font-weight: 850;
}

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

.rank-info p {
  margin: 7px 0 0;
  color: var(--muted);
}

.rank-side {
  position: sticky;
  top: 96px;
}

.rank-side h2 {
  margin: 0 0 16px;
}

.search-page-form {
  display: flex;
  max-width: 720px;
  overflow: hidden;
  margin-top: 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 17px 20px;
}

.search-page-form button {
  padding: 0 28px;
  font-weight: 800;
}

.filter-bar {
  margin-bottom: 18px;
}

.filter-bar button {
  cursor: pointer;
}

.search-status {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 700;
}

.detail-crumbs {
  padding: 16px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  padding: 30px 0 8px;
}

.detail-primary {
  display: grid;
  gap: 22px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-meta {
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
}

.lead-text {
  margin: 22px 0;
  color: #374151;
  font-size: 19px;
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 28px;
}

.article-section {
  margin-top: 24px;
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.article-section p {
  margin: 0;
  color: #374151;
  text-align: justify;
  white-space: pre-line;
}

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

.side-card h2 {
  margin: 0 0 18px;
}

.compact-list .movie-card-horizontal {
  box-shadow: none;
  border: 1px solid var(--line);
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

  .detail-side,
  .rank-side {
    position: static;
  }

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

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

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

  .menu-button {
    display: block;
  }

  .header-inner {
    min-height: 66px;
    gap: 14px;
  }

  .brand-text small {
    display: none;
  }

  .hero-grid {
    min-height: auto;
    padding: 48px 0;
    grid-template-columns: 1fr;
  }

  .hero-slide {
    min-height: 380px;
  }

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

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

  .rank-row,
  .movie-card-horizontal {
    flex-direction: column;
  }

  .movie-card-horizontal .poster-link,
  .rank-poster {
    width: 100%;
    min-width: 0;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-number {
    min-height: 42px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-mark,
  .footer-brand span {
    width: 38px;
    height: 38px;
  }

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

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-summary,
  .page-hero p:not(.eyebrow),
  .lead-text {
    font-size: 16px;
  }

  .hero-actions,
  .search-page-form {
    flex-direction: column;
  }

  .search-page-form button {
    min-height: 48px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-card {
    padding: 20px;
  }

  .player-overlay span {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
