:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --muted: #829ab1;
  --line: #d9e2ec;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --brand: #334e68;
  --brand-deep: #102a43;
  --brand-mid: #486581;
  --gold: #ffc107;
  --orange: #ff8f00;
  --shadow-soft: 0 18px 45px rgba(16, 42, 67, 0.10);
  --shadow-card: 0 20px 45px rgba(16, 42, 67, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f0f4f8 100%);
  min-height: 100vh;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.06);
}

.topbar {
  max-width: 1240px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-deep));
  box-shadow: 0 12px 25px rgba(16, 42, 67, 0.22);
}

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

.brand-text strong,
.footer-brand {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--brand-deep);
  background: #f0f4f8;
}

.header-search,
.mobile-search,
.hero-search,
.search-page-form,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-page-form input,
.inline-filter input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.search-page-form input:focus,
.inline-filter input:focus {
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 4px rgba(72, 101, 129, 0.15);
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button,
.inline-filter button,
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-deep));
  box-shadow: 0 10px 22px rgba(16, 42, 67, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.search-page-form button:hover,
.inline-filter button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16, 42, 67, 0.24);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: none;
}

.btn.text {
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: var(--brand-deep);
  background: #f0f4f8;
  font-size: 22px;
}

.quick-cats {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.quick-cats a {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.mobile-nav {
  display: none;
  padding: 10px 18px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: 640px;
  background: var(--brand-deep);
  overflow: hidden;
}

.hero-track {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 640px;
  padding: 110px 24px 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 193, 7, 0.14);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 20px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #f0f4f8;
  font-size: 12px;
  font-weight: 800;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 4;
  width: min(1192px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(16, 42, 67, 0.58);
  backdrop-filter: blur(18px);
}

.hero-search input {
  width: 100%;
  min-width: 260px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.hero-stats,
.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-stats a {
  padding: 9px 12px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  white-space: nowrap;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  border-radius: 999px;
  background: var(--gold);
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px;
}

.soft-section {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1240px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1240px) / 2 + 24px));
  background: linear-gradient(180deg, #f0f4f8 0%, #ffffff 100%);
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2,
.search-result-heading h2 {
  margin: 12px 0 0;
  color: var(--brand-deep);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p,
.category-overview-card p,
.search-result-heading p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.section-more {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: #f0f4f8;
  font-weight: 900;
}

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.movie-card {
  position: relative;
  min-width: 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(72, 101, 129, 0.28);
  box-shadow: var(--shadow-card);
}

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

.poster-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-media {
  transform: scale(1.08);
  filter: saturate(1.05) contrast(1.02);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  background: rgba(16, 42, 67, 0.76);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 24px rgba(255, 143, 0, 0.32);
}

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

.movie-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-row a {
  color: var(--brand);
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

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

.category-tile {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.category-tile span,
.category-overview-card span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 16px;
  font-size: 27px;
  letter-spacing: -0.05em;
}

.category-tile em {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.7;
}

.page-hero {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 62px 24px 24px;
}

.compact-hero,
.category-hero,
.ranking-hero,
.search-hero {
  padding: 64px 24px 34px;
}

.inline-filter,
.search-page-form {
  max-width: 760px;
  margin-top: 28px;
}

.inline-filter input,
.search-page-form input {
  flex: 1;
  min-width: 0;
}

.category-overview-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-mini-posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  min-height: 150px;
}

.category-mini-posters span {
  display: block;
  width: auto;
  height: auto;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.category-overview-card h2 {
  margin: 14px 0 8px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

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

.breadcrumb {
  max-width: 1240px;
  margin: 26px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.detail-hero {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 24px 58px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(42px, 6vw, 72px);
}

.detail-meta {
  margin: 18px 0;
}

.lead-text {
  max-width: 820px;
  margin: 22px 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.9;
}

.large-tags span {
  font-size: 13px;
}

.detail-info .btn {
  display: inline-flex;
  margin-top: 26px;
}

.player-section,
.detail-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.flat-heading {
  margin-bottom: 20px;
}

.player-frame {
  position: relative;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: 0 26px 72px rgba(16, 42, 67, 0.26);
  overflow: hidden;
}

.player-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(16, 42, 67, 0.28), rgba(0, 0, 0, 0.7));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 6px;
  border-radius: 50%;
  color: var(--brand-deep);
  background: var(--gold);
  font-size: 34px;
  box-shadow: 0 18px 34px rgba(255, 193, 7, 0.35);
}

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

.detail-content article {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-content h2 {
  font-size: 30px;
}

.detail-content p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 2;
}

.search-result-heading {
  margin-bottom: 24px;
}

.site-footer {
  margin-top: 36px;
  color: #d9e2ec;
  background: linear-gradient(135deg, #102a43, #243b53);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 520px;
  color: #bcccdc;
  line-height: 1.9;
}

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

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #d9e2ec;
  font-weight: 700;
}

.footer-brand {
  color: #ffffff;
}

.copyright {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #9fb3c8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.is-hidden-card {
  display: none;
}

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

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

  .detail-hero {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search,
  .quick-cats {
    display: none;
  }

  .topbar {
    height: 66px;
    padding: 0 18px;
  }

  .brand {
    min-width: 0;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .mobile-nav.open {
    display: grid;
    gap: 8px;
  }

  .mobile-search {
    margin-top: 6px;
  }

  .mobile-search input {
    flex: 1;
    min-width: 0;
  }

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

  .hero-content {
    padding: 70px 20px 250px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    bottom: 18px;
    width: calc(100% - 28px);
  }

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

  .hero-search input {
    min-width: 0;
  }

  .hero-stats,
  .hero-dots {
    flex-wrap: wrap;
  }

  .content-section,
  .page-hero,
  .player-section,
  .detail-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

  .category-overview-card a {
    grid-template-columns: 120px 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .detail-poster {
    max-width: 340px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

  .hero h1,
  .hero h2,
  .detail-info h1 {
    font-size: 40px;
  }

  .hero p,
  .lead-text {
    font-size: 16px;
  }

  .movie-grid,
  .rank-grid,
  .wide-rank-grid {
    grid-template-columns: 1fr;
  }

  .movie-row {
    grid-auto-columns: minmax(230px, 84vw);
  }

  .inline-filter,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-content article {
    padding: 22px;
  }

  .player-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
