:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand {
  font-size: 24px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a,
.mobile-panel a {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--blue);
}

.top-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 10px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search button,
.mobile-search button,
.large-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.24);
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
  padding: 10px 18px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
}

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

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

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

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
}

.mobile-search button {
  padding: 11px 16px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #081026;
}

.hero-track {
  min-height: inherit;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  min-height: 640px;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 48px;
  align-items: center;
  padding: 96px 0;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 12px;
  max-width: 760px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2,
.hero-copy h3 {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.12;
  font-weight: 850;
}

.hero-copy p:not(.eyebrow) {
  margin: 0 0 28px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

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

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-weight: 750;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.hero-poster {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

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

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 36px;
  background: #ffffff;
}

.search-band {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.large-search {
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.large-search input {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  font-size: 17px;
}

.large-search button {
  padding: 16px 26px;
}

.category-band,
.movie-section,
.rank-list,
.category-overview-grid {
  padding: 70px 0;
}

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

.section-heading h2,
.highlight-block h2,
.page-hero h1,
.detail-main-card h1 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading h2,
.highlight-block h2 {
  font-size: clamp(28px, 3vw, 42px);
}

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

.category-tile,
.category-overview-card,
.detail-main-card,
.detail-side-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span,
.category-overview-card p,
.movie-card p,
.rank-info p,
.detail-lead,
.detail-main-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.card-tags span,
.detail-tags a,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.card-meta span {
  padding: 4px 9px;
  background: #f1f5f9;
}

.movie-card h3,
.mini-card h3,
.rank-info h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card h3 {
  font-size: 19px;
}

.movie-card h3 a:hover,
.mini-card h3 a:hover,
.rank-info h2 a:hover,
.text-link:hover {
  color: var(--blue);
}

.movie-card p {
  min-height: 58px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span {
  padding: 5px 9px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.compact-card .card-body {
  padding: 15px;
}

.compact-card h3 {
  font-size: 17px;
}

.compact-card p {
  min-height: auto;
}

.highlight-block {
  padding: 76px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.highlight-block .eyebrow,
.highlight-block h2,
.highlight-block p {
  color: #ffffff;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: center;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  padding: 82px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.45), transparent 32%),
    linear-gradient(135deg, #0f172a, #1d4ed8);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.category-page-hero .hero-actions {
  margin-top: 26px;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.filter-panel input {
  flex: 1 1 280px;
  padding: 13px 18px;
}

.filter-panel select {
  padding: 13px 18px;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.empty-state.is-visible {
  display: block;
}

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

.category-overview-card {
  padding: 24px;
}

.category-title-link h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.mini-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.mini-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.mini-card img {
  width: 74px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.mini-card h3 {
  font-size: 16px;
}

.mini-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.rank-num {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 20px;
  font-weight: 900;
}

.rank-poster img {
  width: 96px;
  height: 128px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info h2 {
  font-size: 22px;
}

.detail-page {
  padding-bottom: 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.player-section {
  background: #020617;
}

.player-section .site-shell {
  padding: 20px 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.48));
  cursor: pointer;
}

.player-start span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
  font-size: 36px;
  padding-left: 4px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 34px 0 10px;
}

.detail-main-card,
.detail-side-card {
  padding: 28px;
}

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

.detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
}

.badge {
  padding: 7px 12px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.detail-main-card h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-lead {
  margin: 16px 0 24px;
  font-size: 18px;
}

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

.detail-meta-grid div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

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

.detail-meta-grid strong {
  color: var(--muted);
  font-size: 13px;
}

.detail-meta-grid span {
  margin-top: 6px;
  font-weight: 800;
}

.detail-main-card h2,
.detail-side-card h2 {
  margin: 26px 0 12px;
  color: #0f172a;
  font-size: 24px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.detail-tags a {
  padding: 8px 12px;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 750;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

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

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

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

  .detail-side-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 22px, 1200px);
  }

  .header-inner {
    height: 64px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .hero-carousel,
  .hero-slide {
    min-height: 680px;
  }

  .hero-content {
    gap: 28px;
    padding: 56px 0 86px;
  }

  .hero-poster {
    max-width: 230px;
    transform: none;
  }

  .large-search,
  .filter-panel,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .large-search {
    display: grid;
  }

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

  .category-band,
  .movie-section,
  .rank-list,
  .category-overview-grid {
    padding: 46px 0;
  }

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

  .rank-row .text-link {
    grid-column: 1 / -1;
  }

  .rank-poster img {
    width: 82px;
    height: 108px;
  }

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

  .detail-main-card,
  .detail-side-card {
    padding: 20px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
