:root {
  --bg: #090b10;
  --panel: #111827;
  --panel-soft: rgba(31, 41, 55, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8fafc;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --blue: #3b82f6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.16), transparent 32%), linear-gradient(180deg, #111827 0%, #030712 42%, #111827 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  border-bottom: 1px solid rgba(75, 85, 99, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand {
  font-size: 25px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.34);
  font-size: 14px;
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.main-nav a,
.mobile-panel a,
.footer-links a {
  color: var(--soft);
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: #fff;
}

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

.header-search input,
.mobile-search input,
.filter-box input,
.search-hero input {
  color: #fff;
  background: rgba(31, 41, 55, 0.96);
  border: 1px solid rgba(107, 114, 128, 0.72);
  outline: none;
  border-radius: 999px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
  padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-box input:focus,
.search-hero input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-secondary,
.search-hero button,
.player-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.header-search button:hover,
.mobile-search button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.search-hero button:hover,
.player-start:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.07);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  font-size: 24px;
  padding: 8px 10px;
  border-radius: 10px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.98);
  padding: 16px 20px 20px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.mobile-search input {
  flex: 1;
  padding: 11px 16px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 35%, rgba(2, 6, 23, 0.24) 100%), radial-gradient(circle at 15% 40%, rgba(220, 38, 38, 0.45), transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 100px 20px 76px;
  display: flex;
  align-items: flex-end;
}

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

.hero-kicker,
.card-badge,
.card-time,
.detail-chip,
.rank-index,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-kicker {
  gap: 8px;
  padding: 8px 15px;
  margin-bottom: 18px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32);
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 900px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
  margin: 0 0 18px;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.65);
}

.hero-copy p {
  max-width: 760px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
  margin: 0 0 28px;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 12px;
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  right: 40px;
  bottom: 38px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--red);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
}

.stack {
  display: grid;
  gap: 64px;
}

.section-panel {
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.23), rgba(88, 28, 135, 0.23));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.section-panel.warm {
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.24), rgba(154, 52, 18, 0.24));
}

.section-panel.gold {
  background: linear-gradient(90deg, rgba(113, 63, 18, 0.24), rgba(154, 52, 18, 0.24));
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head p {
  color: var(--muted);
  margin-top: 8px;
}

.section-link {
  color: #60a5fa;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card-wrap,
.movie-card,
.poster-box,
.card-content,
.movie-row,
.movie-row-cover {
  min-width: 0;
}

.movie-card {
  display: grid;
  overflow: hidden;
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.35);
}

.poster-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.32);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 58%);
  opacity: 0.78;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.card-time {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  font-size: 12px;
}

.card-content {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-content strong,
.movie-row-title {
  color: #fff;
  font-size: 17px;
  line-height: 1.38;
  transition: color 0.2s ease;
}

.movie-card:hover strong,
.movie-row:hover .movie-row-title {
  color: #f87171;
}

.card-content em,
.movie-row-body p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  font-size: 13px;
  gap: 8px;
}

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

.scroller {
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.scroller-track {
  display: flex;
  gap: 18px;
}

.scroller-track .movie-card-wrap {
  flex: 0 0 288px;
}

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

.rank-card,
.movie-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover,
.movie-row:hover {
  background: rgba(31, 41, 55, 0.96);
  transform: translateY(-2px);
}

.rank-index {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-size: 20px;
}

.rank-cover,
.movie-row-cover {
  flex: 0 0 128px;
  height: 78px;
  overflow: hidden;
  border-radius: 12px;
}

.rank-info,
.movie-row-body {
  flex: 1;
  min-width: 0;
}

.rank-info a {
  display: block;
  color: #fff;
  font-weight: 800;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info p {
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.94), rgba(17, 24, 39, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(248, 113, 113, 0.72);
}

.category-card h2,
.category-card h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.6;
}

.category-pill {
  width: max-content;
  margin-top: 18px;
  padding: 8px 12px;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.16);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 22% 18%, rgba(220, 38, 38, 0.35), transparent 30%), linear-gradient(90deg, rgba(127, 29, 29, 0.38), rgba(30, 41, 59, 0.78));
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 66px 20px 54px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  margin-bottom: 14px;
}

.page-hero p {
  max-width: 790px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.75;
}

.filter-box,
.search-hero form {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.filter-box input,
.search-hero input {
  width: min(520px, 100%);
  padding: 13px 18px;
}

.search-hero button {
  padding: 13px 22px;
}

.detail-hero {
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(3, 7, 18, 0.9)), radial-gradient(circle at 10% 5%, rgba(220, 38, 38, 0.24), transparent 32%);
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 20px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
}

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

.breadcrumb a {
  color: #fca5a5;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  margin-bottom: 18px;
}

.detail-title p {
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-chip {
  padding: 8px 12px;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.18);
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.player-section,
.detail-text,
.detail-related {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.16), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  width: 92px;
  height: 92px;
  font-size: 34px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.detail-box {
  padding: 26px;
  border-radius: 24px;
  background: rgba(31, 41, 55, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-box h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.detail-box p {
  color: #d1d5db;
  line-height: 1.85;
}

.search-results {
  margin-top: 30px;
}

.search-empty {
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: rgba(31, 41, 55, 0.68);
}

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

  .mobile-toggle {
    display: inline-flex;
  }

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

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

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

@media (max-width: 760px) {
  .brand {
    font-size: 20px;
  }

  .hero-slider,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding-top: 78px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 24px;
  }

  .container {
    padding: 34px 16px;
  }

  .section-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .section-head,
  .filter-box,
  .search-hero form {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.compact,
  .ranking-grid,
  .category-grid,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

  .rank-card,
  .movie-row {
    align-items: flex-start;
  }

  .rank-cover,
  .movie-row-cover {
    flex-basis: 112px;
    height: 72px;
  }

  .scroller-track .movie-card-wrap {
    flex-basis: 248px;
  }

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

.site-footer {
  margin-top: 44px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), #000);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
}

.footer-inner h2 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 14px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  color: #6b7280;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
