:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.16), transparent 34rem),
    radial-gradient(circle at 82% 4%, rgba(139, 92, 246, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #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;
}

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

img {
  display: block;
  max-width: 100%;
  background: rgba(15, 23, 42, 0.8);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #06111f;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.32);
}

.brand-name {
  font-size: 1.18rem;
  background: linear-gradient(90deg, #f8fafc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

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

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.tool-search input,
.big-search input {
  width: 250px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: none;
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  padding: 11px 16px;
}

.header-search button,
.mobile-panel button {
  border: 0;
  color: #08111f;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

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

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

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

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

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

.hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.page-hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-bg::after,
.page-hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at 74% 30%, rgba(34, 211, 238, 0.18), transparent 30rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 46px;
  padding: 64px;
}

.eyebrow,
.section-kicker,
.category-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #67e8f9;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 16px 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.one-line {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #05101e;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(226, 232, 240, 0.2);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.52);
}

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

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

.hero-tags a,
.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.58);
  padding: 7px 11px;
  font-size: 0.85rem;
}

.hero-poster {
  position: relative;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.58);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
  padding: 12px 14px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 32px;
  z-index: 6;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.3);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

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

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

.section-head h2,
.rank-panel-head h2,
.text-card h2 {
  margin: 6px 0 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-more,
.rank-more {
  color: var(--cyan);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 56px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 26px 70px rgba(8, 145, 178, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.9);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04101e;
  background: rgba(103, 232, 249, 0.95);
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.3);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #04101e;
  background: linear-gradient(135deg, #facc15, #fb923c);
  font-size: 0.88rem;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-body h3 {
  min-height: 3.1em;
  margin: 9px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 4.6em;
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 0.92rem;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  isolation: isolate;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(34, 211, 238, 0.18));
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.3);
  transition: transform 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.category-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.category-card em {
  display: block;
  max-width: 92%;
  margin-top: 10px;
  color: rgba(248, 250, 252, 0.78);
  font-style: normal;
}

.category-card img {
  position: absolute;
  right: -18px;
  bottom: -34px;
  z-index: -1;
  width: 122px;
  height: 174px;
  border-radius: 18px;
  object-fit: cover;
  opacity: 0.58;
  transform: rotate(9deg);
}

.from-blue-500.to-cyan-400 { background: linear-gradient(135deg, #3b82f6, #22d3ee); }
.from-purple-500.to-pink-400 { background: linear-gradient(135deg, #8b5cf6, #f472b6); }
.from-orange-500.to-red-400 { background: linear-gradient(135deg, #f97316, #f87171); }
.from-emerald-500.to-teal-400 { background: linear-gradient(135deg, #10b981, #2dd4bf); }
.from-red-500.to-amber-400 { background: linear-gradient(135deg, #ef4444, #f59e0b); }
.from-indigo-500.to-violet-400 { background: linear-gradient(135deg, #6366f1, #a78bfa); }
.from-yellow-500.to-orange-400 { background: linear-gradient(135deg, #eab308, #fb923c); }
.from-rose-500.to-fuchsia-400 { background: linear-gradient(135deg, #f43f5e, #e879f9); }
.from-slate-500.to-sky-400 { background: linear-gradient(135deg, #64748b, #38bdf8); }
.from-cyan-500.to-blue-500 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 94px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  padding: 22px;
  box-shadow: var(--shadow);
}

.rank-panel-head {
  margin-bottom: 16px;
}

.rank-panel-head span {
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rank-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-num {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

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

.rank-more {
  display: inline-flex;
  margin-top: 16px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.page-hero > div:not(.page-hero-bg) {
  position: relative;
  z-index: 2;
  padding: 70px 64px;
}

.slim-hero {
  background:
    radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.18), transparent 22rem),
    rgba(15, 23, 42, 0.78);
}

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

.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  padding: 16px;
}

.tool-search {
  flex: 1 1 280px;
}

.tool-search input {
  width: min(420px, 100%);
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-chips button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.78);
  padding: 9px 12px;
  cursor: pointer;
}

.tool-chips button:hover,
.tool-chips button.is-active {
  border-color: rgba(34, 211, 238, 0.5);
  color: #06111f;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 64px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.58);
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5.2vw, 4.7rem);
}

.detail-meta {
  margin-top: 22px;
}

.detail-tags {
  margin-top: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.video-cover.is-hidden {
  display: none;
}

.video-play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04101e;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 58px rgba(34, 211, 238, 0.32);
}

.video-cover strong {
  max-width: min(90%, 760px);
  font-size: clamp(1.1rem, 3vw, 2rem);
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  padding: 26px;
}

.text-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
}

.big-search {
  display: grid;
  grid-template-columns: minmax(0, 420px) auto;
  gap: 12px;
  margin-top: 28px;
}

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

.site-footer {
  margin-top: 90px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0;
  color: #94a3b8;
}

.footer-brand {
  color: #f8fafc;
  font-size: 1.2rem;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #cbd5e1;
}

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

.movie-card.is-hidden {
  display: none;
}

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

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

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

  .hero-content {
    grid-template-columns: 1fr 280px;
    padding: 48px;
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    gap: 12px;
  }

  .hero-stage,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 34px;
  }

  .hero-poster {
    display: none;
  }

  .hero-dots {
    left: 34px;
  }

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

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

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

  .list-tools,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 1rem;
  }

  .hero,
  .section,
  .page-hero,
  .detail-hero,
  .breadcrumb {
    width: min(100% - 20px, 1240px);
  }

  .hero-stage,
  .page-hero,
  .detail-hero {
    border-radius: 24px;
  }

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

  .hero-content,
  .page-hero > div:not(.page-hero-bg),
  .detail-layout {
    padding: 26px;
  }

  .feature-grid,
  .movie-grid,
  .category-grid,
  .large-category-grid,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .card-body h3,
  .card-body p {
    min-height: auto;
  }

  .big-search {
    grid-template-columns: 1fr;
  }
}
