/* Webgpu Video Player — 网站页面样式（播放器本体样式见 player.css）。
   与 Google AdSense 自动广告兼容的约定：
   1. 只使用本站自有的 .avp-* 类选择器；不使用 *、div、iframe、ins、img 等通用/元素选择器，避免波及广告元素。
   2. 文章区为普通块级流式布局：容器宽度明确（width:100% + max-width），不浮动，不限制高度，不设 overflow 裁剪。
   3. 自动广告可能插入的父容器（main / article / section）保持 display:block，不使用 flex / grid。
   4. 内容在加载时全部可见；页头不吸顶，不遮挡锚定广告。浏览器与桌面应用中显示同一界面。 */

html { background: #07090c; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.avp-site {
  margin: 0; background: #07090c; color: #c4ccd7;
  font: 16px/1.7 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}

/* ── 通用容器 ── */
.avp-wrap { display: block; width: 100%; max-width: 1040px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; box-sizing: border-box; }
.avp-page { display: block; width: 100%; }
.avp-skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: #b3e8d5; color: #10241c; font-weight: 600; text-decoration: none; }
.avp-skip:focus { top: 12px; }

/* ── 页头（静态，不吸顶） ── */
.avp-site-header { display: block; width: 100%; border-bottom: 1px solid #ffffff12; background: #0a0d12; }
.avp-header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.avp-brand { display: inline-flex; align-items: center; gap: 10px; color: #eef3f7; text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.avp-brand-mark { width: 32px; height: 32px; flex: none; }
.avp-brand-tile { fill: #12201c; stroke: #8fe3cb66; stroke-width: 1.2; }
.avp-brand-play { fill: #a9ecd3; }
.avp-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.avp-nav-link { padding: 7px 12px; border-radius: 8px; color: #b6c1cd; text-decoration: none; font-size: 14.5px; }
.avp-nav-link:hover { background: #ffffff0f; color: #eef3f7; }
.avp-nav-link:focus-visible, .avp-brand:focus-visible, .avp-link:focus-visible, .avp-footer-link:focus-visible { outline: 2px solid #8fe3cb; outline-offset: 2px; }

/* ── 首屏介绍 ── */
.avp-hero { padding-top: 26px; padding-bottom: 18px; text-align: center; }
.avp-h1 { margin: 0 auto 10px; max-width: 820px; color: #f2f6f9; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.18; font-weight: 700; letter-spacing: -.025em; }
.avp-h1-accent { color: #9fe8cf; }
.avp-h1-left { margin-left: 0; margin-right: 0; text-align: left; }
.avp-lead { margin: 0 auto; max-width: 700px; color: #aab4c1; font-size: clamp(15.5px, 1.8vw, 17.5px); }
.avp-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.avp-badge { padding: 5px 12px; border-radius: 999px; border: 1px solid #8fe3cb33; background: #8fe3cb0d; color: #bfe9da; font-size: 13px; }

/* ── 播放器舞台（网站模式：居中圆角卡片） ── */
.avp-stage { display: block; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.avp-stage .player-viewport[data-avp-ui] {
  /* 首屏（约 900px 高的窗口）内完整显示播放器及控制栏 */
  height: clamp(260px, 58vh, 700px); height: clamp(260px, 58dvh, 700px);
  border-radius: 16px; border: 1px solid #ffffff14; box-shadow: 0 24px 70px #0000008c;
}
.avp-stage #playerViewport[data-avp-ui]:fullscreen { border-radius: 0; border: 0; height: 100vh; height: 100dvh; }
.engine-status[data-avp-ui] { display: flex; align-items: center; gap: 8px; margin: 12px 4px 0; color: #9aa6b4; font-size: 13.5px; line-height: 1.5; }
.engine-status[data-avp-ui]::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #c9a85c; }
.engine-status[data-engine="webgpu"][data-avp-ui]::before { background: #6fdcb4; box-shadow: 0 0 0 4px #6fdcb422; }
.engine-status[hidden][data-avp-ui] { display: none !important; }

.avp-browser-playlist[data-avp-ui] { display: block; margin: 16px 0 0; padding: 16px 18px; border-radius: 14px; border: 1px solid #ffffff14; background: #0d1218; color: #d3dce5; font-size: 14.5px; line-height: 1.55; }
.avp-playlist-title[data-avp-ui] { margin: 0 0 8px; color: #eef3f7; font-size: 15px; font-weight: 650; }
.avp-playlist-list[data-avp-ui] { display: block; max-width: 100%; }

/* ── 文章（流式布局；不要改成 flex / grid，广告可能插入在各 section 之间） ── */
.avp-article { padding-top: 36px; padding-bottom: 28px; }
.avp-section { display: block; width: 100%; padding: 34px 0; border-top: 1px solid #ffffff10; scroll-margin-top: 16px; }
.avp-section:first-child { border-top: 0; }
.avp-h2 { margin: 0 0 14px; color: #eef3f7; font-size: clamp(22px, 2.8vw, 28px); line-height: 1.3; font-weight: 680; letter-spacing: -.015em; }
.avp-h3 { margin: 0 0 6px; color: #e3eaf0; font-size: 17px; line-height: 1.4; font-weight: 650; }
.avp-p { margin: 0 0 14px; }
.avp-note { color: #94a1af; font-size: 14.5px; }
.avp-link { color: #9fe8cf; text-decoration: underline; text-underline-offset: 3px; }
.avp-link:hover { color: #c8f5e5; }
.avp-section strong { color: #e6edf2; font-weight: 650; }

/* 功能卡片：网格放在列表元素上（广告不会插入列表内部），不影响文章的流式布局。 */
.avp-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.avp-feature { padding: 20px 20px 8px; border-radius: 14px; border: 1px solid #ffffff12; background: linear-gradient(180deg, #0f151c, #0b1016); }
.avp-feature .avp-p { color: #a9b3c0; font-size: 15px; line-height: 1.65; }
.avp-feature-icon { display: block; width: 26px; height: 26px; margin: 0 0 12px; fill: none; stroke: #8fe3cb; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 使用步骤：编号圆点用 CSS 计数器。 */
.avp-steps { margin: 20px 0 8px; padding: 0; list-style: none; counter-reset: avp-step; }
.avp-step { position: relative; margin: 0 0 18px; padding: 0 0 0 52px; counter-increment: avp-step; }
.avp-step::before { content: counter(avp-step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #8fe3cb59; background: #8fe3cb14; color: #b5f0dc; font-weight: 700; font-size: 15px; }
.avp-step .avp-p { margin-bottom: 0; }

.avp-kbd { display: inline-block; min-width: 1.6em; padding: 1px 7px; border-radius: 6px; border: 1px solid #ffffff2e; border-bottom-width: 2px; background: #141b24; color: #e9eff4;
  font: 600 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; text-align: center; }

.avp-table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.avp-caption { caption-side: bottom; padding-top: 10px; color: #8996a5; font-size: 13.5px; text-align: left; }
.avp-table th { padding: 11px 14px; border-bottom: 1px solid #ffffff24; color: #e6edf2; font-weight: 650; text-align: left; background: #0e141b; }
.avp-table td { padding: 11px 14px; border-bottom: 1px solid #ffffff10; vertical-align: top; overflow-wrap: anywhere; }

.avp-faq .avp-h3 { margin-top: 22px; }
.avp-faq .avp-h3:first-child { margin-top: 4px; }

/* ── 页脚 ── */
.avp-site-footer { display: block; width: 100%; border-top: 1px solid #ffffff12; background: #0a0d12; color: #8793a1; font-size: 14px; }
.avp-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 22px; padding-bottom: 22px; }
.avp-footer-text { margin: 0; }
.avp-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.avp-footer-link { color: #aeb9c5; text-decoration: none; }
.avp-footer-link:hover { color: #eef3f7; text-decoration: underline; }

/* ── 小屏幕 ── */
@media (max-width: 720px) {
  .avp-wrap { padding-left: 16px; padding-right: 16px; }
  .avp-header-inner { min-height: 56px; }
  .avp-nav-link { padding: 6px 9px; font-size: 14px; }
  .avp-hero { padding-top: 24px; padding-bottom: 16px; }
  .avp-stage { padding: 0 10px; }
  .avp-stage .player-viewport[data-avp-ui] { height: clamp(240px, calc(56.25vw + 96px), 70vh); height: clamp(240px, calc(56.25vw + 96px), 70dvh); border-radius: 12px; }
  .avp-section { padding: 26px 0; }
  .avp-table th, .avp-table td { padding: 9px 10px; }
  .avp-step { padding-left: 46px; }
}

/* ── 桌面应用全屏：与浏览器里的播放器全屏一致，播放区域铺满窗口（页头、文章不显示） ── */
.avp-stage .player[data-host-fullscreen="true"] .player-viewport[data-avp-ui] {
  position: fixed; inset: 0; z-index: 2147483000; width: 100%; height: 100vh; height: 100dvh;
  border: 0; border-radius: 0; box-shadow: none;
}
html:has(.player[data-host-fullscreen="true"]) { overflow: hidden; }
