:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --gold: #fbbf24;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 4%, rgba(34, 211, 238, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(37, 99, 235, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #00121a;
  font-size: 14px;
  background: linear-gradient(135deg, #67e8f9, #38bdf8 55%, #a78bfa);
  box-shadow: 0 12px 35px rgba(34, 211, 238, 0.32);
}

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

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

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  border-radius: 999px;
  padding: 10px 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: white;
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

.quick-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
  margin-left: auto;
}

.quick-search input,
.wide-search input,
.library-search {
  width: 100%;
  color: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.82);
  padding: 12px 18px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quick-search input:focus,
.wide-search input:focus,
.library-search:focus {
  border-color: rgba(34, 211, 238, 0.68);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.site-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: min(420px, 92vw);
  max-height: 480px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.search-result-item:hover {
  background: rgba(34, 211, 238, 0.12);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.9);
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span,
.search-empty {
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  color: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.88);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

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

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 110px 0 86px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.42);
  padding: 7px 12px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.rank-more,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  color: #021018;
  background: linear-gradient(135deg, #67e8f9, #38bdf8 58%, #60a5fa);
  padding: 14px 22px;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.72);
  padding: 13px 21px;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.rank-more:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: white;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.86);
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.36);
}

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

.hero-prev,
.hero-next,
.hero-dot {
  cursor: pointer;
}

.hero-prev,
.hero-next {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.42);
}

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

.search-hero-panel,
.page-hero,
.player-section,
.detail-content-grid,
.page-section {
  margin-top: 54px;
}

.search-hero-panel,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.38));
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
}

.search-hero-panel h2,
.section-heading h2,
.page-hero h1,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-hero-panel h2,
.section-heading h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.search-hero-panel p,
.section-heading p,
.page-hero p,
.movie-card p,
.category-tile strong,
.category-overview-body p,
.detail-article p,
.detail-side dd,
.site-footer p {
  color: var(--muted);
  line-height: 1.78;
}

.wide-search {
  position: relative;
}

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

.section-more,
.text-link,
.rank-more {
  color: var(--cyan);
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: white;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.score-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #111827;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #facc15);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 900;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #cbd5e1;
  font-size: 13px;
}

.movie-meta-row span {
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  padding: 4px 8px;
}

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

.tag-row span {
  color: #bfdbfe;
  background: rgba(30, 41, 59, 0.72);
}

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

.category-tile,
.category-overview-card,
.rank-panel,
.detail-side,
.detail-article,
.player-card,
.library-tools {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
}

.category-tile {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.category-tile > a {
  display: grid;
  gap: 10px;
}

.category-tile span {
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.category-tile div,
.category-sample-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tile div a,
.category-sample-links a,
.footer-links a {
  color: #cbd5e1;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  padding: 6px 10px;
  font-size: 13px;
}

.category-tile div a:hover,
.category-sample-links a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

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

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 20px;
}

.rank-panel-title {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 900;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr 42px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #06121b;
  border-radius: 10px;
  background: linear-gradient(135deg, #67e8f9, #facc15);
  font-weight: 900;
}

.rank-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.rank-more {
  margin-top: 16px;
}

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

.small-hero,
.category-hero,
.rank-hero {
  min-height: 280px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  overflow: hidden;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: rgba(15, 23, 42, 0.92);
}

.category-cover img {
  width: 100%;
  height: 145px;
  object-fit: cover;
}

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

.category-overview-body h2 {
  margin: 0;
  font-size: 24px;
}

.library-tools {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
}

.sticky-tools {
  position: sticky;
  top: 86px;
  z-index: 40;
  backdrop-filter: blur(16px);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pills button {
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  padding: 8px 13px;
  cursor: pointer;
}

.filter-pills button.is-active,
.filter-pills button:hover {
  color: #00121a;
  border-color: transparent;
  background: var(--cyan);
}

.rank-grid .movie-card {
  padding-top: 36px;
}

.rank-num {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #07111c;
  border-radius: 14px;
  background: linear-gradient(135deg, #fde68a, #67e8f9);
  font-weight: 950;
}

.detail-hero {
  min-height: 560px;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 44px;
  align-items: end;
  min-height: 560px;
  padding: 110px 0 54px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

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

.detail-poster span {
  position: absolute;
  right: 16px;
  top: 16px;
  color: #111827;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #facc15);
  padding: 8px 12px;
  font-weight: 950;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #bae6fd;
  font-size: 14px;
}

.crumbs a:hover {
  color: white;
}

.detail-meta {
  margin-top: 20px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.44) 42%, rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.player-start {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.38);
  font-size: 30px;
  transform: translateZ(0);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: clamp(22px, 4vw, 34px);
}

.detail-article h2,
.detail-side h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.detail-article p {
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: #e2e8f0;
  font-weight: 850;
}

.detail-side dd {
  margin: -8px 0 0;
}

.related-grid .movie-card p,
.compact-card p {
  min-height: 0;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 950;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-bottom {
  color: #64748b;
  border-top: 1px solid var(--line);
  padding: 18px;
  text-align: center;
}

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

@media (max-width: 1024px) {
  .hero-inner,
  .detail-layout,
  .split-section,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .quick-search {
    max-width: none;
  }

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

  .hero-inner {
    padding-top: 92px;
  }

  .search-hero-panel,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .category-cover img {
    height: 180px;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .nav-shell {
    gap: 10px;
    min-height: 66px;
  }

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

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 12px;
  }

  .quick-search {
    display: none;
  }

  .mobile-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    gap: 24px;
  }

  .hero-copy h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 250px;
  }

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

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

  .detail-layout {
    min-height: 640px;
    padding-top: 88px;
  }

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