:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --line: rgba(17, 24, 39, 0.1);
  --red: #dc2626;
  --pink: #db2777;
  --orange: #f97316;
  --dark: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, #f9fafb 0%, #eef2ff 48%, #fff1f2 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1240px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-text em {
  display: block;
  margin-top: -3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 10px 14px;
  color: #374151;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #374151;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 20px 20px;
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  color: #374151;
  border-radius: 14px;
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--red);
  background: #fef2f2;
}

.mobile-link.small {
  display: inline-flex;
  margin: 5px;
  padding: 8px 12px;
  font-size: 13px;
  background: #f9fafb;
}

.mobile-category-row {
  padding-top: 10px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.2) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 8vh 20px 92px;
  display: grid;
  align-items: center;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fecaca;
}

.hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-summary {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 20px);
}

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.info-chip,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.btn,
.section-more,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.filter-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.28);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn:hover,
.section-more:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

.search-strip {
  position: relative;
  z-index: 5;
  max-width: 1120px;
  margin: -38px auto 0;
  padding: 0 20px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  color: #111827;
  background: #ffffff;
  outline: none;
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.main-wrap,
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px;
}

.page-wrap.slim {
  max-width: 980px;
}

.content-section {
  margin-bottom: 64px;
}

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

.page-head {
  align-items: start;
}

.section-head h2,
.page-head h1,
.detail-title {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.page-head h1,
.detail-title {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.page-head p,
.section-lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section-more {
  color: var(--red);
  background: #fff1f2;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.055);
  filter: saturate(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.32);
}

.card-body {
  padding: 16px;
}

.card-meta,
.breadcrumbs,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 a:hover {
  color: var(--red);
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span,
.category-pill {
  padding: 5px 9px;
  color: #991b1b;
  background: #fff1f2;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(219, 39, 119, 0.86)), #111827;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 22px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px 150px auto;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.library-note {
  display: none;
  margin: 26px 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: #ffffff;
}

.library-note.is-visible {
  display: block;
}

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

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 20px 56px;
}

.breadcrumbs {
  margin-bottom: 24px;
  color: #6b7280;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
  background: #030712;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030712;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.56) 100%);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  font-size: 38px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.4);
}

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

.player-message {
  display: none;
  padding: 14px 16px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.96);
}

.player-message.is-visible {
  display: block;
}

.detail-card {
  margin-top: 20px;
  padding: 28px;
}

.detail-title {
  margin-bottom: 16px;
}

.detail-meta span,
.info-chip {
  padding: 7px 11px;
  color: #374151;
  background: #f3f4f6;
}

.detail-summary {
  margin-top: 24px;
}

.detail-summary h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-summary p {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 16px;
}

.side-card {
  padding: 20px;
}

.side-poster {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

.side-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  background: #fff1f2;
  transform: translateX(3px);
}

.related-item img {
  width: 78px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.25;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}

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

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  .hero {
    min-height: 72vh;
  }

  .hero-content {
    min-height: 72vh;
    padding-top: 6vh;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-head,
  .footer-inner {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

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

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

  .main-wrap,
  .page-wrap,
  .detail-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card-body {
    padding: 12px;
  }

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

  .movie-card p {
    min-height: auto;
    font-size: 13px;
  }

  .detail-card {
    padding: 20px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }
}
