:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(45, 212, 191, 0.22);
  --line-soft: rgba(148, 163, 184, 0.14);
  --text: #e5f4ff;
  --muted: #94a3b8;
  --subtle: #cbd5e1;
  --cyan: #22d3ee;
  --teal: #14b8a6;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  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 10% 0%, rgba(34, 211, 238, 0.16), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(20, 184, 166, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
  color: var(--text);
}

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

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.26);
}

.brand-name,
.footer-brand {
  font-size: 1.18rem;
  background: linear-gradient(90deg, #ffffff, #67e8f9, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: var(--subtle);
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-grid a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-grid a:hover {
  color: var(--cyan);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}

.nav-search input,
.page-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.nav-search input::placeholder,
.page-search input::placeholder {
  color: rgba(203, 213, 225, 0.68);
}

.nav-search button,
.page-search button,
.primary-btn,
.ghost-btn,
.section-link {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 800;
}

.nav-search button,
.page-search button,
.primary-btn {
  padding: 10px 18px;
  color: #052026;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.section-link {
  padding: 10px 18px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
}

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

.mobile-nav {
  display: none;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.mobile-nav form {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

main {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  margin: 28px 0 32px;
  border-radius: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-stage,
.hero-slide,
.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

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

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 56%);
}

.hero-content {
  position: absolute;
  left: clamp(28px, 7vw, 96px);
  bottom: clamp(36px, 9vw, 96px);
  max-width: 760px;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.hero-desc,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--subtle);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.genre-list span,
.detail-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 47, 73, 0.5);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 2.4rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 34px;
}

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

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

.category-pill strong {
  color: var(--cyan);
}

.content-section,
.category-grid-section,
.index-columns,
.detail-layout,
.review-section,
.player-section {
  margin: 44px 0;
}

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

.section-head h2,
.story-panel h2,
.info-panel h2,
.index-panel h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.section-head p,
.story-panel p,
.category-preview,
.site-footer p,
.info-panel dd,
.index-panel a span {
  color: var(--muted);
  line-height: 1.75;
}

.section-head p {
  margin: 8px 0 0;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 26px 70px rgba(20, 184, 166, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #082f49);
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #021316;
  font-weight: 900;
  background: linear-gradient(135deg, #fef08a, #22d3ee);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 3.1em;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.45;
}

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

.movie-meta {
  margin: 8px 0 0;
  color: var(--cyan);
  font-size: 0.86rem;
}

.movie-line {
  display: -webkit-box;
  min-height: 3.15em;
  margin: 10px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  font-size: 0.74rem;
  padding: 5px 8px;
}

.compact-card .movie-line {
  min-height: 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0 36px;
  padding: clamp(36px, 7vw, 92px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.58)),
    radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.24), transparent 26rem);
  box-shadow: var(--shadow);
}

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

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card a {
  position: relative;
  display: block;
  min-height: 260px;
  overflow: hidden;
}

.category-card img {
  height: 260px;
  object-fit: cover;
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.16));
}

.category-card a div {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.category-card h2 {
  margin: 4px 0 8px;
  font-size: 1.7rem;
}

.category-card p {
  margin: 0;
}

.category-preview {
  margin: 0;
  padding: 18px 20px 22px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  margin: 36px 0;
  padding: clamp(24px, 5vw, 62px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.76)),
    radial-gradient(circle at 76% 16%, rgba(20, 184, 166, 0.26), transparent 28rem);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-intro h1 {
  font-size: clamp(2.4rem, 5.8vw, 6.2rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

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

.video-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-stage video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.28));
}

.player-start span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #022326;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.34);
}

.player-start strong {
  font-size: 1.18rem;
}

.video-stage.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  margin: 0;
  color: #fecaca;
  text-align: center;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.story-panel,
.info-panel,
.index-panel {
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
}

.story-panel {
  padding: clamp(24px, 4vw, 42px);
}

.story-panel p {
  font-size: 1.05rem;
}

.info-panel {
  padding: 26px;
}

.info-panel dl {
  margin: 18px 0 0;
}

.info-panel div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.info-panel dt {
  color: var(--cyan);
  font-weight: 900;
}

.info-panel dd {
  margin: 6px 0 0;
}

.genre-list {
  margin-top: 18px;
}

.index-columns {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.index-panel {
  padding: 24px;
}

.index-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  color: #e0f2fe;
}

.movie-link-list {
  columns: 4 220px;
  column-gap: 24px;
}

.movie-link-list a {
  break-inside: avoid;
}

.page-search {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 70px auto 0;
  padding: 38px 0 48px;
  border-top: 1px solid var(--line-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #ffffff;
}

.footer-grid a {
  display: block;
  margin: 10px 0;
  color: var(--muted);
}

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

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

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

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

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

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

  .hero-carousel {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

@media (max-width: 680px) {
  main,
  .site-footer,
  .nav-shell,
  .mobile-nav {
    width: min(100% - 20px, 1440px);
  }

  .nav-shell {
    min-height: 66px;
  }

  .hero-carousel {
    min-height: 520px;
    margin-top: 16px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-intro h1 {
    letter-spacing: -0.04em;
  }

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

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 16px;
  }

  .page-search,
  .mobile-nav form {
    border-radius: 20px;
    flex-direction: column;
  }

  .category-card a {
    min-height: 220px;
  }

  .category-card img {
    height: 220px;
  }
}

@media (max-width: 460px) {
  .category-strip,
  .category-card-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    text-align: center;
  }
}
