* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #ef4444;
  --slate: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
  height: 68px;
  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(--text);
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

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

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

.main-nav a {
  padding: 10px 16px;
  color: #334155;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
  background: #eff6ff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #020617);
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.image-hidden {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(37, 99, 235, 0.46), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.15)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.08) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
}

.hero-kicker,
.hero-tags,
.movie-meta,
.tag-list,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.78);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.hero-kicker span:first-child {
  background: rgba(239, 68, 68, 0.88);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.search-form button,
.search-page-form button,
.filter-panel button,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button,
.search-page-form button,
.filter-panel button,
.rank-action {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

.primary-button:hover,
.search-form button:hover,
.search-page-form button:hover,
.filter-panel button:hover,
.rank-action:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot,
.hero-arrow {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
}

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.search-band {
  position: relative;
  z-index: 6;
  margin-top: -38px;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-band h2,
.search-band p {
  margin: 0;
}

.search-band p {
  color: var(--muted);
}

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

.search-form input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.search-form input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.main-stack,
.page-main {
  padding: 56px 0;
}

.main-stack {
  display: grid;
  gap: 52px;
}

.content-section {
  margin-bottom: 46px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-title-row h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-more,
.ghost-link {
  color: var(--primary);
  font-weight: 700;
}

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

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

.movie-card,
.small-card,
.category-overview-card,
.rank-row,
.detail-article,
.related-panel,
.filter-panel,
.search-page-form,
.search-summary {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 18%, rgba(59, 130, 246, 0.35), transparent 30%),
    linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-frame img,
.small-poster img,
.rank-poster img,
.overview-covers img,
.player-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.82);
  font-size: 12px;
}

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

.movie-card h3,
.small-card h3,
.rank-info h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.small-card h3 a:hover,
.rank-info h2 a:hover {
  color: var(--primary);
}

.movie-card p,
.small-card p,
.rank-info p,
.category-overview-card p,
.detail-article p,
.related-panel p {
  margin: 0;
  color: var(--muted);
}

.movie-meta {
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-list {
  margin-top: 12px;
}

.tag-list span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
}

.category-section {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
}

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

.category-tile {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.category-tile:hover {
  color: #ffffff;
  background: var(--primary);
  transform: translateY(-3px);
}

.category-name {
  font-size: 18px;
  font-weight: 800;
}

.category-count,
.category-example {
  color: #64748b;
  font-size: 13px;
}

.category-tile:hover .category-count,
.category-tile:hover .category-example {
  color: rgba(255, 255, 255, 0.82);
}

.latest-list,
.related-list {
  display: grid;
  gap: 16px;
}

.small-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
}

.small-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.page-hero {
  padding: 70px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(59, 130, 246, 0.38), transparent 32%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb em {
  font-style: normal;
  opacity: 0.5;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
}

.result-count {
  color: var(--muted);
  font-weight: 700;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 22px;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 210px;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.overview-body {
  padding: 24px;
}

.overview-body h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.overview-body span {
  display: inline-flex;
  margin-top: 22px;
  color: var(--primary);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.rank-number {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  color: var(--primary);
}

.rank-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.player-section {
  padding: 34px 0 46px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 0%, rgba(37, 99, 235, 0.42), transparent 34%),
    linear-gradient(135deg, #020617, #0f172a 60%, #1e3a8a);
}

.detail-breadcrumb {
  margin: 0 0 22px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
}

.video-player {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 70% 20%, rgba(37, 99, 235, 0.38), transparent 32%),
    #020617;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
}

.video-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24));
  cursor: pointer;
  text-align: center;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.45);
  font-size: 30px;
}

.play-overlay strong {
  max-width: 80%;
  font-size: 28px;
}

.play-overlay em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.player-side {
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.player-side img {
  height: 250px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.player-side h1 {
  margin: 18px 0 10px;
  line-height: 1.2;
}

.player-side p {
  color: rgba(255, 255, 255, 0.78);
}

.stacked-meta span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 44px 0 58px;
}

.detail-article,
.related-panel {
  border-radius: 22px;
  padding: 26px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.detail-article h2,
.related-panel h2 {
  margin: 0 0 14px;
}

.detail-article p {
  margin-bottom: 24px;
  color: #334155;
  font-size: 17px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  font-weight: 700;
}

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

.search-page-form {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius);
}

.search-summary {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--muted);
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
  padding: 42px 0;
}

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

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

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .video-player {
    min-height: 420px;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

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

  .hero-actions,
  .search-form,
  .search-page-form,
  .section-title-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .movie-grid,
  .compact-grid,
  .search-results,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .overview-covers {
    min-height: 180px;
  }

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

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

  .rank-action {
    grid-column: 1 / -1;
  }

  .small-card {
    grid-template-columns: 96px 1fr;
  }

  .video-player {
    min-height: 280px;
    border-radius: 18px;
  }

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

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