:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --teal: #14b8a6;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f8fafc 100%);
  font-family: Inter, 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: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.site-nav {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--teal));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.brand-text {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-weight: 600;
  color: #334155;
}

.nav-links a:hover {
  color: var(--primary);
}

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

.nav-search input,
.filter-bar input,
.filter-bar select,
.large-search input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.nav-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.large-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.nav-search button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
}

.nav-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

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

.primary-btn:hover,
.nav-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.3);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 8px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(120deg, #2563eb, #06b6d4, #14b8a6);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(37, 99, 235, 0.62), rgba(6, 182, 212, 0.24)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 460px);
  align-items: center;
  gap: 48px;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 13px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 20px 0 18px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #e0f2fe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.46);
  transform: translateY(0);
  transition: transform 0.28s ease;
}

.hero-poster:hover {
  transform: translateY(-6px) scale(1.01);
}

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

.hero-play,
.card-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.hero-play {
  width: 72px;
  height: 72px;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  font-size: 30px;
  transform: translate(-50%, -50%);
}

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

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

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

.quick-cats {
  padding: 28px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.quick-cats-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.quick-cats h2 {
  margin: 0;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 900;
}

.quick-links {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-links a {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: #334155;
  background: #ffffff;
  font-weight: 700;
}

.quick-links a:hover {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.36);
  background: #eff6ff;
}

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.no-padding {
  padding: 0;
}

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

.section-heading.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-kicker {
  color: var(--primary);
  background: #dbeafe;
}

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

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

.compact-grid {
  gap: 18px;
}

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}

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

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

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.card-play {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h3 a:hover {
  color: var(--primary);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.soft-section {
  padding: 72px 0;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.category-preview + .category-preview {
  margin-top: 40px;
}

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

.mini-card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.mini-card span {
  display: block;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.rank-item:hover {
  background: #eff6ff;
}

.rank-item strong {
  color: var(--primary);
  font-size: 20px;
}

.rank-item span {
  display: block;
  font-weight: 900;
}

.rank-item em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #0891b2, #0f766e);
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
}

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

.page-hero h1 {
  max-width: 800px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dffafe;
  font-size: 19px;
  line-height: 1.8;
}

.slim-hero,
.category-hero,
.rank-hero,
.search-hero {
  min-height: 330px;
}

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

.category-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 15px 36px rgba(15, 23, 42, 0.08);
}

.category-main-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #ffffff;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.category-main-link strong {
  font-size: 13px;
}

.category-card p {
  min-height: 70px;
  color: var(--muted);
  line-height: 1.7;
}

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

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input {
  flex: 1;
  border-radius: 18px;
}

.filter-bar select {
  min-width: 150px;
  border-radius: 18px;
}

.large-search {
  margin-top: 26px;
}

.large-search input {
  width: min(620px, 100%);
  min-height: 56px;
  border-radius: 18px;
  font-size: 16px;
}

.rank-table {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 70px 74px 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-row:hover {
  border-color: rgba(37, 99, 235, 0.36);
  transform: translateY(-2px);
}

.rank-row strong {
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
}

.rank-row img {
  width: 74px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row b,
.rank-row em,
.rank-row small {
  display: block;
}

.rank-row b {
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 900;
}

.rank-row em {
  max-width: 820px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
}

.rank-row small {
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}

.detail-hero {
  min-height: 620px;
}

.detail-backdrop,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  background-position: center;
  background-size: cover;
  filter: blur(12px) saturate(1.1);
  transform: scale(1.08);
}

.detail-shade {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.52)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.18));
}

.detail-hero-inner {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #cffafe;
  font-weight: 700;
}

.breadcrumb b {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-top: 58px;
}

.detail-poster {
  width: 330px;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
  max-width: 860px;
  margin: 20px 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 840px;
  color: #e0f2fe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-main {
  padding-top: 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.28);
}

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

.play-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.play-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.94);
  font-size: 36px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.26);
}

.play-mask strong {
  font-size: 20px;
}

.detail-block {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.detail-block h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

.detail-block p {
  margin: 0;
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

.related-block .movie-grid {
  margin-top: 4px;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  margin: 10px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-weight: 700;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.15);
}

[data-search].is-hidden {
  display: none !important;
}

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

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: wrap;
    min-height: 68px;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0 0;
  }

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

  .nav-links a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
  }

  .nav-search {
    order: 5;
    width: 100%;
  }

  .nav-search input {
    flex: 1;
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 50px 0 80px;
  }

  .hero-poster {
    max-width: 360px;
  }

  .hero-poster img {
    height: 300px;
  }

  .quick-cats-inner,
  .section-heading,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .section-wrap {
    padding: 52px 0;
  }

  .category-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 28px;
    margin-top: 34px;
  }

  .detail-poster {
    width: min(320px, 100%);
  }

  .rank-row {
    grid-template-columns: 52px 60px 1fr;
  }

  .rank-row small {
    grid-column: 3;
  }

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

@media (max-width: 520px) {
  .brand-text {
    font-size: 17px;
  }

  .movie-grid,
  .mini-grid,
  .category-samples {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.03em;
  }

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .rank-row {
    grid-template-columns: 42px 58px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-row img {
    width: 58px;
    height: 76px;
  }

  .detail-block {
    padding: 20px;
  }
}
