:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #06b6d4;
  --accent-strong: #0891b2;
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 18% 8%, rgba(8, 145, 178, 0.18), transparent 35%), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.35);
  color: #fff;
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--soft);
  font-size: 15px;
}

.desktop-nav a,
.footer-links a,
.section-title a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.footer-links a:hover,
.section-title a:hover {
  color: var(--accent);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.big-search input,
.inline-filter input,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  padding: 12px 14px;
}

.header-search input {
  width: 260px;
  padding: 10px 12px;
}

.header-search button,
.mobile-panel button,
.big-search button {
  border: 0;
  border-radius: 14px;
  background: var(--accent-strong);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

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

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--soft);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.hero-shell {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.26), transparent 34%), linear-gradient(135deg, #0f172a, #020617);
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 43%, rgba(2, 6, 23, 0.12) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.26) 62%, rgba(2, 6, 23, 0.84));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 20px 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta span,
.hero-meta a,
.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #cbd5e1;
  padding: 8px 12px;
  font-size: 14px;
}

.hero-meta a,
.detail-meta a {
  color: #67e8f9;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 13px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 14px 46px rgba(6, 182, 212, 0.26);
}

.secondary-btn {
  border: 1px solid rgba(203, 213, 225, 0.18);
  background: rgba(15, 23, 42, 0.68);
  color: #e2e8f0;
}

.primary-btn:hover,
.secondary-btn:hover,
.movie-card:hover,
.small-card:hover,
.rank-row:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 36px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #67e8f9;
}

main {
  padding-bottom: 16px;
}

.home-search-panel,
.section-block,
.page-hero,
.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -34px;
  position: relative;
  z-index: 4;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding-top: 28px;
  padding-bottom: 28px;
}

.home-search-panel h2,
.page-hero h1,
.section-title h2,
.detail-copy h1,
.category-tile h2,
.category-preview h3 {
  margin: 10px 0;
  color: #fff;
}

.home-search-panel p,
.page-hero p,
.category-tile p,
.category-preview p,
.detail-copy p {
  color: var(--soft);
  line-height: 1.8;
}

.big-search {
  display: flex;
  gap: 10px;
}

.big-search button {
  min-width: 128px;
}

.section-block {
  padding-top: 70px;
}

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

.section-title h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-title a {
  color: #67e8f9;
  font-weight: 700;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.9);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.2), transparent 36%), linear-gradient(135deg, #111827, #020617);
}

.wide-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 48%);
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.88);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
}

.card-body strong {
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.card-body span {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-body em,
.small-card em,
.rank-info em,
.rank-meta {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.category-preview,
.category-tile,
.side-card,
.detail-copy,
.home-search-panel,
.page-hero {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.category-preview,
.category-tile {
  border-radius: 26px;
  padding: 24px;
}

.category-preview > a,
.category-tile > a {
  margin-top: 10px;
}

.preview-links,
.footer-links,
.side-list {
  display: grid;
  gap: 10px;
}

.preview-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.preview-links a {
  color: var(--soft);
  font-size: 14px;
}

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

.small-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  padding: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.small-card:hover {
  border-color: rgba(34, 211, 238, 0.32);
}

.small-poster {
  display: block;
  width: 86px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #020617);
}

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

.small-card strong {
  display: block;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  margin-top: 36px;
  border-radius: 28px;
  padding-top: 46px;
  padding-bottom: 46px;
  background: radial-gradient(circle at 78% 18%, rgba(6, 182, 212, 0.18), transparent 34%), rgba(15, 23, 42, 0.72);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
  padding: 7px 11px;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease;
}

.pill:hover {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
}

.inline-filter {
  margin-bottom: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 98px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  padding: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(34, 211, 238, 0.32);
}

.rank-num {
  color: #67e8f9;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #020617);
}

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

.rank-info strong {
  display: block;
  color: #fff;
  margin-bottom: 6px;
}

.rank-info em {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  padding-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.14), transparent 30%), #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at 50% 45%, rgba(6, 182, 212, 0.16), rgba(2, 6, 23, 0.74) 58%);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 18px 54px rgba(6, 182, 212, 0.32);
}

.detail-copy {
  margin-top: 22px;
  border-radius: 28px;
  padding: 26px;
}

.detail-copy h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.detail-copy h2,
.side-card h2,
.site-footer h2 {
  color: #fff;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.lead-text {
  font-size: 18px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #020617);
  box-shadow: var(--shadow);
}

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

.side-card {
  border-radius: 24px;
  padding: 20px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.78);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 44px 20px 24px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links a {
  color: var(--soft);
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: var(--muted);
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .home-search-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 720px) {
  .hero-shell {
    min-height: 620px;
    height: 84vh;
  }

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

  .big-search,
  .section-title {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-row {
    grid-template-columns: 48px 76px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2 / -1;
  }

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

  .side-poster {
    display: none;
  }

  .header-inner {
    padding: 12px 16px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .rank-strip-grid {
    grid-template-columns: 1fr;
  }

  .preview-links {
    grid-template-columns: 1fr;
  }
}
