:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(34, 211, 238, 0.28);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 18%, rgba(59, 130, 246, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  overflow: hidden;
}

.desktop-nav a {
  padding: 9px 11px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover {
  color: white;
  background: rgba(34, 211, 238, 0.11);
}

.nav-search,
.mobile-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.inline-search input,
.filter-panel input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 220px;
  padding: 10px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.inline-search input:focus,
.filter-panel input:focus {
  border-color: rgba(34, 211, 238, 0.78);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.nav-search button,
.mobile-search button,
.inline-search button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.22);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

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

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

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mobile-panel nav a {
  padding: 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.78);
  color: #dbeafe;
}

.mobile-search input {
  padding: 12px 14px;
}

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

.hero-viewport {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 590px;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 46px;
  padding: 72px;
}

.hero-slide.is-active {
  display: grid;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 52%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, transparent 48%);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.09);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  color: #f8fafc;
}

.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

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

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

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.25);
}

.btn-ghost {
  color: #dbeafe;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.58);
}

.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(34, 211, 238, 0.12);
}

.hero-poster {
  display: block;
  justify-self: center;
  width: min(360px, 100%);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: none;
  cursor: pointer;
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.5);
}

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

.section-block {
  padding: 66px 0 0;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: 36px;
  margin-top: 42px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-heading h2,
.content-card h2 {
  margin: 0;
  color: #f8fafc;
  line-height: 1.14;
}

.intro-strip h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.intro-strip p,
.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.inline-search input {
  padding: 14px 18px;
}

.inline-search button {
  padding: 14px 20px;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

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

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 20px;
}

.ranking-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 16px 42px rgba(2, 8, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.44);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  color: #fef3c7;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.24);
}

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

.movie-title {
  display: block;
  min-height: 48px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

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

.movie-meta,
.movie-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 12px;
}

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

.category-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.category-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(59, 130, 246, 0.06)),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28);
}

.category-card-main {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.category-name {
  color: #f8fafc;
  font-size: 22px;
  font-weight: 900;
}

.category-desc {
  color: var(--muted);
  font-size: 14px;
}

.category-samples {
  display: grid;
  gap: 1px;
  background: rgba(148, 163, 184, 0.12);
}

.category-samples a {
  padding: 12px 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.82);
}

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

.page-hero {
  padding: 74px 0 18px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.filter-panel.large {
  padding: 26px;
}

.filter-panel label {
  color: #f8fafc;
  font-weight: 800;
}

.filter-panel input {
  padding: 15px 18px;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  padding-top: 42px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.12), transparent 24rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 72px rgba(2, 8, 23, 0.48);
}

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

.detail-copy h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.detail-meta-grid strong {
  color: var(--dim);
  font-size: 12px;
}

.detail-meta-grid span,
.detail-meta-grid a {
  color: #f8fafc;
  font-weight: 700;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 14px;
  border: none;
  color: white;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.22), transparent 12rem),
    rgba(2, 6, 23, 0.46);
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 54px rgba(34, 211, 238, 0.38);
  font-size: 32px;
  padding-left: 4px;
}

.play-layer span:last-child {
  font-size: 18px;
  font-weight: 900;
}

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

.content-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-card);
}

.content-card:nth-child(3) {
  grid-column: 1 / -1;
}

.content-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
  white-space: pre-line;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0;
  color: var(--muted);
}

.footer-logo {
  color: #f8fafc;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 620px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.footer-links a {
  color: #cbd5e1;
}

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

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

  .nav-search {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-block;
  }

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

  .hero-poster {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-shell {
    min-height: 66px;
  }

  .nav-search {
    display: none;
  }

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

  .hero {
    width: min(100% - 20px, 1280px);
    margin-top: 14px;
  }

  .hero-viewport,
  .hero-slide {
    min-height: 620px;
  }

  .hero-slide {
    padding: 34px 22px 86px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .intro-strip {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .inline-search {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .movie-title {
    min-height: 44px;
    font-size: 14px;
  }

  .movie-desc {
    font-size: 12px;
  }

  .page-hero {
    padding-top: 44px;
  }

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

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

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

  .content-card:nth-child(3) {
    grid-column: auto;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }
}
