
:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: #1e293b;
  --muted: #94a3b8;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --amber: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  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;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 34rem),
    var(--bg);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.25);
}

.header-inner,
.footer-inner,
.page-container,
.hero-content,
.hero-dots {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.75rem;
  display: inline-grid;
  place-items: center;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.36);
}

.brand-text {
  font-size: 1.42rem;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link,
.search-toggle {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.2s ease;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active,
.search-toggle:hover {
  color: var(--cyan);
}

.mobile-menu-button {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.55rem;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 0.28rem 0;
  border-radius: 99px;
  background: #cbd5e1;
}

.mobile-nav {
  display: none;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav a,
.mobile-nav button {
  border: 0;
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
}

.mobile-nav a:hover,
.mobile-nav button:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.search-panel {
  display: none;
  position: absolute;
  inset: 4rem 0 auto 0;
  background: rgba(2, 6, 23, 0.72);
  padding: 1rem;
}

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

.search-panel-inner {
  width: min(100%, 760px);
  margin: 0 auto;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.search-panel-head button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
  cursor: pointer;
}

.search-panel-input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  color: #f8fafc;
  outline: 0;
  background: rgba(2, 6, 23, 0.8);
}

.search-panel-input:focus,
.filter-bar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.search-results {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  max-height: 55vh;
  overflow: auto;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.8rem;
  padding: 0.75rem;
  background: rgba(30, 41, 59, 0.72);
}

.search-result-item strong {
  display: block;
  color: white;
  margin-bottom: 0.25rem;
}

.search-result-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.10) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.hero-copy {
  width: min(100%, 740px);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--cyan);
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
  text-wrap: balance;
}

.hero h2 {
  margin-top: 0.65rem;
  background: linear-gradient(90deg, #fff, #a5f3fc 54%, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 1.35rem 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.8;
  max-width: 680px;
}

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

.hero-tags {
  margin: 1.25rem 0 1.65rem;
}

.hero-tags span,
.tag-row span,
.info-pill {
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.10);
  font-size: 0.85rem;
}

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

.btn-primary,
.btn-secondary,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.85rem;
  padding: 0.75rem 1.25rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.18);
}

.btn-secondary,
.section-more {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(8, 145, 178, 0.8);
}

.hero-control.prev {
  left: 1rem;
}

.hero-control.next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.7rem;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
}

.hero-dots button {
  width: 0.7rem;
  height: 0.7rem;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 2.2rem;
  background: var(--cyan);
}

.page-container {
  padding: 3.2rem 0 4.2rem;
}

.content-section {
  margin-top: 3.4rem;
}

.section-head,
.page-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  color: var(--muted);
  margin: 0.55rem 0 0;
  line-height: 1.7;
}

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

.movie-card {
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.20);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 22px 70px rgba(8, 145, 178, 0.12);
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  filter: brightness(0.72);
}

.quality-badge,
.score-badge {
  position: absolute;
  top: 0.65rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.24rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.quality-badge {
  left: 0.65rem;
  color: #00111a;
  background: var(--cyan);
}

.score-badge {
  right: 0.65rem;
  color: #111827;
  background: var(--amber);
}

.poster-hover {
  position: absolute;
  inset: auto 0.75rem 0.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  padding: 0.7rem;
  color: white;
  background: rgba(8, 145, 178, 0.92);
  opacity: 0;
  transform: translateY(0.6rem);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-hover {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  padding: 0.85rem;
}

.movie-card-title {
  display: block;
  color: white;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.55rem;
}

.movie-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.75rem;
  margin: 0 0 0.65rem;
  color: #aab6c7;
  font-size: 0.84rem;
  line-height: 1.6;
}

.tag-row span {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
}

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

.category-card {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 1.25rem;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 15rem),
    rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.55rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-bar {
  display: grid;
  gap: 0.85rem;
  margin: 1.6rem 0 2rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-buttons button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 4rem 4.6rem 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.88);
}

.rank-num {
  color: var(--cyan);
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  width: 4.6rem;
  aspect-ratio: 2 / 3;
  border-radius: 0.65rem;
  object-fit: cover;
  background: #111827;
}

.rank-info strong {
  display: block;
  margin-bottom: 0.25rem;
  color: white;
}

.rank-info span {
  color: var(--muted);
  font-size: 0.88rem;
}

.rank-score {
  color: var(--amber);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 1.4rem;
  align-items: start;
}

.detail-main,
.detail-side,
.player-card {
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 1.15rem;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 0.8rem;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-icon {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.45);
  font-size: 2rem;
}

.detail-title {
  padding: 1.2rem 1.25rem 1.4rem;
}

.detail-title h1 {
  margin-bottom: 0.95rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.detail-section {
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  padding: 1.25rem;
}

.detail-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-poster {
  width: 100%;
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #111827;
}

.side-body {
  padding: 1.1rem;
}

.side-body h2 {
  margin: 0 0 0.75rem;
}

.side-list {
  display: grid;
  gap: 0.7rem;
}

.side-item {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.7rem;
  align-items: center;
}

.side-item img {
  width: 4rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.55rem;
  background: #111827;
}

.side-item strong {
  display: block;
  color: white;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.no-results {
  display: none;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 1rem;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.82);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), #020617);
}

.footer-inner {
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer a:hover {
  color: var(--cyan);
}

.site-footer h3 {
  margin: 0 0 1rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero {
    min-height: 68vh;
  }

  .hero-control {
    display: none;
  }

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

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

  .rank-item {
    grid-template-columns: 2.7rem 4rem 1fr;
  }

  .rank-score {
    grid-column: 3;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .footer-inner,
  .page-container,
  .hero-content,
  .hero-dots {
    width: min(100% - 1rem, 1280px);
  }

  .brand-text {
    font-size: 1.18rem;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 4.5rem;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(2rem, 13vw, 3.8rem);
  }

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

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

  .section-head,
  .page-title-row,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }

  .movie-card-body {
    padding: 0.72rem;
  }
}
