:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.82);
  --line: rgba(59, 130, 246, 0.24);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.25), transparent 32%), linear-gradient(180deg, #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;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.navbar {
  max-width: 1280px;
  height: 68px;
  padding: 0 24px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 1.18rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

.nav-dropdown {
  position: relative;
  padding: 20px 0;
}

.dropdown-menu {
  position: absolute;
  top: 60px;
  left: -18px;
  min-width: 180px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 10px;
}

.dropdown-menu a:hover {
  background: rgba(37, 99, 235, 0.22);
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
  padding: 10px;
}

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78) 62%, #020617 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.72), transparent 68%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  z-index: 3;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 13px;
  border-radius: 999px;
  color: #e0f2fe;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.92), rgba(37, 99, 235, 0.92));
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 12px;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 18px;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.34);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.76);
  transform: translateY(-50%) scale(1.08);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

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

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

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

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

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.section-head.compact {
  margin-bottom: 20px;
}

.section-link {
  color: var(--cyan);
  font-weight: 750;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 24px;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.category-icon,
.category-overview-card span {
  display: block;
  font-size: 2.3rem;
  margin-bottom: 16px;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  font-size: 1.16rem;
}

.category-card em,
.category-overview-card p {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.from-cyan {
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.from-blue {
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.from-amber {
  background: linear-gradient(135deg, #d97706, #7c2d12);
}

.from-purple {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.from-rose {
  background: linear-gradient(135deg, #e11d48, #7f1d1d);
}

.from-slate {
  background: linear-gradient(135deg, #334155, #020617);
}

.from-green {
  background: linear-gradient(135deg, #059669, #164e63);
}

.from-orange {
  background: linear-gradient(135deg, #ea580c, #be123c);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 150px;
  gap: 14px;
  margin: 0 0 28px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
}

.search-box input,
.filter-select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}

.filter-select {
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
}

.filter-select option {
  color: #0f172a;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(59, 130, 246, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.46);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
  opacity: 0.8;
}

.play-pill,
.duration-pill,
.card-rank {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.play-pill {
  left: 14px;
  bottom: 12px;
  padding: 6px 12px;
  background: rgba(6, 182, 212, 0.92);
}

.duration-pill {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.74);
}

.card-rank {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: white;
  font-size: 1.02rem;
  font-weight: 820;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 6px;
  font-size: 0.76rem;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.detail-tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.13);
  border: 1px solid rgba(14, 165, 233, 0.18);
  font-size: 0.75rem;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.rank-panel {
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(2, 6, 23, 0.94));
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow);
}

.rank-panel.large {
  max-width: 920px;
  margin: 0 auto;
}

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

.rank-line {
  display: grid;
  grid-template-columns: 40px 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
  background: rgba(15, 23, 42, 0.8);
  transform: translateX(3px);
}

.rank-line img {
  width: 90px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #cbd5e1;
  background: #334155;
  font-weight: 900;
}

.rank-no.gold {
  color: white;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-no.silver {
  color: #1f2937;
  background: linear-gradient(135deg, #e5e7eb, #9ca3af);
}

.rank-no.bronze {
  color: white;
  background: linear-gradient(135deg, #d97706, #92400e);
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-copy em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-heat {
  color: var(--cyan);
  font-weight: 850;
}

.sub-hero,
.player-hero {
  position: relative;
  overflow: hidden;
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 56px;
  border-radius: 30px;
  background: radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.26), transparent 26%), linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(2, 6, 23, 0.96));
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow);
}

.sub-hero h1,
.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.sub-hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.06rem;
}

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

.category-overview-card {
  min-height: 280px;
}

.category-overview-card a {
  display: block;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.mini-links a:hover {
  color: white;
}

.player-hero {
  padding: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: stretch;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.5);
  font-size: 2.3rem;
}

.detail-side-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.detail-main {
  padding-top: 34px;
}

.detail-copy {
  max-width: 980px;
}

.detail-copy p {
  color: #d1d5db;
  font-size: 1.05rem;
}

.detail-copy h2 {
  margin: 32px 0 10px;
  font-size: 1.45rem;
}

.one-line {
  margin-top: 24px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.site-footer {
  margin-top: 40px;
  padding: 44px 24px 24px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), #000);
  border-top: 1px solid rgba(59, 130, 246, 0.22);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

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

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 26px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.86rem;
}

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

  .two-column-section,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .detail-side-card {
    display: none;
  }
}

@media (max-width: 760px) {
  .navbar {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px 0 4px;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-dropdown {
    padding: 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 8px;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-content {
    bottom: 66px;
    width: calc(100% - 32px);
  }

  .hero-arrow {
    display: none;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .sub-hero,
  .player-hero {
    width: calc(100% - 24px);
    padding: 28px 18px;
    border-radius: 24px;
  }

  .player-hero {
    padding: 14px;
  }

  .rank-line {
    grid-template-columns: 34px 72px minmax(0, 1fr);
  }

  .rank-line img {
    width: 72px;
    height: 50px;
  }

  .rank-heat {
    display: none;
  }
}

@media (max-width: 520px) {
  .page-section {
    width: calc(100% - 24px);
    padding: 40px 0;
  }

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

  .movie-title {
    min-height: auto;
  }

  .movie-desc {
    min-height: auto;
  }
}
