:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --orange: #fb923c;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-main {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fb7185, #fdba74);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-sub {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #e5e7eb;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #fb7185;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  color: #e5e7eb;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fb7185;
}

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(90deg, #0f172a, #334155);
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  max-width: 1200px;
}

.hero-content .eyebrow,
.page-hero span,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff1f2;
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.35);
}

.hero-content h1 {
  margin: 18px 0 18px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 650px;
  margin: 0;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-tags {
  margin: 22px 0 30px;
}

.hero-tags span,
.movie-tags span,
.tag-pill {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  color: #be123c;
  background: #fff1f2;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 16px 30px rgba(244, 63, 94, 0.32);
}

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

.primary-btn.small {
  min-height: 40px;
  padding: 0 17px;
  font-size: 14px;
}

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

.ghost-btn.dark {
  color: var(--slate);
  background: #f1f5f9;
  border-color: #e2e8f0;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--rose);
}

.section-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.slim-shell {
  padding-top: 0;
}

.soft-section {
  background: linear-gradient(90deg, #fff1f2, #fff7ed);
}

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

.section-heading.centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.section-heading.compact-heading {
  align-items: start;
  flex-direction: column;
  gap: 10px;
}

.section-heading h2,
.page-hero h1 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading a {
  color: var(--rose-dark);
  font-weight: 800;
}

.filter-panel {
  margin: 24px auto 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

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

.dense-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .movie-poster img,
.rail-item:hover img,
.update-row:hover img {
  transform: scale(1.08);
}

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.72));
  opacity: 0.65;
}

.movie-region,
.movie-duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.movie-region {
  top: 10px;
  left: 10px;
  background: var(--rose);
}

.movie-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.8);
}

.rank-badge {
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--rose-dark);
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.poster-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
}

.rail-item {
  flex: 0 0 300px;
  scroll-snap-align: start;
}

.rail-poster {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

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

.rail-item strong,
.rail-item small {
  display: block;
}

.rail-item strong {
  margin-top: 12px;
  font-size: 18px;
}

.rail-item small {
  margin-top: 4px;
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 34px;
}

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

.update-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.update-row img {
  width: 112px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.update-row strong,
.update-row small {
  display: block;
}

.update-row strong {
  overflow: hidden;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.update-row small {
  margin-top: 4px;
  color: var(--muted);
}

.update-row em {
  color: var(--rose-dark);
  font-style: normal;
  font-weight: 800;
}

.category-panel {
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}

.category-tile-grid,
.category-overview {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.category-card-large {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 26px;
  align-items: center;
}

.tile-0 {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.tile-1 {
  background: linear-gradient(135deg, #f43f5e, #fb923c);
}

.tile-2 {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.tile-3 {
  background: linear-gradient(135deg, #7c3aed, #d946ef);
}

.category-tile span,
.category-card-large span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong,
.category-card-large p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.7;
}

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

.category-collage img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.25);
}

.page-hero {
  padding: 86px 0;
  background: radial-gradient(circle at top left, rgba(244, 63, 94, 0.18), transparent 30%), linear-gradient(135deg, #ffffff, #f8fafc 58%, #fff1f2);
}

.page-hero > div {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.category-hero,
.ranking-hero {
  background: radial-gradient(circle at top right, rgba(251, 146, 60, 0.2), transparent 28%), linear-gradient(135deg, #fff7ed, #ffffff);
}

.rank-list {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 90px minmax(0, 1fr) minmax(160px, 0.7fr) 110px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-index {
  color: var(--rose-dark);
  font-size: 22px;
  font-weight: 900;
}

.rank-row img {
  width: 90px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row small {
  color: var(--muted);
}

.rank-row em {
  color: var(--rose-dark);
  font-style: normal;
  font-weight: 800;
}

.detail-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.65fr);
  gap: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

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

.player-card,
.detail-card,
.side-box {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.78));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 20px 40px rgba(244, 63, 94, 0.35);
  font-size: 32px;
}

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

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.detail-category {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--rose);
  font-weight: 800;
  font-size: 13px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-info {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-info li {
  padding: 13px;
  border-radius: 16px;
  background: #f8fafc;
}

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

.detail-info span {
  color: var(--muted);
  font-size: 12px;
}

.detail-info strong {
  overflow: hidden;
  margin-top: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tag-cloud {
  margin-bottom: 24px;
}

.story-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.story-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.story-block p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

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

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.side-box {
  margin-top: 20px;
  padding: 22px;
}

.side-box h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #334155;
  background: #f8fafc;
  font-weight: 700;
}

.side-links a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

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

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
}

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.45);
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 24px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-filtered-out {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

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

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

  .detail-side {
    position: static;
  }

  .detail-cover {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 66px;
  }

  .brand-main {
    font-size: 18px;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

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

  .section-heading,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .movie-title {
    font-size: 16px;
  }

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

  .split-layout,
  .category-card-large,
  .footer-grid,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .update-row {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .update-row em {
    display: none;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .dense-grid,
  .category-tile-grid,
  .detail-info {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rail-item {
    flex-basis: 240px;
  }
}
