:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --accent: #0ea5e9;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.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(226, 232, 240, 0.82);
}

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

.logo,
.footer-logo {
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
}

.logo {
  font-size: 22px;
}

.logo::before,
.footer-logo::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #facc15);
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.13);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-dark);
  background: rgba(249, 115, 22, 0.10);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 680px;
  color: #fff;
  background: #111827;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 24%), radial-gradient(circle at 80% 24%, rgba(250, 204, 21, 0.20), transparent 28%);
  pointer-events: none;
  z-index: 2;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  background-position: center;
  background-size: cover;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 48px;
  padding: 118px max(32px, calc((100vw - 1180px) / 2)) 150px;
}

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

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 740px;
}

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

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-text,
.page-hero p,
.detail-hero p {
  max-width: 720px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.tag-row,
.filter-actions,
.hero-actions,
.quick-links,
.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.tag-row span,
.tag-links a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(249, 115, 22, 0.40);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(14px);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-poster {
  position: relative;
  z-index: 3;
  align-self: center;
  justify-self: end;
  width: min(390px, 32vw);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(260px, 520px) auto;
  gap: 16px 24px;
  align-items: center;
}

.hero-search,
.category-search {
  position: relative;
}

.hero-search input,
.category-search input,
.site-search {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 16px 52px 16px 22px;
  color: #111827;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-search span {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 20px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

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

.hero-dot.is-active {
  width: 58px;
  background: #fff;
}

.quick-links {
  grid-column: 1 / -1;
}

.quick-links a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

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

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

.section-head.align-end {
  align-items: flex-end;
}

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-more,
.text-link {
  color: var(--primary-dark);
  font-weight: 900;
}

.soft-panel {
  background: linear-gradient(135deg, #eff6ff, #ecfeff 48%, #fff7ed);
}

.feature-grid,
.movie-grid,
.rank-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card,
.category-card,
.content-card,
.side-card {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
}

.poster-meta {
  left: 12px;
  right: 12px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #facc15);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 3.1em;
  color: #111827;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.42;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--primary-dark);
}

.card-body p {
  display: -webkit-box;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  min-height: 3.1em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.is-compact .card-body p {
  display: none;
}

.tag-row {
  min-height: 30px;
}

.tag-row span {
  color: #475569;
  background: #f1f5f9;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.card-foot a {
  color: var(--primary-dark);
}

.filter-actions {
  max-width: 720px;
  justify-content: flex-end;
}

.filter-actions button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #475569;
  background: #e2e8f0;
  font-weight: 800;
  cursor: pointer;
}

.filter-actions button:hover,
.filter-actions button.is-active {
  color: #fff;
  background: var(--primary);
}

.empty-state {
  margin: 36px auto 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.page-hero,
.detail-hero {
  color: #fff;
  background-color: #111827;
  background-position: center;
  background-size: cover;
}

.page-hero.slim {
  padding: 96px 0 86px;
  background-image: linear-gradient(135deg, #111827, #334155);
}

.ranking-hero {
  background-image: linear-gradient(135deg, #0f172a, #7c2d12);
}

.category-hero {
  padding: 96px 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

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

.category-card {
  padding: 26px;
}

.category-title {
  display: inline-flex;
  margin-bottom: 10px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.category-preview a {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  padding: 86px 0 64px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 48px 0 24px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.76));
  border: 0;
  cursor: pointer;
  z-index: 3;
}

.player-cover span {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  box-shadow: 0 22px 50px rgba(249, 115, 22, 0.34);
  font-size: 30px;
}

.player-cover strong {
  font-size: 18px;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.2s ease;
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.lead-text {
  color: #111827 !important;
  font-weight: 700;
}

.review-card {
  border-left: 5px solid var(--accent);
  background: #f0f9ff;
}

.tag-links a {
  color: #475569;
  background: #f1f5f9;
}

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

.info-list div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list span {
  color: var(--muted);
}

.info-list b {
  text-align: right;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 96px;
}

.mini-rank {
  display: grid;
  gap: 10px;
}

.mini-rank a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #475569;
  font-weight: 800;
}

.mini-rank span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 42px 0 26px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 620px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-weight: 800;
}

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

.copyright {
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.20);
}

@media (max-width: 1080px) {
  .feature-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 100px 24px 230px;
    gap: 24px;
  }

  .hero-poster {
    justify-self: start;
    width: 180px;
    border-radius: 22px;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    bottom: 24px;
  }

  .hero-dots {
    justify-content: flex-start;
  }

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

  .filter-actions {
    justify-content: flex-start;
  }

  .feature-grid,
  .category-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

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

  .detail-cover {
    width: 170px;
  }
}

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

  .logo {
    font-size: 18px;
  }

  .hero h1,
  .page-hero h1,
  .detail-hero h1 {
    font-size: 36px;
  }

  .movie-grid.compact-grid,
  .rank-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .tag-row,
  .card-foot {
    display: none;
  }
}
