:root {
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.88);
  --surface-strong: #0f172a;
  --surface-soft: rgba(30, 41, 59, 0.64);
  --border: rgba(148, 163, 184, 0.16);
  --border-cyan: rgba(6, 182, 212, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --amber: #fbbf24;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.14), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(37, 99, 235, 0.18), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

body.no-scroll {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(6, 182, 212, 0.16));
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(100%, var(--max-width));
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06);
  box-shadow: 0 14px 40px rgba(6, 182, 212, 0.38);
}

.brand-text,
.footer-logo span:last-child {
  font-size: 20px;
  background: linear-gradient(90deg, var(--cyan), #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.95);
}

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

.page-main {
  padding-top: 64px;
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.active img {
  transform: scale(1);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 52%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - var(--max-width)) / 2 + 20px));
  bottom: 15%;
  width: min(680px, calc(100% - 56px));
}

.eyebrow,
.hero-label {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-tags,
.tag-row,
.tag-cloud,
.detail-tags,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.tag-cloud span,
.detail-tags span,
.card-meta span {
  border: 1px solid var(--border-cyan);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.08);
  color: var(--cyan);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.quick-search-form button,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 15px 36px rgba(6, 182, 212, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost-button {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: none;
}

.primary-button:hover,
.ghost-button:hover,
.quick-search-form button:hover,
.search-box button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.38);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(8, 145, 178, 0.9);
  border-color: var(--border-cyan);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan-strong);
}

.stats-strip,
.quick-search,
.content-section,
.category-grid-section,
.ranking-section,
.search-page,
.cta-panel,
.detail-layout {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 28px 0 8px;
}

.stats-strip div,
.quick-search,
.cta-panel,
.filter-panel,
.text-panel,
.sticky-box,
.player-card,
.category-card a {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats-strip div {
  padding: 18px;
  text-align: center;
}

.stats-strip strong {
  display: block;
  color: var(--cyan);
  font-size: 30px;
  line-height: 1;
}

.stats-strip span {
  color: var(--muted);
  font-size: 13px;
}

.quick-search,
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: 28px;
  padding: 28px;
}

.quick-search h2,
.cta-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
}

.quick-search-form,
.search-box {
  display: flex;
  gap: 10px;
}

.quick-search-form input,
.search-box input,
.filter-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search-form input:focus,
.search-box input:focus,
.filter-search input:focus {
  border-color: var(--border-cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.08);
}

.content-section,
.category-grid-section,
.ranking-section,
.search-page {
  padding: 64px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-cyan);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.16);
}

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(6, 182, 212, 0.16));
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.card-link:hover img {
  transform: scale(1.08);
}

.play-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(6, 182, 212, 0.82);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
}

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

.rank-badge {
  top: 12px;
  left: 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.92);
  color: #111827;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.58);
  color: #cbd5e1;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  padding: 3px 8px;
  font-size: 11px;
}

.page-hero {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 66px 0 18px;
}

.page-hero.compact h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
}

.page-hero.compact p:not(.eyebrow) {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

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

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

.category-card a {
  display: grid;
  overflow: hidden;
  min-height: 310px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card a:hover {
  transform: translateY(-4px);
  border-color: var(--border-cyan);
}

.category-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.category-card div {
  padding: 18px;
}

.category-card span {
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
}

.category-card h2 {
  margin: 8px 0;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-search span,
.filter-hint {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.filter-hint {
  margin-bottom: 0;
}

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

.ranking-item a {
  display: grid;
  grid-template-columns: 86px 180px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item a:hover {
  transform: translateX(4px);
  border-color: var(--border-cyan);
}

.ranking-number {
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 180px;
  height: 100px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-info h2 {
  margin: 7px 0 5px;
  font-size: 21px;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-play {
  justify-self: end;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
  padding: 8px 16px;
  font-weight: 800;
}

.search-page {
  min-height: 620px;
}

.search-box {
  width: min(100%, 760px);
  margin-bottom: 14px;
}

.search-stats {
  color: var(--muted);
  margin-bottom: 24px;
}

.cta-panel {
  margin-top: 72px;
  margin-bottom: 80px;
}

.cta-panel p {
  margin: 0;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-top: 46px;
}

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

.player-card {
  overflow: hidden;
  background: #000;
}

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

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(6, 182, 212, 0.88);
  cursor: pointer;
  font-size: 30px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.34);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-card.playing .big-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.86);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #cbd5e1;
  padding: 8px 14px;
  font-size: 13px;
}

.player-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.8));
}

.player-controls button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
}

.player-controls button:hover {
  border-color: var(--border-cyan);
  color: var(--cyan);
}

.detail-info {
  padding-top: 28px;
}

.detail-info h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.one-line {
  color: #cbd5e1;
  font-size: 20px;
  font-weight: 700;
}

.tag-cloud {
  margin: 20px 0;
}

.text-panel {
  padding: 24px;
  margin-top: 18px;
}

.text-panel h2,
.sticky-box h2 {
  margin: 0 0 14px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  white-space: pre-line;
}

.sticky-box {
  position: sticky;
  top: 86px;
  padding: 18px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.related-item:hover {
  border-color: var(--border-cyan);
  background: rgba(30, 41, 59, 0.62);
}

.related-item img {
  width: 116px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.related-item strong,
.related-item small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.related-item strong {
  color: #fff;
  -webkit-line-clamp: 1;
}

.related-item small {
  color: var(--muted);
  font-size: 12px;
  -webkit-line-clamp: 2;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 30px;
}

.footer-brand p,
.footer-links a {
  color: var(--muted);
}

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

.footer-link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

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

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

  .sticky-box {
    position: static;
  }
}

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

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

  .hero {
    min-height: 520px;
  }

  .hero-content {
    bottom: 14%;
  }

  .hero-arrow {
    display: none;
  }

  .stats-strip,
  .quick-search,
  .cta-panel,
  .footer-inner,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .ranking-item a {
    grid-template-columns: 60px 120px minmax(0, 1fr);
  }

  .ranking-play {
    display: none;
  }

  .ranking-item img {
    width: 120px;
    height: 76px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .stats-strip,
  .quick-search,
  .content-section,
  .category-grid-section,
  .ranking-section,
  .search-page,
  .cta-panel,
  .detail-layout,
  .page-hero,
  .footer-inner {
    width: min(100% - 28px, var(--max-width));
  }

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

  .hero {
    min-height: 500px;
    height: 68vh;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

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

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

  .quick-search-form,
  .search-box,
  .player-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-item a {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ranking-number {
    text-align: left;
  }

  .ranking-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .related-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .related-item img {
    width: 96px;
    height: 62px;
  }
}
