:root {
  --bg: #f7fbff;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --sky-soft: #e0f2fe;
  --blue-soft: #eff6ff;
  --dark: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.32);
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  color: #334155;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sky-dark);
  background: var(--sky-soft);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 99px;
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.25) 100%),
    radial-gradient(circle at 20% 18%, rgba(14, 165, 233, 0.45), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  min-height: 600px;
  margin: 0 auto;
  padding: 90px 0 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--sky-dark);
  background: var(--sky-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-kicker {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(125, 211, 252, 0.32);
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 16px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 18px 28px rgba(2, 132, 199, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 38px rgba(2, 132, 199, 0.34);
}

.ghost-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ghost-button.dark {
  color: var(--sky-dark);
  border-color: var(--line);
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.search-strip {
  margin-top: -54px;
  position: relative;
  z-index: 5;
  padding: 0 18px;
}

.search-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 20px;
  align-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.search-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(22px, 3vw, 32px);
}

.search-form-home,
.filter-form {
  display: flex;
  gap: 10px;
}

.search-form-home input,
.filter-form input,
.filter-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

.search-form-home input:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.search-form-home button,
.filter-form button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--sky);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

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

.tinted-section {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100vw - 1280px) / 2));
  background: linear-gradient(90deg, var(--sky-soft), var(--blue-soft));
}

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

.section-heading h2,
.page-hero h1,
.rank-panel h2,
.article-card h2,
.side-card h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-more,
.reset-link,
.category-title-line a {
  color: var(--sky-dark);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 12px 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);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0284c7);
}

.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-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 70%);
}

.movie-card:hover .card-cover::before {
  opacity: 1;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 10px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  padding: 7px 10px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  color: var(--sky-dark);
  background: var(--sky-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

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

.reverse-split {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.category-preview-list {
  display: grid;
  gap: 28px;
}

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

.category-title-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.category-title-line h3 {
  margin: 0;
  font-size: 24px;
}

.category-title-line p {
  margin: 6px 0 0;
  color: var(--muted);
}

.rank-panel,
.side-card,
.article-card {
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.sticky-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.rank-panel-head {
  margin-bottom: 14px;
}

.rank-row,
.wide-rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rank-number {
  color: var(--sky-dark);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 750;
}

.rank-weight {
  color: #ef4444;
  font-size: 12px;
  font-weight: 900;
}

.wide-rank-main {
  display: grid;
  gap: 3px;
}

.wide-rank-main em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.full-button {
  width: 100%;
  margin-top: 18px;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 10%, rgba(14, 165, 233, 0.48), transparent 30%),
    linear-gradient(135deg, #020617, #0f172a 48%, #075985);
}

.small-hero {
  padding: 84px max(18px, calc((100vw - 1180px) / 2));
}

.small-hero h1 {
  color: #ffffff;
}

.small-hero p:not(.eyebrow) {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.category-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.22));
}

.category-card-content {
  position: relative;
  z-index: 2;
  min-height: 280px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  color: #ffffff;
}

.category-card-content span {
  color: #bae6fd;
  font-weight: 800;
}

.category-card-content h2 {
  margin: 10px 0;
  font-size: 32px;
}

.category-card-content p {
  max-width: 520px;
  color: #e2e8f0;
}

.filter-form {
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.filter-form input {
  flex: 2 1 260px;
}

.filter-form select {
  flex: 1 1 160px;
}

.result-count {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.12);
  transform: scale(1.04);
  opacity: 0.52;
}

.detail-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.54)),
    radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.42), transparent 32%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 62px;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #0284c7);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

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

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-tags span {
  color: #dff6ff;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.26);
}

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

.detail-main {
  display: grid;
  gap: 26px;
}

.player-section {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.simple-heading {
  padding: 24px 24px 0;
  margin-bottom: 18px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(2, 132, 199, 0.34), rgba(0, 0, 0, 0.56)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.2));
  border: 0;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.player-start.hidden {
  display: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sky-dark);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.article-card {
  font-size: 17px;
}

.article-card p {
  color: #334155;
}

.article-card p + p {
  margin-top: 14px;
}

.detail-side {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 92px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
}

.side-card a {
  color: var(--sky-dark);
  font-weight: 800;
}

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

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

.footer-logo {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.site-footer h3 {
  color: #ffffff;
  margin: 0 0 14px;
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

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

.cover-fallback {
  position: relative;
}

.cover-fallback.image-missing img {
  opacity: 0;
}

.cover-fallback.image-missing::after {
  content: attr(data-fallback-title);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #ffffff;
  font-weight: 900;
  font-size: clamp(18px, 3vw, 34px);
  background:
    radial-gradient(circle at 30% 20%, rgba(14, 165, 233, 0.55), transparent 35%),
    linear-gradient(135deg, #0f172a, #075985);
}

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

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

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

  .split-section,
  .reverse-split,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .sticky-panel,
  .detail-side {
    position: static;
    max-height: none;
  }

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

@media (max-width: 780px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    padding: 10px 0 0;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-link {
    width: 100%;
  }

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

  .hero-content {
    padding: 76px 0 104px;
  }

  .hero-arrow {
    display: none;
  }

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

  .search-form-home {
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .three-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .poster {
    width: min(260px, 100%);
  }

  .wide-rank-row,
  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-weight {
    grid-column: 2;
  }

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