:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0f1b2d;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.13), transparent 30rem),
    linear-gradient(180deg, #07111f 0%, #0b1220 46%, #060b14 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  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;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #052e1c;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.brand-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #dbeafe;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #d1fae5;
  background: var(--emerald-soft);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 9px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.main-wrap,
.page-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-cinema {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 72px;
  min-height: 660px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.96) 0%, rgba(7, 17, 31, 0.76) 45%, rgba(7, 17, 31, 0.28) 100%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.12), rgba(7, 17, 31, 0.86));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.76fr);
  align-items: center;
  gap: 46px;
  padding: 76px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.26);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-title {
  margin: 22px 0 16px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.btn {
  color: #042014;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.24);
}

.btn-soft {
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(1.5deg);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(34, 211, 238, 0.16));
}

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

.hero-poster figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 76px;
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #34d399;
}

.quick-panel {
  width: min(1200px, calc(100% - 32px));
  margin: -36px auto 56px;
  position: relative;
  z-index: 8;
  padding: 20px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(20px);
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.54);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(52, 211, 153, 0.62);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.category-pills,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-pills {
  margin-top: 14px;
}

.category-pills a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.category-pills a {
  padding: 10px 14px;
  font-weight: 800;
}

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

.section-block {
  margin: 58px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-head p,
.lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(34, 211, 238, 0.12));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
}

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

.card-body h3 a:hover {
  color: #34d399;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.compact-card .card-body p {
  display: none;
}

.compact-card .poster-link img {
  aspect-ratio: 16 / 11;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 56px;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(52, 211, 153, 0.36);
  background: rgba(15, 23, 42, 0.96);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #052e1c;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  white-space: nowrap;
}

.rank-item strong {
  color: #fde68a;
  text-align: right;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.18), transparent 14rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68));
  border: 1px solid var(--line);
}

.category-card h2,
.category-card h3 {
  margin: 12px 0 10px;
  font-size: 28px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.category-samples span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.13);
}

.page-hero {
  padding: 64px 0 26px;
}

.page-hero h1 {
  margin: 18px 0 12px;
  max-width: 960px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.filter-bar {
  margin: 18px 0 26px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 26px;
  margin: 34px 0 60px;
}

.detail-panel,
.side-panel,
.player-panel {
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.detail-panel {
  padding: 28px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

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

.meta-table div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.meta-table span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.player-panel {
  overflow: hidden;
  margin-top: 24px;
}

.video-frame {
  position: relative;
  background: #020617;
  cursor: pointer;
}

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

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  color: #042014;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 20px 48px rgba(16, 185, 129, 0.34);
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-panel.is-playing .play-button {
  opacity: 0;
  pointer-events: none;
}

.player-caption {
  padding: 16px 18px;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.side-panel {
  padding: 22px;
  height: fit-content;
}

.poster-side {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(34, 211, 238, 0.12));
}

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

.link-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.link-stack a {
  padding: 12px 14px;
  border-radius: 16px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(52, 211, 153, 0.17);
}

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

.breadcrumb a:hover {
  color: #34d399;
}

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

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

.footer-inner p {
  color: var(--muted);
  margin: 10px 0 0;
}

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

.footer-links a:hover {
  color: #34d399;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-cinema {
    min-height: auto;
    border-radius: 24px;
  }

  .hero-inner {
    min-height: auto;
    padding: 36px 22px 88px;
    gap: 24px;
  }

  .hero-poster {
    transform: none;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

  .search-box,
  .section-head,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 46px minmax(0, 1fr) 48px;
  }

  .rank-meta {
    display: none;
  }

  .meta-table {
    grid-template-columns: 1fr;
  }
}

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

  .brand-text {
    font-size: 17px;
  }
}
