:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --yellow: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(6, 182, 212, 0.18), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  z-index: -1;
}

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: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.site-header__inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand__mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.34);
}

.brand__text {
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(6, 182, 212, 0.18);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: white;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.94)),
    var(--hero-image) center / cover no-repeat,
    linear-gradient(135deg, rgba(6, 182, 212, 0.36), rgba(37, 99, 235, 0.22));
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
  opacity: 0.82;
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, transparent 36%);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  width: var(--container);
  min-height: 72vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 88px 0 88px;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.30);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 13px 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
}

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

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

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.content-section,
.page-shell,
.detail-shell {
  width: var(--container);
  margin: 0 auto;
}

.content-section {
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.05em;
}

.section-more {
  color: #67e8f9;
  white-space: nowrap;
}

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

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

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

.movie-card__link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card__link:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.56);
  box-shadow: 0 24px 56px rgba(6, 182, 212, 0.16);
}

.movie-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(37, 99, 235, 0.20));
}

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

.movie-card__link:hover img {
  transform: scale(1.08);
}

.badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: white;
  backdrop-filter: blur(12px);
}

.badge--left {
  left: 10px;
  background: rgba(6, 182, 212, 0.88);
}

.badge--right {
  right: 10px;
  background: rgba(2, 6, 23, 0.72);
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.92);
  color: white;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card__link:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card__body {
  padding: 16px;
}

.movie-card__body h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  min-height: 48px;
}

.movie-card__body p {
  margin: 0 0 14px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-card__meta,
.detail-meta,
.page-stats,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card__meta strong,
.source-pill {
  margin-left: auto;
  color: #fde68a;
}

.category-strip {
  padding: 48px 0;
  background: rgba(15, 23, 42, 0.44);
  border-block: 1px solid var(--line);
}

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

.category-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.20), rgba(37, 99, 235, 0.12));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -24px;
  bottom: -30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.category-card strong {
  display: block;
  position: relative;
  font-size: 28px;
  z-index: 1;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 10px;
  color: var(--muted-strong);
}

.page-shell,
.detail-shell {
  padding: 28px 0 64px;
}

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

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 6vw, 58px);
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  box-shadow: var(--shadow);
}

.page-hero--compact h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-stats {
  margin-top: 24px;
}

.page-stats span,
.detail-meta span,
.rank-meta span,
.source-pill {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.category-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.category-tools input,
.search-panel input,
.search-panel select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  color: white;
  outline: 0;
}

.category-tools input {
  flex: 1 1 280px;
  padding: 0 16px;
}

.category-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
}

.category-tab.is-active,
.category-tab:hover {
  background: rgba(6, 182, 212, 0.18);
  color: white;
}

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

.category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.56);
}

.category-chip span {
  color: #67e8f9;
  font-weight: 800;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 38px;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.64);
}

.pagination strong {
  background: var(--cyan);
  color: white;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72)),
    var(--hero-image) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 18%, rgba(6, 182, 212, 0.22), transparent 30%);
}

.detail-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  padding: clamp(24px, 5vw, 56px);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  font-size: clamp(36px, 6vw, 70px);
  margin-bottom: 18px;
}

.detail-one-line {
  max-width: 860px;
}

.detail-meta,
.tag-row {
  margin-top: 18px;
}

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

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.10);
  color: #a5f3fc;
  font-size: 13px;
}

.player-panel {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.78));
  color: white;
  font-weight: 800;
  font-size: 18px;
}

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

.player-cover__icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.32);
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--muted-strong);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.detail-columns {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.prose-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(15, 23, 42, 0.66);
}

.prose-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.prose-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}

.prev-next a {
  max-width: 48%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--muted-strong);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 160px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-number {
  font-size: 30px;
  font-weight: 900;
  color: #67e8f9;
  text-align: center;
}

.rank-item img {
  width: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.12);
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-item p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.rank-score {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  font-size: 22px;
  font-weight: 900;
}

.search-panel {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  padding: 0 14px;
}

.search-summary {
  margin: 22px 0;
  color: var(--muted-strong);
}

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

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

.footer-grid {
  width: var(--container);
  margin: 0 auto;
  padding: 48px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-grid p,
.footer-note {
  color: var(--muted);
  line-height: 1.7;
}

.footer-grid h3 {
  margin: 0 0 16px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-strong);
}

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

.footer-links span {
  color: var(--muted);
}

.footer-bottom {
  width: var(--container);
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

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

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

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

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

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

  .rank-item {
    grid-template-columns: 54px 140px 1fr;
  }

  .rank-score {
    grid-column: 1 / -1;
    width: auto;
    height: 48px;
  }
}

@media (max-width: 760px) {
  .site-header__inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero-slider,
  .hero-slide__content {
    min-height: 68vh;
  }

  .section-heading,
  .footer-bottom,
  .prev-next {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid--six,
  .category-grid,
  .category-list,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

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

  .rank-item img {
    width: 100%;
  }

  .prev-next a {
    max-width: 100%;
    width: 100%;
  }
}
