:root {
  --bg: #0b1020;
  --bg-soft: #111827;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --red-dark: #991b1b;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 36%, #f8fafc 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

img {
  background: #1f2937;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner,
.section-inner,
.footer-inner,
.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.3);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--red);
  background: #fee2e2;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 99px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #0f172a;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(239, 68, 68, 0.34), transparent 34%), linear-gradient(90deg, rgba(8, 13, 28, 0.96), rgba(8, 13, 28, 0.68) 48%, rgba(8, 13, 28, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  align-content: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  color: white;
  padding: 84px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.22);
  color: #fecaca;
  border: 1px solid rgba(254, 202, 202, 0.28);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 700px;
  margin-top: 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 900;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  padding: 13px 22px;
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.38);
}

.btn-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 12px 20px;
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.page-main {
  padding: 42px 0 80px;
}

.section-block {
  padding: 56px 0;
}

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

.eyebrow {
  color: var(--red);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p,
.category-card p,
.detail-title p {
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(248, 113, 113, 0.55);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
}

.quality-badge,
.rank-badge,
.detail-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 950;
}

.rank-badge {
  right: 12px;
  left: auto;
  background: rgba(17, 24, 39, 0.86);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-body h3 {
  min-height: 48px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 950;
}

.movie-card-body h3 a:hover,
.rank-content h3 a:hover,
.text-link:hover {
  color: var(--red);
}

.movie-meta {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.movie-line {
  margin-top: 10px;
  color: #4b5563;
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  min-height: 180px;
  padding: 16px;
  background: white;
  border-radius: 26px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-card img {
  border-radius: 18px;
  background: #111827;
}

.category-card h3 {
  font-size: 22px;
  font-weight: 950;
  margin-bottom: 8px;
}

.category-card .text-link {
  margin-top: 14px;
}

.text-link {
  color: var(--red);
  font-weight: 950;
}

.filter-panel {
  margin: 24px 0 30px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 1px solid #fecaca;
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid #fca5a5;
  border-radius: 16px;
  padding: 12px 14px;
  background: white;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 90px 54px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-cover {
  display: block;
  height: 118px;
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
}

.rank-number {
  font-size: 28px;
  color: var(--red);
  font-weight: 950;
}

.rank-content h3 {
  font-size: 20px;
  font-weight: 950;
}

.rank-content p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #6b7280;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: var(--red);
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
  padding: 28px;
  border-radius: 34px;
  background: radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.24), transparent 34%), linear-gradient(135deg, #111827, #3f0d12);
  color: white;
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
  background: #111827;
}

.detail-title p {
  max-width: 780px;
  margin-top: 18px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.detail-meta .meta-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-section,
.content-panel,
.related-panel {
  margin-top: 34px;
  padding: 26px;
  background: white;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 30px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #050816;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #050816;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
  font-size: 20px;
  font-weight: 950;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 20px 44px rgba(220, 38, 38, 0.38);
}

.content-panel h2,
.related-panel h2,
.player-section h2 {
  font-size: 26px;
  font-weight: 950;
  margin-bottom: 16px;
}

.content-panel p {
  color: #374151;
  line-height: 1.95;
  margin-bottom: 18px;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.footer-inner p {
  margin-top: 10px;
  max-width: 560px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: start;
}

.footer-links a:hover {
  color: white;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: #6b7280;
  background: white;
  border-radius: 22px;
}

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

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

  .movie-grid,
  .category-grid,
  .filter-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 76px 44px 1fr;
  }

  .rank-row .text-link {
    grid-column: 2 / -1;
    justify-content: start;
  }

  .rank-cover {
    height: 102px;
  }

  .detail-poster {
    width: min(260px, 100%);
  }

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

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-body {
    padding: 13px;
  }

  .movie-card-body h3 {
    min-height: 42px;
    font-size: 15px;
  }

  .movie-line {
    display: none;
  }

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