:root {
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --yellow: #f59e0b;
  --green: #10b981;
  --ink: #111827;
  --muted: #6b7280;
  --light: #f9fafb;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  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(--ink);
  background: var(--light);
  line-height: 1.6;
}

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

img,
video {
  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: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
}

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

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

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

.nav-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.nav-search button,
.feature-search button,
.page-search button {
  border: 0;
  color: #ffffff;
  background: var(--red);
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.feature-search button:hover,
.page-search button:hover {
  background: var(--red-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  margin-left: auto;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #374151;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 54%, #fefce8 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(239, 68, 68, 0.18), transparent 32%),
    radial-gradient(circle at 84% 78%, rgba(249, 115, 22, 0.20), transparent 35%);
}

.hero-shell {
  position: relative;
  min-height: 610px;
  display: grid;
  align-items: center;
  padding: 56px 0;
}

.hero-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy {
  max-width: 650px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--red);
  background: rgba(239, 68, 68, 0.10);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 740px;
  margin: 0 0 24px;
  color: #4b5563;
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-tags,
.footer-tags,
.detail-tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.footer-tags a,
.detail-tag-links a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  border: 1px solid rgba(229, 231, 235, 0.9);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.24);
}

.btn-soft {
  color: #374151;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 430px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-poster .poster-bg {
  height: 100%;
}

.hero-poster span:last-child {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 2;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.hero-dots {
  display: flex;
  gap: 6px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: #d1d5db;
  box-shadow: none;
}

.hero-dots button.active {
  width: 24px;
  background: var(--red);
}

.stats-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 28px 0;
}

.stats-grid div {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  text-align: center;
}

.stats-grid strong {
  display: block;
  color: var(--red);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.section-white {
  background: #ffffff;
}

.soft-section {
  background: #f9fafb;
}

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

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 12px 0 10px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

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

.split-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.compact-head h2 {
  font-size: 30px;
}

.feature-search,
.page-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.feature-search input,
.page-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 18px;
  background: transparent;
}

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

.all-grid {
  align-items: stretch;
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-bg {
  display: block;
  min-height: 176px;
  background-image:
    linear-gradient(to top, rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.08)),
    var(--poster-image),
    linear-gradient(135deg, #991b1b, #f97316 54%, #facc15);
  background-size: cover;
  background-position: center;
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-bg,
.hero-poster:hover .poster-bg {
  transform: scale(1.05);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.card-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.movie-card-wide .poster-bg {
  min-height: 100%;
}

.movie-card-wide .card-body strong {
  min-height: auto;
}

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

.category-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 190px;
  border-radius: 20px;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-art {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to top, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.08)),
    var(--poster-image),
    linear-gradient(135deg, #7f1d1d, #fb923c);
  background-position: center;
  background-size: cover;
  transition: transform 0.3s ease;
}

.category-card:hover .category-art {
  transform: scale(1.08);
}

.category-card > span:last-child {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.category-card strong,
.category-card em {
  display: block;
}

.category-card strong {
  font-size: 20px;
}

.category-card em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.two-column {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 36px;
}

.rank-list,
.side-card-list,
.category-overview-list,
.ranking-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

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

.rank-title {
  font-weight: 850;
}

.rank-meta {
  grid-column: 2 / 3;
  color: var(--muted);
  font-size: 13px;
}

.rank-score {
  grid-row: 1 / span 2;
  grid-column: 3 / 4;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--red);
  font-weight: 800;
}

.page-main {
  background: #ffffff;
}

.page-hero {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
}

.small-hero::after,
.search-hero::after,
.channel-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(239, 68, 68, 0.18), transparent 34%),
    radial-gradient(circle at 90% 60%, rgba(249, 115, 22, 0.20), transparent 36%);
  pointer-events: none;
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 1;
}

.channel-hero,
.detail-hero {
  color: #ffffff;
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.48)),
    var(--poster-image),
    linear-gradient(135deg, #111827, #7f1d1d);
  background-position: center;
  background-size: cover;
}

.channel-hero p,
.detail-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: inherit;
  opacity: 0.82;
  font-size: 14px;
}

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

.category-overview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 24px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.overview-main h2 {
  margin: 14px 0 8px;
  font-size: 28px;
}

.overview-main p {
  margin: 0 0 16px;
  color: var(--muted);
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a {
  border-radius: 999px;
  background: #f3f4f6;
  padding: 6px 10px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 118px 1fr 72px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.ranking-position {
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.ranking-cover {
  min-height: 72px;
  border-radius: 16px;
}

.ranking-info strong,
.ranking-info em,
.ranking-info small {
  display: block;
}

.ranking-info strong {
  font-size: 18px;
}

.ranking-info em {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0;
  color: var(--muted);
  font-style: normal;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ranking-info small {
  color: #9ca3af;
}

.ranking-score {
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  padding: 62px 0 76px;
}

.detail-title-block {
  max-width: 860px;
}

.detail-main {
  background: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
}

.player-card,
.article-card,
.info-panel {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  text-align: center;
  background-image:
    linear-gradient(rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.80)),
    var(--poster-image),
    linear-gradient(135deg, #111827, #7f1d1d);
  background-position: center;
  background-size: cover;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.34);
  cursor: pointer;
}

.play-button span {
  transform: translateX(3px);
  font-size: 34px;
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 36px);
}

.player-cover em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.article-card {
  margin-top: 22px;
  padding: 28px;
}

.article-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.info-panel {
  padding: 22px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.info-panel dt {
  color: #9ca3af;
  font-weight: 700;
}

.info-panel dd {
  margin: 0;
  color: #374151;
  font-weight: 700;
}

.mini-related {
  display: grid;
  gap: 10px;
}

.mini-related a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  background: #f9fafb;
  padding: 10px 12px;
}

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

.mini-related em {
  color: var(--red);
  font-style: normal;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0;
}

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

.footer-grid p {
  color: #9ca3af;
}

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

.footer-grid a:hover {
  color: #ffffff;
}

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

.footer-tags a {
  display: inline-flex;
  margin: 0;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

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

.search-empty {
  grid-column: 1 / -1;
  border-radius: 24px;
  background: #f9fafb;
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

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

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

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

  .hero-slide,
  .two-column,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 5;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
  }

  .hero-shell {
    min-height: 720px;
    padding-bottom: 80px;
  }

  .hero-slide {
    gap: 26px;
  }

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

  .hero-controls {
    left: 16px;
  }

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

  .split-head {
    align-items: stretch;
    flex-direction: column;
  }

  .feature-search,
  .page-search {
    min-width: 0;
    width: 100%;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .movie-card-wide .poster-bg {
    min-height: 176px;
  }

  .category-overview-card,
  .ranking-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    flex-direction: column;
  }

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

  .ranking-score {
    text-align: left;
  }
}

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

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

  .section {
    padding: 52px 0;
  }

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

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

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