/* 影视大全 · 静态首页（自包含，无第三方框架） */
:root {
  --bg: #07090c;
  --paper: #12171f;
  --ink: #eef2f7;
  --muted: #8b95a8;
  --accent: #b8ff3c;
  --accent-ink: #0a0c10;
  --line: rgba(255, 255, 255, 0.08);
  --header: 58px;
  --gutter: clamp(14px, 3.2vw, 40px);
  --max: 1160px;
  --frame: min(calc(var(--max) - var(--gutter) * 2), calc(100% - var(--gutter) * 2));
  --radius: 12px;
  --touch: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: var(--safe-bottom);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(184, 255, 60, 0.07), transparent 55%),
    radial-gradient(700px 420px at 92% 8%, rgba(94, 234, 212, 0.05), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  width: var(--frame);
  max-width: var(--frame);
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--safe-top);
  background: rgba(7, 9, 12, 0.9);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-panel {
  position: relative;
  display: none;
}
.nav-panel > summary {
  list-style: none;
  width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 255, 60, 0.45);
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
.nav-panel > summary::-webkit-details-marker { display: none; }
.nav-panel > summary::after {
  content: "☰";
  font-size: 18px;
  line-height: 1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav--mobile {
  display: none;
}
.nav-link {
  color: #c3cad6;
  font-size: 14px;
  font-weight: 500;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--accent);
}

/* Intro / Hero */
.seo-intro {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.seo-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.4;
  font-weight: 800;
}
.seo-intro p {
  margin: 0;
  color: #c3cad6;
  font-size: 14px;
}

.hero {
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  min-height: clamp(210px, 42vw, 400px);
  background: #0d1118;
  isolation: isolate;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.92) 0%, rgba(7, 9, 12, 0.45) 55%, rgba(7, 9, 12, 0.2) 100%),
    linear-gradient(0deg, rgba(7, 9, 12, 0.9), transparent 55%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 4vw, 44px);
  max-width: 640px;
}
.hero__tag {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero__title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  font-weight: 800;
}
.hero__desc {
  margin: 0 0 16px;
  color: #c3cad6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch);
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 0;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-ghost {
  border: 1px solid rgba(184, 255, 60, 0.45);
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
}

/* Sections / cards */
.section {
  padding: clamp(1.3rem, 3.2vw, 2.4rem) 0;
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section__head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
}
.section__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.section__more {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.movie-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (hover: hover) and (pointer: fine) {
  .movie-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .movie-card:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 255, 60, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
  .movie-card h3 a:hover { color: var(--accent); }
}
.movie-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  display: block;
  overflow: hidden;
  background: #0d1118;
}
.movie-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.movie-card__badge,
.movie-card__score {
  position: absolute;
  top: 8px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.3;
}
.movie-card__badge {
  left: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
}
.movie-card__score {
  right: 8px;
  background: rgba(184, 255, 60, 0.92);
  color: var(--accent-ink);
  font-weight: 700;
}
.movie-card__body { padding: 12px; }
.movie-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.movie-card .meta,
.movie-card .cast {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-card .cast { margin-top: 4px; }

/* Footer */
.site-footer {
  margin-top: 12px;
  background:
    linear-gradient(90deg, transparent, var(--accent), transparent) top / 100% 1px no-repeat,
    #05070a;
  padding: 32px 0 calc(16px + var(--safe-bottom));
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 24px;
}
.site-footer h2,
.site-footer h3 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1rem;
}
.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin: 0 0 8px; }
.site-footer a:hover { color: var(--accent); }
.site-footer__copy {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #667085;
  font-size: 12px;
}

@media (max-width: 999px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  :root { --header: 54px; }
  .site-nav--desktop { display: none; }
  .nav-panel { display: block; }
  .site-nav--mobile {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: min(240px, 70vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    z-index: 60;
  }
  .nav-panel[open] .site-nav--mobile { display: flex; }
  .site-nav--mobile .nav-link {
    padding: 12px 14px;
    border-radius: 8px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hero__actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
  .detail-hero__play span {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  .seo-intro {
    padding: 14px;
  }
}
@media (max-width: 379px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .movie-card { transition: none !important; }
}

/* Detail page */
.detail-hero {
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.detail-hero video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.detail-hero__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 2;
}
.detail-hero__play[hidden] {
  display: none !important;
}
.detail-hero__play span {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.detail-hero.is-playing .detail-hero__play {
  display: none !important;
}
.detail-main { padding: 20px 0 8px; }
.crumb {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}
.crumb a:hover { color: var(--accent); }
.detail-title {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.3;
}
.seo-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  background: rgba(184, 255, 60, 0.12);
  color: var(--accent);
  border: 1px solid rgba(184, 255, 60, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 16px;
}
.panel p {
  margin: 0 0 10px;
  color: #c3cad6;
  font-size: 14px;
}
.panel p:last-child { margin-bottom: 0; }
.kv {
  margin: 0;
  padding: 0;
  list-style: none;
}
.kv li {
  display: flex;
  gap: 10px;
  margin: 0 0 8px;
  color: #c3cad6;
  font-size: 14px;
}
.kv strong {
  min-width: 48px;
  color: #fff;
  font-weight: 600;
}
.related { margin-top: 22px; }
@media (max-width: 999px) {
  .detail-grid { grid-template-columns: 1fr; }
}
