:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #1e293b;
  --card-2: #162033;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --blue: #38bdf8;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #03121d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.45);
}

.brand strong,
.footer-brand {
  display: block;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.main-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 210px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: rgba(51, 65, 85, 0.72);
}

.global-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
}

.global-search-input,
.page-filter-input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
}

.global-search-input {
  padding: 11px 16px;
}

.global-search-form button,
.primary-btn,
.ghost-btn,
.intro-actions a,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #03121d;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 38px rgba(14, 165, 233, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.global-search-form button:hover,
.primary-btn:hover,
.intro-actions a:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(12px);
  box-shadow: none;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hero-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.hero-stage {
  position: relative;
  height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 56%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(34px, 8vw, 88px);
  width: min(620px, calc(100% - 48px));
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  font-size: 13px;
  background: rgba(8, 145, 178, 0.16);
}

.hero-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 560px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.56);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 72px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

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

.hero-ranking,
.side-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.ranking-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ranking-title span,
.side-panel h2 {
  font-size: 22px;
  font-weight: 900;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 30px 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(51, 65, 85, 0.5);
  transform: translateX(4px);
}

.compact-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #03121d;
  font-weight: 900;
  background: var(--cyan);
}

.compact-card img {
  width: 72px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.compact-card strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.intro-band,
.page-hero,
.content-section,
.category-strip,
.filter-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
}

.intro-band,
.page-hero {
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(15, 23, 42, 0.78)),
    rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
}

.intro-band h2,
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
}

.intro-band p,
.page-hero p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

.intro-actions {
  margin-top: 24px;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(8, 47, 73, 0.42));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-4px);
}

.category-tile strong,
.category-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile span,
.category-card p {
  color: var(--muted);
}

.category-overview {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
}

.category-card {
  display: grid;
  min-height: 260px;
  padding: 0;
}

.category-card img,
.category-mask,
.category-card > div {
  grid-area: 1 / 1;
}

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

.category-mask {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.28));
}

.category-card > div {
  align-self: end;
  padding: 24px;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 38px);
}

.section-more {
  min-height: 38px;
  color: #03121d;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-5px);
  box-shadow: 0 20px 54px rgba(8, 145, 178, 0.16);
}

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

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

.poster.wide {
  aspect-ratio: 16 / 7;
}

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

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

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 44px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.rank-badge,
.poster-meta {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  color: #03121d;
  background: var(--cyan);
}

.poster-meta {
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  color: #e0f2fe;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.page-shell,
.detail-shell {
  padding-bottom: 48px;
}

.crumb {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.crumb a {
  color: #a5f3fc;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 160px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
}

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

.player-card,
.detail-content,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

.video-player,
.play-cover,
.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-player {
  object-fit: contain;
}

.play-cover {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: white;
  background: #000;
  cursor: pointer;
}

.play-cover.hidden {
  display: none;
}

.play-cover img {
  object-fit: cover;
  opacity: 0.52;
}

.play-button {
  position: relative;
  z-index: 2;
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #03121d;
  font-size: 38px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 56px rgba(34, 211, 238, 0.48);
}

.detail-content {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 36px);
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-content .lead {
  color: #dbeafe;
  font-size: 20px;
}

.detail-content h2 {
  margin: 28px 0 10px;
  font-size: 26px;
}

.detail-content p {
  color: #cbd5e1;
}

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

.related-section {
  width: 100%;
}

.detail-side {
  position: sticky;
  top: 96px;
  height: max-content;
}

.side-panel h2 {
  margin: 0 0 12px;
}

.search-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: 24px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(10px);
}

.search-layer.open {
  display: grid;
  place-items: center;
}

.search-box {
  position: relative;
  width: min(760px, 100%);
  max-height: 82vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.search-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.8);
}

.search-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
}

.search-item:hover {
  background: rgba(51, 65, 85, 0.42);
}

.search-item img {
  width: 92px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.search-item strong {
  font-size: 18px;
}

.search-item p,
.empty-result {
  margin: 4px 0 8px;
  color: var(--muted);
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

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

.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

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

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 1080px) {
  .hero-wrap,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-ranking,
  .detail-side {
    position: static;
  }

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

  .main-nav,
  .global-search-form {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    width: min(100% - 22px, 1280px);
    min-height: 66px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand em {
    display: none;
  }

  .hero-wrap,
  .intro-band,
  .page-hero,
  .content-section,
  .category-strip,
  .filter-panel,
  .detail-shell,
  .category-overview,
  .footer-grid,
  .copyright {
    width: min(100% - 22px, 1280px);
  }

  .hero-stage {
    height: 540px;
    border-radius: 24px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.56) 72%, rgba(2, 6, 23, 0.28) 100%);
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 56px;
    width: auto;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-dots {
    left: 20px;
  }

  .movie-grid,
  .ranking-list,
  .category-grid,
  .category-overview,
  .compact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .compact-card {
    grid-template-columns: 28px 84px 1fr;
  }
}
