:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --gold: #facc15;
  --danger: #fb7185;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32rem), var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: max-content;
}

.brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong,
.footer-brand {
  font-weight: 800;
  font-size: 1.15rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 0.25rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.74rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  font-size: 0.92rem;
  white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #60a5fa;
}

.header-search,
.mobile-search,
.wide-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 15rem;
  padding: 0.65rem 0.9rem;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.rank-action,
.line-link {
  border: 0;
  cursor: pointer;
  border-radius: 0.9rem;
  font-weight: 700;
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.rank-action {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 42px rgba(59, 130, 246, 0.28);
}

.header-search button,
.mobile-search button {
  padding: 0.65rem 0.9rem;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.55rem 0.75rem;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--line);
}

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

.mobile-nav a {
  padding: 0.7rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.75);
}

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

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.2) 100%), linear-gradient(to right, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

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

.hero-kicker,
.section-head p,
.page-hero p,
.detail-kicker {
  color: #67e8f9;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 0.4rem 0 1rem;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-content p:not(.hero-kicker) {
  max-width: 720px;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
}

.ghost-btn {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.55);
  font-size: 2.1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(59, 130, 246, 0.9);
}

.hero-prev {
  left: 1.25rem;
}

.hero-next {
  right: 1.25rem;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.65rem;
  height: 0.65rem;
  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: 2.2rem;
  background: #60a5fa;
}

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.dark-rise {
  max-width: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0));
}

.dark-rise > .section-head,
.dark-rise > .movie-grid,
.dark-rise > .category-grid,
.dark-rise > .overview-stack,
.dark-rise > .related-grid {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.center-head {
  display: grid;
  place-items: center;
  text-align: center;
}

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.section-head a,
.line-link {
  color: #93c5fd;
  font-weight: 800;
}

.quick-search {
  padding-top: 2.8rem;
  padding-bottom: 2.8rem;
}

.wide-search {
  max-width: 780px;
  margin: 0 auto;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.wide-search input {
  flex: 1;
  padding: 1rem 1.1rem;
  border: 0;
  background: transparent;
}

.wide-search button {
  padding: 1rem 1.2rem;
}

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

.listing-grid {
  margin-top: 1.5rem;
}

.movie-card {
  overflow: hidden;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72));
  border: 1px solid var(--line);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-0.35rem);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.5);
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-badge {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: white;
  background: rgba(59, 130, 246, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
}

.card-body {
  padding: 1rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-body h2,
.rank-info h2 {
  margin: 0.55rem 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-info h2 a:hover {
  color: #60a5fa;
}

.card-body p,
.rank-info p,
.category-card span,
.category-overview-card p,
.site-footer p,
.page-hero span,
.detail-copy p {
  color: #cbd5e1;
  line-height: 1.75;
}

.card-body p {
  min-height: 4.1rem;
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}

.small-card .card-body p,
.small-card .tag-row,
.small-card .card-meta {
  display: none;
}

.small-card .card-body {
  padding: 0.75rem;
}

.small-card .card-body h2 {
  font-size: 0.9rem;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  padding: 1.2rem;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 18rem), rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-0.25rem);
  border-color: rgba(96, 165, 250, 0.42);
}

.category-card strong,
.overview-title h2 {
  font-size: 1.35rem;
}

.category-card em {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-style: normal;
}

.category-card em a {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 1.25rem 3rem;
}

.slim-hero,
.category-hero,
.ranking-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.filter-panel {
  position: sticky;
  top: 4.7rem;
  z-index: 20;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(16px);
}

.filter-panel input {
  min-width: 16rem;
  flex: 1;
  padding: 0.9rem 1rem;
}

.filter-panel select {
  padding: 0.9rem 1rem;
}

.overview-stack {
  display: grid;
  gap: 1.4rem;
}

.category-overview-card {
  grid-template-columns: 0.9fr 2fr auto;
  align-items: center;
}

.overview-title h2 {
  margin: 0 0 0.45rem;
}

.overview-movies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 3.4rem 7rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  color: white;
  background: linear-gradient(135deg, var(--danger), var(--gold));
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #0f172a;
}

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

.rank-action {
  padding: 0.65rem 0.95rem;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: #60a5fa;
}

.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.34));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 60px rgba(59, 130, 246, 0.45);
  font-size: 2rem;
  padding-left: 0.25rem;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.3rem;
  border: 1px solid var(--line);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
}

.detail-copy {
  padding: 0.5rem 0;
}

.detail-copy h1 {
  margin-top: 0.5rem;
}

.detail-copy h2 {
  margin-top: 1.7rem;
  font-size: 1.25rem;
}

.lead-text {
  font-size: 1.15rem;
  color: #e0f2fe !important;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.detail-info span {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  color: #dbeafe;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h2 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

  .header-search {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .header-search {
    display: none;
  }

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

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    padding-left: 4.6rem;
    padding-right: 4.6rem;
  }

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

  .category-overview-card,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 2.8rem 5rem 1fr;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

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

@media (max-width: 620px) {
  .nav-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 5.5rem 1rem 4rem;
  }

  .hero-arrow {
    top: auto;
    bottom: 5.5rem;
    width: 2.6rem;
    height: 2.6rem;
  }

  .hero-prev {
    left: 1rem;
  }

  .hero-next {
    right: 1rem;
  }

  .section-block,
  .page-hero,
  .player-section,
  .breadcrumb {
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

  .wide-search,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel {
    position: static;
  }

  .filter-panel input,
  .filter-panel select {
    min-width: 0;
    width: 100%;
  }

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

  .rank-row {
    grid-template-columns: 2.5rem 4.4rem 1fr;
    gap: 0.7rem;
  }

  .rank-info p {
    display: none;
  }

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