:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #eef2ff;
  --panel: #ffffff;
  --panel-strong: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --brand: #10b981;
  --brand-2: #22d3ee;
  --brand-3: #6366f1;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius: 24px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 5%, rgba(16, 185, 129, 0.16), transparent 30rem),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand {
  font-size: 1.2rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  font-size: 0.94rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #5eead4;
  transform: translateY(-1px);
}

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

.nav-search input,
.big-search input,
.inline-filter input,
.local-tools input {
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 12px 16px;
  min-width: 220px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  min-width: 190px;
  padding: 10px 14px;
}

.nav-search input:focus,
.big-search input:focus,
.inline-filter input:focus,
.local-tools input:focus {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.nav-search button,
.big-search button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  color: #052e2b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.hero-carousel {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 45%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 120px;
  max-width: 820px;
  margin-left: max(16px, calc((100vw - 1180px) / 2));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #99f6e4;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 14px;
}

.eyebrow.dark {
  color: #059669;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.96;
  margin: 0 0 24px;
  letter-spacing: -0.06em;
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.hero-content p {
  max-width: 710px;
  font-size: clamp(1.02rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 22px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #065f46;
  background: rgba(209, 250, 229, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-actions,
.detail-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn.primary {
  color: #052e2b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.36);
}

.btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.btn.ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn.ghost.dark {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.quick-panel {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.quick-copy h2,
.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.quick-copy p,
.page-hero p,
.detail-info .lead {
  color: var(--muted);
  margin: 10px 0 0;
}

.big-search input {
  min-width: min(420px, 52vw);
}

.section {
  padding: 68px 0;
}

.alt-section {
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.76), rgba(255, 255, 255, 0));
}

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

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

.text-link {
  color: #059669;
  font-weight: 900;
}

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

.category-tile {
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
  padding: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 64px rgba(15, 23, 42, 0.15);
}

.tile-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.tile-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #e2e8f0;
}

.category-tile strong {
  display: block;
  font-size: 1.16rem;
  margin-bottom: 8px;
}

.category-tile span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: #059669;
  font-weight: 900;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.card-body h3,
.rank-info h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 0 0 9px;
}

.card-body h3 a:hover,
.rank-info h3 a:hover {
  color: #059669;
}

.card-body p,
.rank-info p {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 0.94rem;
}

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

.compact-card .card-body p {
  font-size: 0.9rem;
}

.page-hero {
  margin-top: 34px;
  border-radius: 36px;
  padding: clamp(34px, 6vw, 72px);
  background:
    radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.18), transparent 26rem),
    linear-gradient(135deg, #ffffff, #eef2ff);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

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

.small-hero p {
  max-width: 760px;
  font-size: 1.08rem;
}

.category-hero,
.rank-hero {
  display: grid;
  gap: 18px;
}

.inline-filter {
  width: min(620px, 100%);
}

.inline-filter input {
  flex: 1;
}

.local-tools {
  margin: 0 0 22px;
}

.local-tools input {
  width: min(520px, 100%);
  background: #fff;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
}

.rank-poster {
  position: relative;
  min-height: 130px;
  overflow: hidden;
  background: #e2e8f0;
}

.rank-poster strong {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  min-width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.rank-info {
  padding: 20px;
}

.rank-tail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.heat {
  color: #f97316;
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border-radius: 36px;
  padding: clamp(24px, 4vw, 46px);
  background:
    radial-gradient(circle at 12% 22%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(135deg, #ffffff, #eef2ff);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.86);
}

.detail-cover {
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crumbs {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 14px;
}

.crumbs a:hover {
  color: #059669;
}

.detail-info h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1;
  margin-bottom: 18px;
}

.detail-info .lead {
  max-width: 780px;
  font-size: 1.12rem;
}

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

.watch-section {
  padding: 44px 0 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.26);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.74)),
    radial-gradient(circle at center, rgba(16, 185, 129, 0.26), transparent 28rem);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 2rem;
  box-shadow: 0 22px 56px rgba(16, 185, 129, 0.42);
}

.play-overlay strong {
  font-size: clamp(1.35rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.play-overlay em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 44px 0 18px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.section-card,
.side-card {
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 26px;
}

.section-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.section-card p {
  color: #334155;
  margin: 0;
  font-size: 1.04rem;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.side-card dt {
  color: var(--muted);
  font-weight: 900;
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.wide span {
  background: #e0f2fe;
  color: #075985;
}

.site-footer {
  margin-top: 42px;
  background: #020617;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: 42px 0;
}

.footer-brand {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.footer-links a:hover {
  color: #5eead4;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

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

@media (max-width: 860px) {
  .nav-shell {
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero-carousel {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 70px;
    padding-bottom: 120px;
    margin-left: 16px;
  }

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

  .big-search {
    width: 100%;
  }

  .big-search input {
    min-width: 0;
    flex: 1;
  }

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

  .rank-card {
    grid-template-columns: 130px 1fr;
  }

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

  .detail-cover {
    max-width: 320px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    min-height: 640px;
  }

  .hero-actions,
  .detail-actions,
  .inline-filter,
  .big-search {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .inline-filter button,
  .big-search button {
    width: 100%;
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-poster {
    aspect-ratio: 16 / 9;
  }

  .section {
    padding: 46px 0;
  }

  .page-hero,
  .detail-hero,
  .section-card,
  .side-card {
    border-radius: 24px;
  }
}
