:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #34d399;
  --teal: #2dd4bf;
  --rose: #fb7185;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(45, 212, 191, 0.28);
  transition: transform 0.24s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  background: linear-gradient(90deg, #a7f3d0, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #dbeafe;
  border-radius: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.72);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.55);
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
  display: block;
  padding: 13px 16px;
}

.hero-carousel {
  position: relative;
  height: min(720px, 72vh);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.06);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.3) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.04) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.62fr);
  align-items: center;
  gap: clamp(28px, 6vw, 78px);
  padding: 56px 0 76px;
}

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

.kicker {
  margin: 0 0 12px;
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-info p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.tag-row span,
.tag-cloud span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

.hero-meta span {
  padding: 8px 14px;
  backdrop-filter: blur(8px);
}

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

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

.primary-btn,
.home-search button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #032b22;
  box-shadow: 0 16px 38px rgba(45, 212, 191, 0.26);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.45);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  display: block;
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 38px;
  background: #ffffff;
}

.quick-search {
  position: relative;
  z-index: 8;
  margin-top: -40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search input {
  min-height: 48px;
  padding: 0 18px;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(52, 211, 153, 0.72);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quick-links a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  color: #e2e8f0;
}

.content-section {
  padding: 72px 0;
}

.content-band {
  margin: 24px 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.58), rgba(30, 41, 59, 0.45));
  border-block: 1px solid rgba(148, 163, 184, 0.1);
}

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

.section-heading h2,
.site-footer h2,
.info-panel h2,
.side-card h2,
.category-panel h2 {
  margin: 0;
  color: #ffffff;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.section-heading p:not(.kicker),
.category-panel p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.18);
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 18px;
  scrollbar-width: thin;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.poster-link img,
.list-thumb img,
.category-tile img,
.category-panel-cover img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.list-thumb img {
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-link img,
.movie-card:hover .list-thumb img {
  transform: scale(1.08);
}

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

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 36px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  color: #111827;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(251, 113, 133, 0.28);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: #a7f3d0;
}

.card-body p,
.list-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.2em;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 0.75rem;
}

.meta-line {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 0.82rem;
}

.meta-line span + span::before {
  content: "·";
  margin-right: 10px;
  color: rgba(148, 163, 184, 0.7);
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.category-tile img,
.category-glow {
  position: absolute;
  inset: 0;
}

.category-tile img {
  z-index: 0;
  filter: saturate(1.1);
  transition: transform 0.55s ease;
}

.category-glow {
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.24));
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 1.18rem;
}

.category-tile small {
  color: #cbd5e1;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 64px 0 20px;
}

.small-hero,
.category-hero {
  padding-top: 76px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.crumbs a:hover {
  color: #a7f3d0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.filter-empty {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.filter-empty.show {
  display: block;
}

.category-panels {
  display: grid;
  gap: 24px;
  padding: 48px 0 80px;
}

.category-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.category-panel-cover {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
}

.category-panel h2 a:hover {
  color: #a7f3d0;
}

.compact-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
}

.list-thumb {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.list-body p {
  min-height: auto;
  margin-bottom: 6px;
}

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

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.detail-head {
  position: relative;
  z-index: 2;
  padding: 54px 0 72px;
}

.detail-head-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  margin-top: 38px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 54px 0 86px;
}

.player-card,
.info-panel,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22);
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.28));
  color: #ffffff;
  cursor: pointer;
}

.video-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #052e2b;
  font-size: 1.8rem;
  box-shadow: 0 18px 42px rgba(45, 212, 191, 0.32);
}

.info-panel,
.side-card {
  padding: 24px;
  margin-top: 22px;
}

.info-panel p {
  margin: 12px 0 0;
  color: #cbd5e1;
}

.review-panel {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.62));
}

.tag-cloud span {
  padding: 8px 12px;
  color: #cbd5e1;
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 100px;
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
  padding: 48px 0 34px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.55);
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #a7f3d0;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 0.9rem;
}

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .mobile-nav.open {
    display: grid;
    gap: 4px;
  }

  .hero-carousel {
    min-height: 660px;
    height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 38px;
  }

  .hero-poster {
    width: min(260px, 68vw);
    margin: 0 auto;
    transform: none;
  }

  .quick-search,
  .home-search,
  .filter-panel,
  .category-panel,
  .detail-head-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-panel-cover {
    max-height: 280px;
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }
}

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

  .header-inner {
    height: 66px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.035em;
  }

  .hero-actions,
  .hero-meta {
    gap: 9px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .content-section {
    padding: 52px 0;
  }

  .section-heading {
    display: grid;
  }

  .grid-six,
  .grid-four,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

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

  .movie-card-list {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-head {
    padding: 32px 0 44px;
  }

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

  .info-panel,
  .side-card {
    padding: 18px;
  }
}
