:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-strong: #0891b2;
  --amber: #f59e0b;
  --shadow: 0 25px 70px rgba(8, 145, 178, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.2), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.35);
}

.logo-text {
  font-size: 1.15rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  white-space: nowrap;
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link-active {
  color: #fff;
  background: rgba(6, 182, 212, 0.13);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

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

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.hero {
  position: relative;
  height: min(76vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, transparent 46%);
}

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

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.6);
}

.hero-summary {
  margin: 24px 0 0;
  max-width: 640px;
  color: #dbeafe;
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  line-height: 1.8;
}

.hero-tags,
.detail-badges,
.detail-genres,
.card-tags,
.tag-cloud,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.hero-tags a,
.detail-badges span,
.detail-genres span,
.card-tags span,
.tag-cloud span,
.filter-chip {
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: rgba(8, 47, 73, 0.5);
  color: #e0f2fe;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.86rem;
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: #fff;
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.25);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid var(--line);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.quick-entry,
.content-section,
.page-main,
.detail-main {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-entry {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.quick-entry a {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  font-weight: 800;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.quick-entry a:hover {
  transform: translateY(-4px);
  background: rgba(8, 145, 178, 0.2);
}

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

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.story-card h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.section-more,
.text-link {
  color: #67e8f9;
  font-weight: 800;
}

.intro-text,
.page-hero p,
.story-card p,
.category-overview-card p {
  color: #cbd5e1;
  line-height: 1.9;
}

.search-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
}

.search-box span {
  color: #67e8f9;
  font-size: 1.4rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.filter-row {
  margin-top: 14px;
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  background: rgba(6, 182, 212, 0.3);
  color: white;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(6, 182, 212, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-region,
.card-year,
.rank-badge,
.mini-rank {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.card-region {
  left: 10px;
  top: 10px;
  padding: 5px 8px;
}

.card-year {
  right: 10px;
  top: 10px;
  padding: 5px 8px;
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
}

.card-body {
  padding: 13px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #67e8f9;
}

.card-line {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  gap: 6px;
  margin-bottom: 12px;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.82rem;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile-mask {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-tile strong {
  font-size: 1.25rem;
}

.category-tile em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 0.86rem;
  line-height: 1.5;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  background: rgba(8, 145, 178, 0.16);
}

.mini-card img {
  width: 70px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  margin-top: 6px;
}

.mini-rank {
  left: 8px;
  top: 8px;
  min-width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  font-size: 0.72rem;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(32px, 6vw, 68px);
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.25), transparent 25rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.5));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.5rem);
}

.page-hero p {
  max-width: 780px;
  font-size: 1.08rem;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 34px 0 60px;
}

.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.overview-poster-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.overview-poster-strip img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

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

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: end;
  margin-bottom: 20px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.04);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.4)),
    linear-gradient(0deg, #020617 0%, transparent 48%);
}

.detail-inner {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: end;
  padding: 98px 0 70px;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.breadcrumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #bae6fd;
  margin-bottom: 18px;
}

.detail-copy h1 {
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.02;
}

.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  line-height: 1.9;
  font-size: 1.08rem;
}

.detail-badges,
.detail-genres {
  margin-top: 18px;
}

.player-section {
  padding-top: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.24));
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
}

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

.player-button-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.35);
  font-size: 2.2rem;
}

.story-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(15, 23, 42, 0.72);
}

.story-card h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.6rem;
}

.story-card h2 + p {
  margin-top: 0;
}

.story-card p + h2 {
  margin-top: 32px;
}

.tag-cloud {
  margin-top: 28px;
}

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-tags a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: #64748b;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

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

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

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

  .quick-entry {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .hero {
    height: 72vh;
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-poster {
    width: min(250px, 70vw);
  }
}

@media (max-width: 560px) {
  .header-inner,
  .quick-entry,
  .content-section,
  .page-main,
  .detail-main,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1200px);
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero {
    min-height: 560px;
  }

  .hero h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.045em;
  }

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

  .card-line {
    -webkit-line-clamp: 2;
  }

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

  .page-hero {
    border-radius: 22px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-inner {
    padding-top: 86px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .player-button-icon {
    width: 66px;
    height: 66px;
    font-size: 1.7rem;
  }
}
