:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b 52%, #0f172a);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.38);
  transition: transform 0.25s ease, background 0.25s ease;
}

.brand:hover .brand-icon {
  transform: translateY(-2px) scale(1.03);
  background: var(--blue-dark);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand-text em {
  font-size: 12px;
  color: #94a3b8;
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 650;
  white-space: nowrap;
}

.site-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  font-weight: 650;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 12% 15%, rgba(37, 99, 235, 0.6), transparent 32%), linear-gradient(135deg, #0f172a, #1e3a8a 48%, #020617);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 54px 54px;
}

.hero-shell {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: grid;
  align-items: center;
  padding: 64px 0;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: 44px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.65s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #bfdbfe;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.82));
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.hero .hero-tags span {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.32);
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: -48px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.feature-row {
  margin-top: -44px;
  position: relative;
  z-index: 2;
}

.feature-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card,
.category-card,
.info-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover,
.category-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.feature-icon,
.category-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--blue);
  background: #dbeafe;
  font-size: 25px;
  font-weight: 900;
}

.feature-card h2,
.category-card h2,
.info-card h2 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 20px;
}

.feature-card p,
.category-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.content-section {
  padding: 64px 0;
  background: #ffffff;
}

.content-section.alt,
.page-hero + .content-section {
  background: #f8fafc;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-head p,
.page-hero p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poster-link:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
}

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

.poster-link:hover img {
  transform: scale(1.08);
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 38px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.2s ease;
}

.poster-link:hover .poster-mask {
  opacity: 1;
}

.region-badge,
.rank-badge,
.score-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.rank-badge {
  left: auto;
  right: 10px;
  background: #f59e0b;
}

.score-badge {
  left: auto;
  right: 10px;
  top: 10px;
  background: #ef4444;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.card-body strong {
  min-height: 42px;
  color: #111827;
  line-height: 1.35;
  font-size: 15px;
}

.card-body em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta b {
  font-weight: 750;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, 160px);
  gap: 14px;
  margin: 24px 0 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.page-hero {
  padding: 58px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 56%, #020617);
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-weight: 750;
}

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.86));
}

.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.play-cover button {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.38);
}

.play-cover.is-hidden {
  display: none;
}

.player-meta,
.detail-card,
.side-card {
  padding: 24px;
}

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

.detail-title h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.meta-list span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-weight: 750;
  font-size: 13px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 18px;
  color: #334155;
  line-height: 1.92;
}

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

.side-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.side-item img {
  width: 76px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
}

.side-item strong {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.pager-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.pager-links a {
  flex: 1 1 240px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
  color: var(--blue);
  font-weight: 800;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

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

.site-footer p,
.site-footer li {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

.back-top {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  background: #1e293b;
  cursor: pointer;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-shell {
    min-height: auto;
    padding: 44px 0 78px;
  }

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

  .hero-poster {
    max-width: 330px;
    margin: 0 auto;
  }

  .hero-dots {
    bottom: -38px;
  }

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

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

  .header-inner {
    height: 64px;
  }

  .brand {
    min-width: 0;
  }

  .brand-text em {
    display: none;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero h2 {
    font-size: 28px;
  }

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

  .feature-grid,
  .category-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .card-body strong {
    font-size: 14px;
  }

  .tag-row {
    display: none;
  }

  .player-meta,
  .detail-card,
  .side-card {
    padding: 18px;
  }

  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 16px;
}

.mini-posters img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}
