:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7f7;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --gold: #facc15;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  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(--text);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 38%, #fff 100%);
}

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

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

.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.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
  background: linear-gradient(90deg, #dc2626, #7f1d1d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.25);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  font-weight: 700;
  color: #374151;
}

.desktop-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--brand);
  transform: translateY(-1px);
}

.nav-split {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  padding: 4px;
  min-width: 260px;
}

.header-search input,
.mobile-search input,
.local-search,
.filter-select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.header-search input,
.mobile-search input {
  width: 100%;
  padding: 8px 10px 8px 14px;
}

.header-search button,
.mobile-search button,
.btn,
.hero-cta,
.player-cover span,
.load-more {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 8px 15px;
}

.header-search button:hover,
.mobile-search button:hover,
.btn:hover,
.hero-cta:hover,
.load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.32);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #fff;
  font-size: 24px;
  color: var(--brand);
}

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

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

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff5f5;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 75% 18%, rgba(220, 38, 38, 0.36), transparent 26%), radial-gradient(circle at 12% 72%, rgba(234, 179, 8, 0.24), transparent 28%), linear-gradient(135deg, #111827, #1f2937 48%, #111827);
  color: #fff;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
}

.hero-glow::before,
.hero-glow::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(70px);
}

.hero-glow::before {
  right: 8%;
  top: 18%;
  background: rgba(220, 38, 38, 0.55);
}

.hero-glow::after {
  left: 8%;
  bottom: 6%;
  background: rgba(234, 179, 8, 0.28);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.68fr);
  gap: 42px;
  align-items: center;
  padding: 76px 0 64px;
}

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

.hero-badge,
.kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.88);
  box-shadow: 0 18px 45px rgba(127, 29, 29, 0.22);
  font-size: 14px;
  font-weight: 900;
}

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

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

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

.hero-meta span,
.detail-meta span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-cta,
.btn,
.load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

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

.hero-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding-bottom: 36px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  color: #fff;
  text-align: left;
}

.hero-mini.active {
  background: rgba(220, 38, 38, 0.84);
}

.hero-mini img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini strong,
.hero-mini span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-mini strong {
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.hero-mini span {
  -webkit-line-clamp: 1;
  color: #e5e7eb;
  font-size: 12px;
  margin-top: 4px;
}

.section {
  padding: 48px 0;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-title::before {
  content: "";
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand);
}

.section-desc {
  max-width: 680px;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.8;
}

.view-more {
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  font-weight: 900;
}

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

.movie-card {
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.86);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: auto;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.88);
  transform: scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 7px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a,
.rank-text strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 40px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-tags span {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fee2e2;
}

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

.category-tile {
  padding: 22px;
  min-height: 150px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #fff5f5);
  border: 1px solid #fee2e2;
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.06);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-num {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong {
  font-size: 17px;
  margin-bottom: 8px;
}

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

.page-hero {
  padding: 54px 0;
  background: linear-gradient(135deg, #fff1f2, #fff 54%, #fefce8);
  border-bottom: 1px solid var(--line);
}

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

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.local-search,
.filter-select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #fff;
}

.detail-hero {
  padding: 44px 0;
  background: radial-gradient(circle at 16% 18%, rgba(220, 38, 38, 0.3), transparent 24%), linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #d1d5db;
  margin-bottom: 16px;
}

.detail-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-hero p {
  color: #e5e7eb;
  line-height: 1.9;
  font-size: 17px;
}

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

.player-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  filter: blur(1px);
}

.player-cover span {
  position: relative;
  padding: 16px 28px;
  font-size: 18px;
}

.player-cover.hidden {
  display: none;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.sidebar-list {
  display: grid;
  gap: 12px;
}

.site-footer {
  margin-top: 40px;
  padding: 46px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 540px;
  color: #9ca3af;
  line-height: 1.8;
}

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

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .header-search {
    display: none;
  }

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

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

@media (max-width: 840px) {
  .hero-inner,
  .detail-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .detail-cover {
    max-width: 320px;
  }
}

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

  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-inner {
    padding: 48px 0 34px;
  }

  .hero-strip,
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .section-head {
    display: block;
  }

  .view-more {
    margin-top: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .detail-hero {
    padding: 30px 0;
  }
}
