:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-strong: #0891b2;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.20), transparent 30%),
    radial-gradient(circle at 90% 15%, rgba(37, 99, 235, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.32);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.48);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--soft);
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.86);
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.24);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
  border-radius: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.05);
}

.hero-slide.active .hero-image {
  animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.01);
  }
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.20) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.40) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 76px;
}

.eyebrow,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(6, 182, 212, 0.22);
}

.hero-title {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 38px rgba(2, 6, 23, 0.88);
}

.hero-desc {
  max-width: 760px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  text-shadow: 0 4px 22px rgba(2, 6, 23, 0.78);
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 52px rgba(6, 182, 212, 0.38);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: none;
}

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

.hero-dot {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.32);
}

.hero-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.58);
}

.hero-search {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 24px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
}

.hero-search input,
.filter-input,
.filter-select,
.search-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.86);
  outline: none;
}

.hero-search input {
  border: 0;
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
}

.main-content {
  padding: 54px 0 72px;
}

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

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

.section-heading h1,
.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.detail-title p {
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(6, 182, 212, 0.50);
  box-shadow: var(--shadow);
}

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

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

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

.poster-play {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.94);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.24s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.34);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.card-meta {
  color: var(--muted);
  font-size: 13px;
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.18);
  font-size: 12px;
}

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

.category-tile {
  min-height: 150px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.24), transparent 40%),
    rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.20);
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.46);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  font-size: 24px;
  margin-bottom: 12px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.page-title,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 30px;
  padding-top: 42px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
}

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

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 22px;
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

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

.player-shell,
.detail-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.26);
  overflow: hidden;
}

.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.42)),
    radial-gradient(circle, rgba(6, 182, 212, 0.26), transparent 34%);
  cursor: pointer;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.38);
}

.player-cover strong {
  font-size: clamp(22px, 3vw, 36px);
}

.player-cover span:last-child {
  color: #dbeafe;
}

.detail-card {
  padding: 24px;
}

.detail-card h2,
.detail-main h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-card p,
.detail-main p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 14px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.meta-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.meta-list span:first-child {
  color: var(--muted);
}

.meta-list span:last-child {
  text-align: right;
  color: white;
  font-weight: 700;
}

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

.article-panel {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
}

.search-panel {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto 36px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

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

.result-list {
  display: grid;
  gap: 14px;
}

.result-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.70);
  transition: 0.22s ease;
}

.result-item:hover {
  border-color: rgba(6, 182, 212, 0.44);
  transform: translateY(-2px);
}

.result-item img {
  aspect-ratio: 2 / 3;
  height: 126px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.result-item strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 28px;
  padding: 40px 0;
}

.footer-grid p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin: 9px 0;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px 0;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .mobile-nav .nav-link {
    justify-content: center;
  }

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

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

  .hero-content {
    padding-bottom: 92px;
  }

  .hero-search,
  .filter-bar,
  .search-panel form {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

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

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

  .result-item {
    grid-template-columns: 76px 1fr;
  }

  .result-item img {
    height: 110px;
  }
}

@media (max-width: 500px) {
  .site-container,
  .content-section,
  .detail-main,
  .page-title,
  .detail-hero,
  .search-results,
  .search-panel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-title {
    font-size: 38px;
  }

  .section-heading {
    display: block;
  }
}
