:root {
  --bg: #f8fafc;
  --bg-soft: #eef6ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --orange: #f97316;
  --rose: #f43f5e;
  --pink: #ec4899;
  --blue: #2563eb;
  --green: #10b981;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  height: 68px;
  padding: 0 18px;
  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;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 14px 24px rgba(236, 72, 153, 0.22);
  transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  border-radius: 999px;
  background: #ea580c;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(110deg, #f97316 0%, #f43f5e 52%, #db2777 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.20), transparent 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.04));
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(248, 250, 252, 0) 100%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 82px 18px 110px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.hero-title-block h1 {
  margin: 0 0 18px;
  font-size: clamp(2.55rem, 6vw, 5.25rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-title-block p {
  max-width: 620px;
  margin: 0 0 26px;
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.hero-pills,
.hero-actions,
.hero-tags,
.genre-list,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pills a,
.hero-tags span,
.genre-list span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-slider {
  position: relative;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  min-height: 430px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
  align-items: center;
  min-height: 430px;
  padding: 34px;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.55s ease;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fff7ed;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow {
  color: var(--rose);
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.12;
}

.hero-copy p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.85;
}

.hero-poster {
  position: relative;
  align-self: stretch;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.18);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.22);
}

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

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

.hero-poster span,
.score {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.28);
}

.hero-control {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-control button,
.hero-dot {
  pointer-events: auto;
}

.hero-control > button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.30);
  cursor: pointer;
  font-size: 1.6rem;
}

.hero-control > div {
  display: flex;
  gap: 8px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 14px 26px rgba(236, 72, 153, 0.24);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.btn.ghost.light {
  background: rgba(255, 255, 255, 0.20);
}

.btn.full {
  width: 100%;
}

.content-section,
.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 68px 18px;
}

.soft-section {
  max-width: none;
  padding-left: max(18px, calc((100vw - 1180px) / 2 + 18px));
  padding-right: max(18px, calc((100vw - 1180px) / 2 + 18px));
  background: rgba(255, 255, 255, 0.46);
}

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

.section-head h2,
.page-hero h1,
.detail-title-row h1,
.category-panel h2,
.side-panel h2,
.poster-panel h2,
.text-block h2 {
  margin: 0;
  color: #111827;
}

.section-head h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p,
.category-panel p,
.page-hero p,
.movie-body p,
.poster-panel p,
.text-block p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

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

.movie-card[hidden] {
  display: none;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

.compact-card .movie-cover {
  aspect-ratio: 3 / 4;
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 48%, rgba(15, 23, 42, 0.72) 100%);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 18px rgba(244, 63, 94, 0.22);
}

.score {
  z-index: 2;
}

.movie-body {
  padding: 18px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.movie-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--rose);
  background: #fff1f2;
  font-size: 0.76rem;
  font-weight: 800;
}

.movie-body h2 {
  min-height: 3em;
  margin: 12px 0 8px;
  font-size: 1.02rem;
  line-height: 1.5;
}

.movie-body h2 a:hover {
  color: var(--orange);
}

.movie-meta,
.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 0.88rem;
}

.movie-meta a {
  color: var(--blue);
  font-weight: 800;
}

.category-grid,
.category-panels {
  display: grid;
  gap: 22px;
}

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

.category-card,
.category-panel,
.side-panel,
.poster-panel,
.detail-card,
.filter-box {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.category-card {
  padding: 24px;
}

.category-card > a {
  display: block;
}

.category-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  font-weight: 900;
}

.category-card strong {
  display: block;
  color: #334155;
  line-height: 1.7;
}

.category-card div {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-card div a {
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
}

.page-hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: #fff;
}

.compact-hero {
  max-width: none;
  margin: 0;
  padding-left: max(18px, calc((100vw - 1180px) / 2 + 18px));
  padding-right: max(18px, calc((100vw - 1180px) / 2 + 18px));
  background: linear-gradient(110deg, #f97316, #f43f5e 55%, #db2777);
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
}

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

.category-panel {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 22px;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: transform 0.22s ease, background 0.22s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  background: #fff7ed;
}

.mini-card img {
  width: 62px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

.mini-card strong,
.mini-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.mini-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.mini-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--rose);
  font-size: 0.72rem;
  font-weight: 900;
}

.filter-box {
  margin-bottom: 28px;
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr 0.7fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: #0f172a;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.empty-state {
  margin: 28px 0 0;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: #fff;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.side-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.side-panel h2 {
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.detail-shell {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 20px 40px rgba(236, 72, 153, 0.32);
  font-size: 2rem;
}

.play-layer strong {
  font-size: 1.1rem;
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

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

.detail-title-row h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.04em;
}

.detail-score {
  min-width: 88px;
  padding: 14px;
  text-align: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.detail-score strong,
.detail-score span {
  display: block;
}

.detail-score strong {
  font-size: 1.8rem;
}

.info-strip {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 800;
}

.genre-list {
  margin-bottom: 24px;
}

.genre-list span,
.tag-cloud a {
  color: #be123c;
  background: #fff1f2;
}

.text-block {
  margin-top: 26px;
}

.text-block h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

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

.poster-panel {
  overflow: hidden;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

.poster-panel h2,
.poster-panel p,
.poster-panel .btn {
  margin-left: 20px;
  margin-right: 20px;
}

.poster-panel h2 {
  margin-top: 20px;
}

.poster-panel .btn {
  margin-bottom: 20px;
}

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

.footer-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 18px 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
  font-size: 1.2rem;
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.05rem;
}

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

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.9rem;
}

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

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

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

  .detail-aside,
  .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 14px;
  }

  .hero-shell {
    padding-top: 58px;
  }

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

  .hero-poster img {
    min-height: 260px;
  }

  .feature-grid,
  .movie-grid,
  .rank-grid,
  .category-grid,
  .category-panels,
  .related-grid,
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .nav-wrap {
    height: 62px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .hero-shell {
    padding-bottom: 92px;
  }

  .hero-title-block h1 {
    font-size: 2.3rem;
  }

  .hero-slider {
    min-height: 0;
  }

  .hero-slide {
    min-height: 0;
  }

  .hero-control {
    left: 18px;
    right: 18px;
  }

  .feature-grid,
  .movie-grid,
  .rank-grid,
  .category-grid,
  .category-panels,
  .related-grid,
  .footer-main,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .detail-shell {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .section-head,
  .page-hero,
  .detail-title-row {
    display: block;
  }

  .section-more,
  .page-hero .btn {
    margin-top: 16px;
  }

  .detail-score {
    margin-top: 18px;
  }
}
