:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --deep: #020617;
  --slate: #111827;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --cyan: #0891b2;
  --red: #ef4444;
  --green: #10b981;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 48%, #f8fafc 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(120, 53, 15, 0.94));
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
}

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

.brand-copy strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: #cbd5e1;
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 650;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.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.46;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(245, 158, 11, 0.3), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, transparent 40%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 210px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 700px;
  margin: 24px 0 0;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.hero-search button,
.block-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  border: 0;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.hero-search button,
.block-btn {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 15px 28px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover,
.hero-search button:hover,
.block-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.38);
}

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

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: stretch;
}

.hero-search {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0 14px;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.hero-dots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.hero-dot {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 0;
  color: #fff;
  background: #111827;
  cursor: pointer;
}

.hero-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: 0.25s ease;
}

.hero-dot span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  text-shadow: 0 2px 8px #000;
}

.hero-dot.active img,
.hero-dot:hover img {
  opacity: 0.82;
  transform: scale(1.06);
}

.content-section,
.category-strip,
.rank-section,
.detail-section {
  padding: 72px 0;
}

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

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-head p:last-child {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head > a,
.text-link {
  color: var(--amber-dark);
  font-weight: 800;
}

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

.category-tile {
  min-height: 138px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: 0.25s ease;
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.65;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  height: 268px;
  overflow: hidden;
  background: #111827;
}

.movie-card-compact .card-cover {
  height: 210px;
}

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

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(2, 6, 23, 0.82) 100%);
}

.card-year,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-compact .card-body h3 {
  font-size: 15px;
}

.card-body h3 a:hover,
.rank-content h3 a:hover {
  color: var(--amber-dark);
}

.card-body p {
  margin: 0 0 14px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  color: #92400e;
  background: #fffbeb;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  height: 96px;
  border-radius: 14px;
  background: #111827;
}

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

.rank-cover b {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-content p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.page-hero {
  padding: 86px 0 58px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.32), transparent 32%),
    linear-gradient(120deg, #020617, #111827 55%, #78350f);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: #dbeafe;
  line-height: 1.8;
}

.page-search {
  max-width: 620px;
  margin-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: #cbd5e1;
}

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

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

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

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
}

.category-overview {
  display: grid;
  gap: 38px;
}

.category-preview {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-preview h2 {
  margin: 0 0 8px;
}

.category-preview p {
  margin: 0;
  color: var(--muted);
}

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

.player-top {
  padding: 28px 0 54px;
  background: #020617;
}

.breadcrumb.dark {
  margin: 0 0 18px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.34);
  font-size: 28px;
}

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

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

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

.detail-card,
.side-card {
  margin-bottom: 22px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-card h1,
.detail-card h2,
.side-card h2 {
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.detail-card h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.detail-card p {
  color: #334155;
  line-height: 1.9;
}

.lead {
  font-size: 18px;
  color: #1e293b !important;
}

.detail-tags a {
  padding: 8px 12px;
  color: #92400e;
  background: #fffbeb;
}

.poster-card img {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 16px;
}

.block-btn {
  width: 100%;
}

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

.side-related .movie-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  box-shadow: none;
  border: 1px solid var(--line);
}

.side-related .card-cover {
  height: 100%;
  min-height: 126px;
}

.side-related .card-body {
  padding: 12px;
}

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

.footer-shell {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 38px;
  padding: 50px 0 36px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: end;
}

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

.footer-links a:hover {
  background: rgba(245, 158, 11, 0.22);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

.is-filtered,
.is-hidden-card {
  display: none !important;
}

@media (max-width: 1060px) {
  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .all-grid,
  .mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-dots {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

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

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

  .brand-copy small {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-inner {
    padding: 82px 0 360px;
  }

  .hero-panel {
    bottom: 22px;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search input,
  .hero-search button {
    min-height: 48px;
  }

  .hero-dots {
    grid-template-columns: repeat(5, 180px);
  }

  .section-head,
  .category-preview-head,
  .toolbar,
  .footer-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: start;
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .all-grid,
  .mini-grid,
  .rank-grid,
  .ranking-list,
  .side-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item {
    grid-template-columns: 112px 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .brand-copy strong {
    font-size: 18px;
  }

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

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .all-grid,
  .mini-grid,
  .rank-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .card-cover,
  .movie-card-compact .card-cover {
    height: 240px;
  }

  .side-related .movie-card,
  .rank-item {
    grid-template-columns: 100px 1fr;
  }
}
