/* ============================================================================
 * public/spinvid.css —— 商品旋转视频（2026-09-19 · 开发员15号）
 *
 * 🔴 三条纪律（写这个文件之前必须知道）：
 *   ① **类名一律 `spv-` 前缀**（已核：全站 CSS/JS/HTML 里 `spv-` 完全没被占用）。
 *      别用裸类名 —— 「老板记账」的 `.lg-*` 就是被「法务顾问」的 `.lg-*` 覆盖过，
 *      按钮变成白底白字，零报错、只有用户点得到才发现。
 *   ② **本文件必须排在 style.css 之后加载**，否则会被通用规则盖住。
 *   ③ **不引入新色相**：整页只有一条色轴 ——
 *      深紫黑（#17131f→#0c0912）+ 洋红强调（#e879f9 / #86198f，色相约 294°）。
 *      294° 是视频板块色相环上最大的空位（已占 0/21/38/142/164/189/217/243/258/330，
 *      离最近占用色 36°）→ 跑 `node tools/audit-icon-colors.cjs --view video` 可复验。
 *
 * 视觉意图：**"展台"**。深色底把商品衬出来，这是电商高级感的通用语法 ——
 * 明度对比拉开，商品才是主角，界面本身要退到后面去。
 * ========================================================================== */

/* ===================== 一、图标配色 ===================== */
.f-spinvid { background: linear-gradient(135deg, #e879f9 0%, #86198f 100%); }

/* ===================== 二、顶部 hero（深色展台） ===================== */
.spv-hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 20px 18px 18px; margin-bottom: 14px;
  /* 深紫黑 + 左上洋红柔光：跟 mv-hero 同一套"深色 hero"语法（板块内统一），
     只把光斑色换成洋红 —— 靠明度对比出高级感，不靠堆颜色。 */
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(217, 70, 239, .34) 0%, rgba(217, 70, 239, 0) 55%),
    linear-gradient(150deg, #17131f 0%, #0c0912 100%);
  color: #fff;
}
.spv-hero::after {          /* 左下角一枚很淡的光斑 */
  content: '';
  position: absolute; left: -40px; bottom: -56px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 249, .38), rgba(232, 121, 249, 0) 68%);
  pointer-events: none;
}
/* 右侧装饰：一圈细线轨迹 + 环上一点 —— 就是"镜头绕商品转一圈"本身。
   用极简几何而不是插画，是为了不跟商品图抢注意力。 */
.spv-hero-ring {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}
.spv-hero-ring::before {
  content: '';
  position: absolute; left: 50%; top: -4px; width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%; background: #e879f9;
  box-shadow: 0 0 10px rgba(232, 121, 249, .9);
}
.spv-hero-ring::after {     /* 中心一个方点 = 商品 */
  content: '';
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px;
  margin: -8px 0 0 -8px; border-radius: 4px;
  background: rgba(255, 255, 255, .22);
}
.spv-hero-tag {
  position: relative; display: inline-block;
  font-size: 11px; letter-spacing: .6px; font-weight: 600; color: #f0c8fb;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 4px 11px;
}
.spv-hero-t {
  position: relative; font-size: 22px; font-weight: 800; letter-spacing: .8px; margin-top: 11px;
  line-height: 1.35;
}
.spv-hero-s {
  position: relative; font-size: 12.5px; line-height: 1.65; color: rgba(255, 255, 255, .78);
  margin-top: 7px; max-width: 78%;
}
.spv-hero-meta { position: relative; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.spv-hero-meta span {
  font-size: 11.5px; color: #f3d9fb;
  background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 5px 11px;
}

/* ===================== 三、商品图上传槽（1:1 方形） ===================== */
.spv-slot {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  border: 1.5px dashed #e2cfe8; border-radius: 16px;
  background: #fdf9fe; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.spv-slot:active { background: #f9eefc; border-color: #a21caf; }
.spv-slot.has { border-style: solid; border-color: #edd8f4; background: #fff; }
.spv-slot.has .spv-slot-hint { display: none; }
.spv-slot.has .spv-prev { display: block; }
.spv-slot input[hidden] { display: none !important; }
.spv-prev { display: none; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.spv-slot-hint { text-align: center; padding: 14px; }
.spv-slot-ico { font-size: 30px; line-height: 1; opacity: .85; }
.spv-slot-t { font-size: 13.5px; font-weight: 700; margin-top: 9px; color: #4a3a52; }
.spv-slot-t i { font-style: normal; font-size: 11px; font-weight: 600; color: #a78bb0; margin-left: 4px; }
.spv-slot-s { font-size: 11.5px; color: #9b8aa3; margin-top: 5px; line-height: 1.6; }

/* ===================== 四、清晰度三档卡 ===================== */
/* 比普通 chips 更大的点击面 + 带费用与「推荐」标 —— 分辨率是这一页最影响花钱的选项，
   把它做成三张卡而不是一排小胶囊，用户才会真的停下来看一眼。 */
.spv-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.spv-res-i {
  position: relative; text-align: center; cursor: pointer;
  padding: 11px 6px 10px; border-radius: 13px;
  border: 1.5px solid #eee6f2; background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.spv-res-i.on {
  border-color: #a21caf; background: #fdf4ff;
  box-shadow: 0 4px 14px -6px rgba(162, 28, 175, .45);
}
.spv-res-n { font-size: 15px; font-weight: 800; color: #3d2f45; letter-spacing: .3px; }
.spv-res-i.on .spv-res-n { color: #86198f; }
.spv-res-c { font-size: 11px; color: #9b8aa3; margin-top: 4px; }
.spv-res-i.on .spv-res-c { color: #a21caf; font-weight: 600; }
.spv-res-badge {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .3px;
  background: linear-gradient(135deg, #e879f9 0%, #86198f 100%);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}

/* ===================== 五、结果展示台 ===================== */
.spv-stage {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 14px;
  background:
    radial-gradient(110% 130% at 50% 0%, rgba(217, 70, 239, .20) 0%, rgba(217, 70, 239, 0) 60%),
    linear-gradient(170deg, #17131f 0%, #0c0912 100%);
  display: flex; align-items: center; justify-content: center; min-height: 190px;
}
.spv-video {
  width: 100%; max-width: 320px; border-radius: 12px; display: block;
  background: #000; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8);
}
.spv-stage-tip { color: rgba(255, 255, 255, .6); font-size: 12px; text-align: center; line-height: 1.7; }
.spv-acts { display: flex; gap: 9px; margin-top: 12px; }
.spv-acts a, .spv-acts button {
  flex: 1; text-align: center; text-decoration: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600; padding: 11px 0; border-radius: 11px; border: 1px solid #eee6f2;
  background: #fff; color: #4a3a52;
}
.spv-acts .main {
  border: 0; color: #fff; background: linear-gradient(135deg, #e879f9 0%, #86198f 100%);
  box-shadow: 0 6px 16px -8px rgba(134, 25, 143, .9);
}
.spv-acts a:active, .spv-acts button:active { transform: scale(.985); }

/* ===================== 六、进度 ===================== */
.spv-progress { display: none; margin-top: 14px; }
.spv-progress.on { display: block; }
.spv-bar-wrap { height: 6px; border-radius: 999px; background: #f2ebf4; overflow: hidden; }
.spv-bar {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #e879f9 0%, #86198f 100%);
  transition: width .5s ease;
}
.spv-status { font-size: 12.5px; color: #8b7a93; margin-top: 9px; text-align: center; }

/* ===================== 七、窄屏微调 ===================== */
@media (max-width: 360px) {
  .spv-hero-t { font-size: 19px; }
  .spv-hero-s { max-width: 100%; }
  .spv-hero-ring { display: none; }      /* 极窄屏让位给文字，别挤压可读性 */
  .spv-res-n { font-size: 13.5px; }
}

/* ===================== 八、小节标题 ===================== */
.spv-sub { font-size: 12.5px; font-weight: 700; margin: 15px 0 7px; }
.spv-sub:first-of-type { margin-top: 6px; }

/* ===================== 九、轻提示 ===================== */
/* 用 id 选择器（不用类名）—— 这类一次性的、只在本页出现的元素，用 id 最省事且绝不撞车 */
#svToast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  max-width: 78vw; padding: 10px 16px; border-radius: 999px;
  background: rgba(23, 19, 31, .94); color: #fff; font-size: 13px; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 60;
}
#svToast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
