:root {
  color-scheme: light;
  --red: #dc2626;
  --red-dark: #991b1b;
  --gold: #f59e0b;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --panel: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: #ffffff;
  color: var(--text);
}

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

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

.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);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #fee2e2;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-box input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.header-search button,
.mobile-search button,
.search-box button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.25);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: var(--text);
}

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

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  font-weight: 700;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 10%, rgba(220, 38, 38, 0.34), transparent 32%), linear-gradient(135deg, #111827, #1f2937 46%, #111827);
  color: #fff;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.35;
}

.glow-red {
  width: 280px;
  height: 280px;
  right: 10%;
  top: 8%;
  background: #dc2626;
}

.glow-gold {
  width: 420px;
  height: 420px;
  left: 4%;
  bottom: -140px;
  background: #f59e0b;
}

.hero-container {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 48px 0;
}

.hero-slider {
  width: 100%;
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 48px;
  align-items: center;
  animation: fadeUp 0.55s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.hero-kicker {
  width: max-content;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.86);
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.28);
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  max-width: 690px;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta,
.hero-tags,
.tag-row,
.detail-meta,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.hero-tags span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

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

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  display: block;
  max-width: 420px;
  justify-self: center;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(1deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.03);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.quick-cats,
.spotlight-layout,
.list-page,
.category-grid,
.ranking-list,
.search-page,
.detail-layout {
  padding: 46px 0;
}

.quick-cats {
  display: grid;
  grid-template-columns: minmax(220px, 0.26fr) 1fr;
  gap: 26px;
  align-items: center;
}

.quick-title h2,
.section-heading h2,
.rank-panel h2,
.side-card h2 {
  margin: 0;
}

.quick-title p,
.page-hero p {
  color: var(--muted);
  line-height: 1.7;
}

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

.quick-links a,
.tag-cloud a,
.tag-row span {
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 800;
}

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

.spot-main {
  display: grid;
  gap: 48px;
}

.content-section {
  display: grid;
  gap: 20px;
}

.section-heading,
.rank-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.heading-line {
  display: inline-block;
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--red);
}

.more-link,
.rank-panel-head a {
  color: var(--red);
  font-weight: 800;
}

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

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

.movie-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover .poster-wrap {
  transform: translateY(-5px);
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.2);
}

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

.movie-card:hover img {
  transform: scale(1.06);
}

.poster-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 58%);
}

.pill {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.top-left {
  left: 10px;
  background: var(--red);
  color: #fff;
}

.top-right {
  right: 10px;
  background: var(--gold);
  color: #111827;
}

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

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

.poster-text {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #fff;
}

.poster-text strong,
.card-copy strong,
.ranking-copy strong,
.compact-card strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-text em,
.card-copy small,
.ranking-copy em,
.compact-card em {
  display: block;
  margin-top: 4px;
  color: #d1d5db;
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-copy {
  display: grid;
  gap: 7px;
}

.card-copy strong {
  line-height: 1.35;
}

.card-copy small {
  color: var(--muted);
  line-height: 1.5;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

.rank-panel {
  position: sticky;
  top: 90px;
  align-self: start;
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #fff;
  transform: translateX(3px);
}

.rank-no,
.ranking-index {
  color: var(--red);
  font-weight: 900;
}

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

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

.page-hero {
  background: linear-gradient(135deg, #111827, #312e81 52%, #7f1d1d);
  color: #fff;
}

.small-hero .container {
  padding: 64px 0;
}

.page-hero span {
  color: #fca5a5;
  font-weight: 900;
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: #e5e7eb;
}

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

.category-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-panel:hover {
  transform: translateY(-4px);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.category-panel strong {
  font-size: 22px;
}

.category-panel em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.filter-bar,
.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-bar input,
.search-box input {
  flex: 1 1 280px;
}

.empty-state,
.search-hint {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  text-align: center;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 56px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ranking-item img {
  width: 88px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-copy small {
  display: -webkit-box;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.heat {
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff1f2;
  color: var(--red);
  font-weight: 900;
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--red);
  font-weight: 800;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

.detail-card,
.side-card {
  border-radius: var(--radius);
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 800;
  font-size: 13px;
}

.detail-card h1 {
  margin: 18px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
}

.detail-card h2 {
  margin: 28px 0 10px;
}

.detail-card p {
  color: #374151;
  line-height: 1.86;
  text-align: justify;
}

.lead {
  font-size: 18px;
  color: #4b5563;
}

.tag-cloud {
  margin-top: 24px;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.detail-nav a {
  color: var(--red);
  font-weight: 800;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-card img {
  width: 112px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.category-side a {
  display: inline-block;
  margin-top: 12px;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.site-footer {
  margin-top: 28px;
  background: linear-gradient(135deg, #111827, #0f172a);
  color: #d1d5db;
}

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

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

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

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

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

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

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

  .hero-poster {
    max-width: 320px;
  }

  .rank-panel {
    position: static;
  }

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

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

  .header-inner {
    height: 62px;
  }

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

  .hero-container {
    min-height: auto;
    padding: 34px 0;
  }

  .hero-copy {
    gap: 16px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-poster {
    justify-self: start;
    max-width: 240px;
  }

  .quick-cats,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-item {
    grid-template-columns: 38px 70px 1fr;
  }

  .ranking-item img {
    width: 70px;
  }

  .heat {
    grid-column: 3;
    width: max-content;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }

  .compact-card {
    grid-template-columns: 96px 1fr;
  }

  .compact-card img {
    width: 96px;
  }
}
