:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(96, 165, 250, 0.24);
  --text: #e5edf8;
  --muted: #93a4bb;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --cyan: #22d3ee;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(88, 28, 135, 0.22), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.42);
}

.brand-name {
  font-size: 1.28rem;
  background: linear-gradient(90deg, #fff, var(--blue-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 0.95rem;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(30, 64, 175, 0.5);
}

.header-search,
.mobile-search,
.quick-search-form,
.page-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.quick-search-form input,
.page-filter input {
  width: 230px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  padding: 11px 14px;
  outline: none;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search-form input:focus,
.page-filter input:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.header-search button,
.mobile-search button,
.quick-search-form button {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), #2563eb);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(96, 165, 250, 0.16);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav nav {
  display: grid;
  gap: 8px;
  padding: 14px 0;
}

.home-main,
.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  min-height: clamp(520px, 72vh, 760px);
  margin: 24px auto 32px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.12) 62%);
}

.hero-content {
  position: absolute;
  left: clamp(26px, 7vw, 90px);
  bottom: clamp(42px, 10vw, 110px);
  max-width: 670px;
}

.hero-tags,
.detail-meta,
.card-meta,
.tag-list,
.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.card-meta span,
.tag-list span,
.detail-genres a {
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.34);
  padding: 5px 10px;
  font-size: 0.82rem;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.3rem, 6vw, 5.8rem);
  line-height: 0.95;
  max-width: 820px;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  margin: 0 0 26px;
  max-width: 620px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions,
.detail-info .primary-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.text-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  box-shadow: 0 14px 32px rgba(59, 130, 246, 0.32);
}

.ghost-btn {
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
}

.text-btn,
.section-more {
  color: var(--blue-light);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.58);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: clamp(26px, 7vw, 90px);
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--blue-light);
}

.panel,
.content-section,
.rank-panel,
.wide-card,
.detail-text,
.player-section,
.ranking-list {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px;
  margin-bottom: 34px;
}

.quick-search h2,
.section-head h2,
.rank-panel h2,
.player-section h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.quick-search p,
.section-head p,
.page-hero p,
.card-desc,
.rank-card p,
.detail-text p,
.site-footer p,
.detail-one-line {
  color: var(--muted);
}

.category-chips,
.category-board,
.filter-bar,
.archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips {
  grid-column: 1 / -1;
}

.category-chips a,
.category-board a,
.filter-bar button,
.archive-nav a {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
  padding: 9px 13px;
  transition: 0.2s ease;
}

.category-chips a:hover,
.category-board a:hover,
.filter-bar button:hover,
.filter-bar button.active,
.archive-nav a:hover,
.archive-nav a.active {
  color: #fff;
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(37, 99, 235, 0.52);
}

.content-section {
  padding: 26px;
  margin: 0 0 34px;
}

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

.section-head p {
  margin: 6px 0 0;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.38);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 48%);
  opacity: 0.9;
}

.year-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  left: 10px;
  background: rgba(37, 99, 235, 0.85);
  padding: 4px 8px;
}

.play-badge {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.84);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  min-height: 2.9em;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 850;
  line-height: 1.35;
}

.card-title:hover,
.rank-title:hover {
  color: var(--blue-light);
}

.card-desc {
  margin: 0 0 12px;
  min-height: 3.1em;
  font-size: 0.92rem;
}

.card-meta {
  gap: 6px;
}

.card-meta span {
  padding: 3px 7px;
  color: #a8c8ff;
  font-size: 0.74rem;
  background: rgba(30, 64, 175, 0.28);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  margin-bottom: 34px;
}

.split-section .content-section,
.split-section .wide-card {
  margin: 0;
}

.rank-panel {
  padding: 24px;
}

.rank-panel ol {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 13px;
}

.rank-panel li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-panel li span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #f97316);
}

.rank-panel li a {
  color: #fff;
  font-weight: 800;
}

.rank-panel li em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.category-board a {
  border-radius: 18px;
  padding: 18px;
  flex-direction: column;
  display: inline-flex;
  align-items: flex-start;
  min-width: 150px;
}

.category-board strong {
  font-size: 1.1rem;
  color: #fff;
}

.category-board span {
  color: var(--muted);
  font-size: 0.9rem;
}

.full-board a {
  width: calc(20% - 8px);
}

.page-shell {
  padding: 26px 0 46px;
}

.page-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin: 0 0 28px;
  padding: clamp(28px, 6vw, 56px);
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 16% 10%, rgba(59, 130, 246, 0.3), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

.eyebrow {
  margin: 0;
  color: var(--blue-light);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-filter input {
  width: min(430px, 70vw);
}

.filter-bar,
.archive-nav {
  margin: 0 0 26px;
}

.filter-bar button,
.archive-nav a {
  cursor: pointer;
}

.ranking-list {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.rank-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, #0f172a, #1e40af);
}

.rank-poster span {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  font-weight: 950;
  background: linear-gradient(135deg, var(--gold), #fb923c);
}

.rank-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--blue-light);
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  margin-bottom: 34px;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.3), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.7));
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 26px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  box-shadow: 0 28px 64px rgba(2, 6, 23, 0.46);
}

.detail-info h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1.04;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: 1.1rem;
}

.detail-meta,
.detail-genres,
.tag-list {
  margin: 14px 0;
}

.player-section {
  padding: 24px;
  margin-bottom: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  box-shadow: 0 18px 46px rgba(59, 130, 246, 0.42);
}

.detail-text {
  padding: 24px;
  margin-bottom: 28px;
}

.detail-text p {
  margin: 12px 0 0;
  font-size: 1.04rem;
}

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.16);
  background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 36px;
  padding: 38px 0;
}

.footer-brand {
  color: #fff;
  font-size: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

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

.footer-links a:hover {
  color: var(--blue-light);
}

.footer-bottom {
  border-top: 1px solid rgba(96, 165, 250, 0.12);
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

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

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

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

  .split-section,
  .page-hero,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    order: -1;
  }

  .full-board a {
    width: calc(25% - 8px);
  }
}

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

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

  body.menu-open .mobile-nav {
    display: block;
  }

  .mobile-search input {
    width: 100%;
  }

  .mobile-search {
    align-items: stretch;
  }

  .quick-search,
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .quick-search-form,
  .page-filter {
    width: 100%;
  }

  .quick-search-form input,
  .page-filter input {
    width: 100%;
  }

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

  .hero-slider {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    right: 24px;
  }

  .rank-card {
    grid-template-columns: 92px 1fr;
  }

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

  .detail-cover {
    max-width: 280px;
  }

  .full-board a {
    width: calc(50% - 8px);
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .home-main,
  .page-shell,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1240px);
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .movie-grid,
  .compact-grid {
    gap: 12px;
  }

  .card-body,
  .content-section,
  .panel,
  .rank-panel,
  .player-section,
  .detail-text {
    padding: 16px;
  }

  .card-desc {
    display: none;
  }

  .card-title {
    min-height: 2.7em;
    font-size: 0.95rem;
  }

  .full-board a {
    width: 100%;
  }
}
