:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-soft: #11131c;
  --panel: #171a25;
  --panel-strong: #202434;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a6adbb;
  --subtle: #717889;
  --accent: #ef4444;
  --accent-dark: #b91c1c;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 13, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 10px 34px rgba(239, 68, 68, 0.34);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a {
  padding: 10px 13px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(239, 68, 68, 0.16);
}

.menu-button {
  display: none;
  border: 0;
  color: #fff;
  background: var(--panel);
  border-radius: 12px;
  font-size: 22px;
  width: 44px;
  height: 44px;
}

main {
  overflow: hidden;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 720px;
  padding: 46px 0 78px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
}

.hero-bg::before {
  width: 420px;
  height: 420px;
  left: -110px;
  top: 80px;
  background: rgba(239, 68, 68, 0.25);
}

.hero-bg::after {
  width: 360px;
  height: 360px;
  right: -40px;
  top: 160px;
  background: rgba(245, 158, 11, 0.14);
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 420px;
  gap: 28px;
  align-items: stretch;
}

.hero-slider {
  position: relative;
  min-height: 590px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: #10131e;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(7, 8, 13, 0.96) 0%, rgba(7, 8, 13, 0.88) 72%, rgba(7, 8, 13, 0) 100%);
}

.hero-kicker {
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.28);
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 a:hover {
  color: #fecaca;
}

.hero p {
  color: var(--muted);
  max-width: 620px;
  font-size: 18px;
  margin: 22px 0 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 6px 11px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 15px 32px rgba(239, 68, 68, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.36);
}

.btn-secondary {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-image {
  min-height: 590px;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 13, 0), rgba(7, 8, 13, 0.44)),
    linear-gradient(270deg, rgba(7, 8, 13, 0), rgba(7, 8, 13, 0.28));
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-panel,
.hot-panel,
.category-card,
.info-panel,
.detail-panel,
.player-card {
  border: 1px solid var(--line);
  background: rgba(17, 19, 28, 0.78);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.search-panel {
  padding: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 16px;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
}

.search-box input::placeholder {
  color: var(--subtle);
}

.hot-panel {
  padding: 24px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 22px;
}

.panel-title a {
  color: #fecaca;
  font-size: 14px;
}

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

.hot-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.hot-item:hover {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.hot-index {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  font-weight: 800;
}

.hot-name {
  min-width: 0;
}

.hot-name strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hot-name span,
.hot-score {
  color: var(--muted);
  font-size: 13px;
}

.slider-dots {
  position: absolute;
  left: 64px;
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.slider-dot {
  width: 34px;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.slider-dot.active {
  background: var(--accent);
}

.section {
  padding: 64px 0 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(23, 26, 37, 0.9);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(255, 255, 255, 0.05));
  overflow: hidden;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
  opacity: 0;
  transition: 0.2s ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.card-body {
  padding: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--subtle);
  font-size: 12px;
  margin-bottom: 8px;
}

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
}

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

.movie-card h3 a:hover {
  color: #fecaca;
}

.movie-card p {
  min-height: 48px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

.compact .card-body {
  padding: 12px;
}

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

.category-card {
  overflow: hidden;
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.38);
}

.category-card .cover {
  height: 170px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(255, 255, 255, 0.05));
}

.category-card .content {
  padding: 18px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 70px 0 24px;
}

.page-hero-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 44px;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(245, 158, 11, 0.08)),
    rgba(17, 19, 28, 0.86);
  box-shadow: var(--shadow);
}

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

.page-hero p {
  max-width: 780px;
  color: var(--muted);
  margin: 12px 0 0;
}

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

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

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

.player-card {
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.56));
}

.play-overlay.hidden {
  display: none;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 24px 58px rgba(239, 68, 68, 0.35);
  font-size: 34px;
  padding-left: 5px;
}

.detail-panel {
  padding: 30px;
}

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-intro {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 22px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.article-body h2 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.article-body p {
  margin: 0 0 16px;
  color: #d7dae2;
}

.side-cover {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.side-cover .poster-large {
  aspect-ratio: 2 / 3;
}

.side-cover .info {
  padding: 18px;
}

.side-cover .info h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.side-cover .info p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
}

.related-list a:hover {
  border-color: rgba(239, 68, 68, 0.38);
}

.related-list .thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.related-list strong {
  display: block;
  line-height: 1.4;
}

.related-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.site-footer {
  margin-top: 82px;
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 13, 0.65);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
}

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid a:not(.brand) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--subtle);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.empty-message {
  display: none;
  padding: 38px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.empty-message.show {
  display: block;
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 820px) {
  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: 22px;
    background: rgba(17, 19, 28, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  body.menu-open .nav-links {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 26px;
  }

  .hero-slider {
    min-height: 680px;
  }

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

  .hero-content {
    padding: 46px 26px 34px;
    justify-content: end;
    min-height: 680px;
    background: linear-gradient(180deg, rgba(7, 8, 13, 0.18), rgba(7, 8, 13, 0.96) 58%);
  }

  .hero-image {
    position: absolute;
    inset: 0;
    min-height: 100%;
  }

  .slider-dots {
    left: 26px;
    bottom: 24px;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

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

  .page-hero-card {
    padding: 28px;
  }

  .detail-panel {
    padding: 22px;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .container,
  .footer-grid,
  .copyright {
    width: min(100% - 24px, 1240px);
  }

  .brand {
    font-size: 18px;
  }

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

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

  .movie-card p {
    display: none;
  }

  .card-body {
    padding: 11px;
  }
}
