/* ============================================================================
   凌霄视频 · Cloudflare 版样式
   设计令牌沿用 branding/appearance-dark.conf 与 branding/theme-hitech.css
   ========================================================================== */

:root {
  --lx-cyan: #22e0ff;
  --lx-violet: #8b5cf6;
  --lx-magenta: #f472b6;
  --lx-ink: #05070e;
  --lx-ink-2: #0a1020;
  --lx-surface: #0b1220;
  --lx-surface-hover: #141d33;
  --lx-glass: rgba(11, 18, 32, .72);
  --lx-line: rgba(120, 190, 255, .14);
  --lx-line-strong: rgba(120, 190, 255, .28);
  --lx-text: #e8eefc;
  --lx-sub: #93a4c2;
  --lx-dim: #64748b;
  --lx-success: #22e07a;
  --lx-warning: #ffc53d;
  --lx-danger: #f87171;
  --lx-grad: linear-gradient(135deg, #0ea5e9 0%, #22e0ff 100%);
  --lx-grad-soft: linear-gradient(135deg, #0b1220 0%, #131c31 100%);
  --lx-radius: 14px;
  --lx-ease: cubic-bezier(.22, .68, .2, 1);
  --lx-shadow: 0 18px 46px rgba(0, 0, 0, .55);
  --lx-maxw: 1360px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--lx-ink);
  color: var(--lx-text);
  font: 15px/1.6 "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ------------------------------------------------------------ 背景极光 */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(42rem 30rem at 8% -10%, rgba(34, 224, 255, .20), transparent 62%),
    radial-gradient(38rem 28rem at 92% 0%, rgba(139, 92, 246, .20), transparent 60%),
    radial-gradient(36rem 26rem at 62% 106%, rgba(14, 165, 201, .16), transparent 62%);
  filter: saturate(1.1);
}
body::after {
  background-image:
    linear-gradient(rgba(120, 190, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 190, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, .9), transparent 78%);
  opacity: .6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.page {
  position: relative;
  z-index: 1;
  max-width: var(--lx-maxw);
  margin: 0 auto;
  padding: 0 20px 72px;
}

/* ------------------------------------------------------------ 页眉 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px) saturate(1.3);
  background: linear-gradient(180deg, rgba(5, 7, 14, .92), rgba(5, 7, 14, .62));
  border-bottom: 1px solid var(--lx-line);
}

.header-inner {
  max-width: var(--lx-maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand img { height: 34px; width: auto; filter: drop-shadow(0 0 14px rgba(34, 224, 255, .35)); }
.brand .brand-name {
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 17px;
  background: linear-gradient(100deg, #e8eefc, var(--lx-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--lx-sub);
  font-size: 14px;
  white-space: nowrap;
  transition: color .2s var(--lx-ease), background .2s var(--lx-ease);
}
.nav a:hover { color: var(--lx-text); background: rgba(34, 224, 255, .08); }
.nav a.active { color: #04121c; background: var(--lx-grad); font-weight: 600; }

.search {
  flex: 0 1 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--lx-line);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  transition: border-color .2s var(--lx-ease), box-shadow .2s var(--lx-ease);
}
.search:focus-within { border-color: var(--lx-cyan); box-shadow: 0 0 0 3px rgba(34, 224, 255, .14); }
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 14px;
  color: var(--lx-text);
}
.search input::placeholder { color: var(--lx-dim); }
.search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #04121c;
  background: var(--lx-grad);
}

.ghost-link {
  padding: 7px 14px;
  border: 1px solid var(--lx-line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--lx-sub);
  white-space: nowrap;
  transition: all .2s var(--lx-ease);
}
.ghost-link:hover { color: var(--lx-cyan); border-color: var(--lx-cyan); }

/* ------------------------------------------------------------ Hero */
.hero {
  position: relative;
  margin: 26px 0 8px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--lx-line);
  background: var(--lx-grad-soft);
  min-height: 320px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  box-shadow: var(--lx-shadow);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lx-cyan);
}
.hero-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--lx-cyan);
  box-shadow: 0 0 12px var(--lx-cyan);
}
.hero h1 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -.01em;
  background: linear-gradient(100deg, #e8eefc 10%, #7dd3fc 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 0;
  color: var(--lx-sub);
  max-width: 46ch;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--lx-cyan);
  background: rgba(34, 224, 255, .10);
  border: 1px solid rgba(34, 224, 255, .24);
}
.hero-actions { display: flex; gap: 12px; margin-top: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--lx-ease), box-shadow .18s var(--lx-ease), background .18s var(--lx-ease);
}
.btn-primary {
  color: #04121c;
  background: var(--lx-grad);
  box-shadow: 0 10px 30px rgba(34, 224, 255, .26);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(34, 224, 255, .38); }
.btn-ghost { color: var(--lx-text); background: rgba(255, 255, 255, .06); border-color: var(--lx-line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #7f1d1d, #b91c1c); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.hero-art { position: relative; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--lx-surface) 2%, transparent 55%);
}

/* ------------------------------------------------------------ 区块 */
.sect { margin-top: 40px; }
.sect-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.sect-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: .01em;
}
.sect-head h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  margin-right: 10px;
  border-radius: 2px;
  vertical-align: -2px;
  background: var(--lx-grad);
  box-shadow: 0 0 12px rgba(34, 224, 255, .6);
}
.sect-head .sub { color: var(--lx-dim); font-size: 13px; }
.sect-head .spacer { flex: 1; }

/* ------------------------------------------------------------ 卡片 */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.card {
  position: relative;
  border-radius: var(--lx-radius);
  overflow: hidden;
  background: var(--lx-surface);
  border: 1px solid var(--lx-line);
  transition: transform .24s var(--lx-ease), border-color .24s var(--lx-ease), box-shadow .24s var(--lx-ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 224, 255, .45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(34, 224, 255, .12) inset;
}
.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0a1020, #16233c);
  overflow: hidden;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--lx-ease), opacity .3s;
  opacity: .94;
}
.card:hover .card-cover img { transform: scale(1.06); opacity: 1; }
.card-cover .fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: rgba(232, 238, 252, .18);
  letter-spacing: .1em;
}
.card-cover .score {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  color: #04121c;
  background: linear-gradient(135deg, #ffd36e, #ffb020);
}
.card-cover .play-dot {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--lx-cyan);
  background: rgba(4, 12, 22, .72);
  border: 1px solid rgba(34, 224, 255, .3);
}
.card-body { padding: 11px 12px 13px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}
.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--lx-dim);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 横向滚动行 */
.row-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.row-scroll::-webkit-scrollbar { height: 8px; }
.row-scroll::-webkit-scrollbar-thumb { background: rgba(120, 190, 255, .2); border-radius: 8px; }
.row-scroll .card { flex: 0 0 260px; scroll-snap-align: start; }

/* ------------------------------------------------------------ 过滤条 */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--lx-line);
  border-radius: var(--lx-radius);
  background: rgba(11, 18, 32, .6);
}
.chip {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--lx-line);
  color: var(--lx-sub);
  cursor: pointer;
  background: transparent;
  transition: all .18s var(--lx-ease);
}
.chip:hover { color: var(--lx-text); border-color: var(--lx-line-strong); }
.chip.active { color: #04121c; font-weight: 600; background: var(--lx-grad); border-color: transparent; }
.filters .spacer { flex: 1; }
.select {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--lx-line);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
}

/* ------------------------------------------------------------ 分页 */
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 30px; }
.pager button { min-width: 88px; }
.pager .info { color: var(--lx-dim); font-size: 13px; }

/* ------------------------------------------------------------ 播放页 */
.watch-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; margin-top: 24px; }
.player-shell {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--lx-line);
  background: #000;
  box-shadow: var(--lx-shadow);
}
.player-shell video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.watch-title { margin: 20px 0 8px; font-size: 24px; line-height: 1.3; }
.watch-sub { color: var(--lx-sub); margin: 0 0 14px; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pill {
  font-size: 12px;
  color: var(--lx-sub);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--lx-line);
}
.desc-box {
  border: 1px solid var(--lx-line);
  border-radius: var(--lx-radius);
  padding: 16px 18px;
  background: rgba(11, 18, 32, .55);
  color: var(--lx-sub);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.side-list { display: flex; flex-direction: column; gap: 12px; }
.side-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background .2s var(--lx-ease), border-color .2s var(--lx-ease);
}
.side-item:hover { background: rgba(34, 224, 255, .06); border-color: var(--lx-line); }
.side-item img { width: 108px; height: 62px; object-fit: cover; border-radius: 8px; }
.side-item .t { font-size: 13px; font-weight: 600; line-height: 1.4; }
.side-item .m { font-size: 12px; color: var(--lx-dim); margin-top: 4px; }

/* ------------------------------------------------------------ 空状态 / 加载 */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--lx-dim);
  border: 1px dashed var(--lx-line-strong);
  border-radius: var(--lx-radius);
}
.skeleton {
  border-radius: var(--lx-radius);
  background: linear-gradient(100deg, #0b1220 20%, #141d33 40%, #0b1220 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  aspect-ratio: 16 / 9;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------ 页脚 */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--lx-line);
  margin-top: 60px;
  padding: 26px 20px 40px;
  color: var(--lx-dim);
  font-size: 13px;
}
.footer-inner {
  max-width: var(--lx-maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner .dot { color: rgba(120, 190, 255, .4); }

/* ------------------------------------------------------------ 后台 */
.auth-wrap {
  max-width: 420px;
  margin: 8vh auto;
  padding: 30px 28px;
  border-radius: 18px;
  border: 1px solid var(--lx-line);
  background: rgba(11, 18, 32, .82);
  box-shadow: var(--lx-shadow);
}
.auth-wrap h2 { margin: 0 0 4px; font-size: 20px; }
.auth-wrap .hint { color: var(--lx-dim); font-size: 13px; margin: 0 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--lx-sub); margin-bottom: 6px; }
.input, textarea.input {
  width: 100%;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--lx-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--lx-ease), box-shadow .2s var(--lx-ease);
}
.input:focus { border-color: var(--lx-cyan); box-shadow: 0 0 0 3px rgba(34, 224, 255, .13); }
textarea.input { min-height: 120px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input { flex: 1; }
.captcha-box {
  width: 132px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--lx-line);
  cursor: pointer;
  background: #0a1220;
  flex: 0 0 auto;
}
.captcha-box img { width: 100%; height: 100%; }

.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; margin-top: 26px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-nav button {
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--lx-sub);
  cursor: pointer;
  font-size: 14px;
}
.side-nav button:hover { background: rgba(34, 224, 255, .07); color: var(--lx-text); }
.side-nav button.active { background: var(--lx-grad); color: #04121c; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  border: 1px solid var(--lx-line);
  border-radius: var(--lx-radius);
  padding: 16px 18px;
  background: rgba(11, 18, 32, .7);
}
.stat .k { font-size: 12px; color: var(--lx-dim); letter-spacing: .06em; }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 4px; color: var(--lx-cyan); }

.panel {
  border: 1px solid var(--lx-line);
  border-radius: var(--lx-radius);
  background: rgba(11, 18, 32, .6);
  padding: 18px;
}
.panel h3 { margin: 0 0 14px; font-size: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--lx-line); vertical-align: middle; }
.table th { color: var(--lx-dim); font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.table tr:hover td { background: rgba(34, 224, 255, .04); }
.table .t-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.flag { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.flag.on { color: #052e16; background: var(--lx-success); }
.flag.off { color: #2b0f0f; background: var(--lx-danger); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  z-index: 200;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 14px;
  color: #04121c;
  background: var(--lx-grad);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--lx-ease), transform .22s var(--lx-ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: linear-gradient(135deg, #b91c1c, #ef4444); color: #fff; }

.notice-bar {
  margin-top: 14px;
  font-size: 13px;
  color: var(--lx-sub);
  border-left: 2px solid var(--lx-cyan);
  padding: 4px 0 4px 12px;
  background: linear-gradient(90deg, rgba(34, 224, 255, .08), transparent 70%);
}

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .watch-wrap { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .search { flex: 1 1 100%; order: 3; }
  .hero-copy { padding: 26px 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .row-scroll .card { flex: 0 0 200px; }
  .page { padding: 0 14px 60px; }
  .watch-title { font-size: 20px; }
}

/* ------------------------------- 分集选择 ------------------------------- */
.ep-bar{margin:14px 0 18px}
.ep-head{font-size:15px;font-weight:600;margin-bottom:10px;color:var(--text,#e6f1ff)}
.ep-head .m{font-weight:400;font-size:13px;color:var(--muted,#8b9bb4)}
.ep-list{display:flex;flex-wrap:wrap;gap:8px;max-height:168px;overflow:auto;padding:2px}
.ep{appearance:none;border:1px solid rgba(34,211,238,.28);background:rgba(10,18,32,.72);
  color:#cfe6f5;border-radius:8px;padding:7px 12px;font-size:13px;cursor:pointer;
  transition:.15s ease;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep:hover{border-color:#22d3ee;color:#fff;background:rgba(34,211,238,.14)}
.ep.active{border-color:#22d3ee;background:rgba(34,211,238,.22);color:#fff;font-weight:600}

/* 无限滚动哨兵 */
.feed-sentinel {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  padding: 26px 0 44px; color: var(--lx-sub, #8b9bb4); font-size: 13px;
}
.feed-sentinel .feed-tip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid rgba(34, 224, 255, .22);
  background: rgba(12, 20, 36, .72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.feed-sentinel.loading .feed-tip {
  color: var(--lx-cyan, #22e0ff);
  border-color: rgba(34, 224, 255, .5);
}
.feed-sentinel.loading .feed-tip::before {
  content: ''; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(34, 224, 255, .3); border-top-color: var(--lx-cyan, #22e0ff);
  animation: lxspin .7s linear infinite;
}
@keyframes lxspin { to { transform: rotate(360deg); } }
