:root {
  color-scheme: light;
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  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(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

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

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.header-cta {
  padding: 10px 16px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-cta:hover,
.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

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

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--blue);
  border-radius: 20px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
}

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

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

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

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

.hero-content {
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 92px 24px 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 340px;
  align-items: center;
  gap: 48px;
  position: relative;
}

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

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #93c5fd;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.home-search button,
.panel-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.home-search button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.ghost-button {
  min-height: 48px;
  padding: 0 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  height: 480px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: perspective(900px) rotateY(-7deg);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

main {
  overflow: hidden;
}

.search-panel {
  margin-top: -44px;
  position: relative;
  z-index: 4;
  padding: 0 24px;
}

.search-panel-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.search-panel p {
  margin: 8px 0 22px;
  color: var(--muted);
}

.home-search {
  display: flex;
  gap: 12px;
}

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

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

.quick-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.quick-category-row a {
  padding: 8px 13px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

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

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

.section-heading h2,
.ranking-title h2,
.footer-column h2,
.info-card h2,
.text-block h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.section-heading p {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.panel-link,
.text-link {
  color: var(--blue);
}

.section-more:hover,
.text-link:hover,
.panel-link:hover {
  color: var(--blue-dark);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-meta,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta a {
  color: var(--blue);
  font-weight: 800;
}

.movie-card h2 {
  display: -webkit-box;
  min-height: 52px;
  margin: 10px 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 850;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-card .tag-row {
  margin-top: 14px;
}

.movie-card .tag-row span {
  color: #4b5563;
  background: #f3f4f6;
  border-color: #f3f4f6;
}

.card-actions {
  margin-top: 16px;
}

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

.compact h2 {
  font-size: 16px;
}

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

.ranking-panel,
.info-card {
  padding: 24px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.ranking-panel ol,
.full-ranking,
.info-card ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-number {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.ranking-poster {
  width: 54px;
  height: 72px;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.ranking-info h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.ranking-info p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ranking-heat {
  color: var(--blue);
  font-weight: 900;
}

.panel-link {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  background: #eff6ff;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

.page-main {
  padding-bottom: 72px;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, #1d4ed8, #0f172a 42%, #020617 100%);
}

.page-hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 70px 34px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 820px;
}

.page-hero .eyebrow {
  color: #93c5fd;
}

.compact-hero p,
.category-hero p {
  color: rgba(255, 255, 255, 0.78);
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-preview {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0f172a;
}

.category-preview img {
  min-width: 0;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 6px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

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

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 260px) auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.search-toolbar {
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 240px) minmax(160px, 220px) auto;
}

.filter-toolbar label {
  display: grid;
  gap: 8px;
}

.filter-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-empty {
  display: none;
  margin: 0;
  color: #dc2626;
  font-weight: 700;
}

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

.ranking-page {
  max-width: 960px;
}

.full-ranking .ranking-item {
  grid-template-columns: 58px 68px minmax(0, 1fr) auto;
  padding: 16px 0;
}

.full-ranking .ranking-poster {
  width: 68px;
  height: 90px;
}

.full-ranking .ranking-info h2 {
  font-size: 18px;
}

.detail-hero {
  min-height: 620px;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 86px 24px 72px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 50px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-copy h1 {
  max-width: 820px;
}

.detail-tags span {
  color: #ffffff;
}

.detail-layout {
  max-width: 1280px;
  margin: -72px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.detail-content,
.text-block,
.player-section {
  min-width: 0;
}

.stream-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.stream-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

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

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.34);
  font-size: 30px;
}

.player-overlay span:last-child {
  font-size: 18px;
  font-weight: 800;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
  font-size: 13px;
  pointer-events: none;
}

.stream-player.is-playing .player-status {
  display: none;
}

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

.text-block p {
  margin: 14px 0 0;
  color: #374151;
  font-size: 17px;
}

.info-card {
  position: sticky;
  top: 96px;
}

.info-card ul {
  margin-top: 16px;
}

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-card li:last-child {
  border-bottom: 0;
}

.info-card li span {
  color: var(--muted);
}

.info-card li strong {
  text-align: right;
  color: var(--ink);
}

.detail-tag-list span {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #dbeafe;
}

.related-section {
  padding-bottom: 72px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 260px) minmax(160px, 260px);
  gap: 36px;
}

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

.footer-brand p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.footer-column h2 {
  color: #ffffff;
  font-size: 18px;
}

.footer-column ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-column a {
  color: #cbd5e1;
}

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

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

.footer-bottom p {
  margin: 0;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .ranking-panel,
  .info-card {
    position: static;
  }
}

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

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

  .header-inner {
    height: 66px;
    padding: 0 18px;
  }

  .hero-content,
  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 74px 20px 76px;
  }

  .hero-poster {
    display: none;
  }

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

  .home-search,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-toolbar,
  .search-toolbar {
    grid-template-columns: 1fr;
  }

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

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

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

  .search-panel {
    padding: 0 14px;
  }

  .search-panel-inner,
  .page-hero,
  .text-block,
  .info-card {
    border-radius: 18px;
    padding: 22px;
  }

  .content-section {
    padding: 52px 14px 0;
  }

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

  .detail-layout {
    padding: 0 14px;
  }

  .ranking-item,
  .full-ranking .ranking-item {
    grid-template-columns: 40px 54px minmax(0, 1fr);
  }

  .ranking-heat {
    display: none;
  }
}
