/* ==========================================================================
   VR Player — 样式表
   ========================================================================== */

:root {
  --bg: #07080b;
  --bg-soft: #0e1015;
  --panel: rgba(19, 22, 30, 0.82);
  --panel-solid: #12151c;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --text: #eef1f7;
  --text-dim: #9aa1b3;
  --text-faint: #656c7e;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --accent-soft: rgba(79, 140, 255, 0.16);
  --ok: #34d399;
  --danger: #ff5c6c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

/* 必须优先于任何 display 声明：否则 [hidden] 会被 .xxx{display:flex} 覆盖 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { overflow: hidden; }
body.mode-home { overflow: auto; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
kbd {
  display: inline-block; padding: 1px 5px; margin: 0 1px;
  font-size: 11px; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.09); border: 1px solid var(--line);
  border-radius: 5px; color: var(--text-dim);
}
.link {
  color: var(--accent); text-decoration: none; font-size: inherit;
  padding: 0; border-bottom: 1px dashed rgba(79, 140, 255, 0.45);
}
.link:hover { color: #7aa8ff; }
.grow { flex: 1; }

.screen { display: none; }
.screen:not([hidden]) { display: flex; }

/* ==========================================================================
   首页
   ========================================================================== */
.home {
  position: relative;
  min-height: 100%;
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 64px;
  overflow: hidden;
}
.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(110px);
  pointer-events: none; opacity: 0.5; z-index: 0;
}
.bg-glow.a { width: 620px; height: 620px; background: #1c3f8f; top: -240px; left: -140px; }
.bg-glow.b { width: 560px; height: 560px; background: #3a1f7a; bottom: -260px; right: -120px; opacity: 0.42; }

.home-wrap { position: relative; z-index: 1; width: 100%; max-width: 880px; }

.brand { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.brand-logo {
  width: 58px; height: 58px; flex: none;
  display: grid; place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(79,140,255,.22), rgba(124,92,255,.18));
  border: 1px solid rgba(120, 160, 255, 0.28);
  color: #9bbcff;
  box-shadow: 0 0 34px rgba(79, 140, 255, 0.24);
}
.brand-text h1 {
  margin: 0; font-size: 25px; font-weight: 650; letter-spacing: -0.3px;
  background: linear-gradient(92deg, #ffffff, #a9c4ff 65%, #b9a6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text p { margin: 3px 0 0; color: var(--text-dim); font-size: 13px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card.slim { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.card-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-dim); letter-spacing: .3px; }

.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.045); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tab {
  flex: 1; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500;
  color: var(--text-dim); transition: all .18s ease;
}
.tab:hover { color: var(--text); }
.tab.active { background: linear-gradient(140deg, rgba(79,140,255,.9), rgba(124,92,255,.85)); color: #fff; box-shadow: 0 6px 18px rgba(79,140,255,.3); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.url-row { display: flex; gap: 10px; }
.url-row input[type="text"] {
  flex: 1; min-width: 0;
  padding: 12px 14px; font-size: 13.5px;
  background: rgba(0, 0, 0, 0.42); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.url-row input[type="text"]::placeholder { color: var(--text-faint); }
.url-row input[type="text"]:focus {
  border-color: rgba(79, 140, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; font-size: 13.5px; font-weight: 550;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--text);
  transition: all .16s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px rgba(79, 140, 255, 0.34);
}
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn.block { width: 100%; margin-bottom: 2px; }
.btn.sm { padding: 8px 12px; font-size: 12.5px; }
.btn.vr {
  background: linear-gradient(135deg, #12b981, #0ea5a5);
  border-color: transparent; color: #fff; padding: 9px 16px; font-size: 13px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}


.quick { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.quick-label { color: var(--text-faint); font-size: 12px; margin-right: 2px; }
.chip {
  padding: 6px 12px; font-size: 12.5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.055); border: 1px solid var(--line);
  color: var(--text-dim); transition: all .16s;
}
.chip:hover { color: var(--text); border-color: rgba(79,140,255,.5); background: var(--accent-soft); }

.dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 42px 20px;
  text-align: center;
  transition: all .2s ease;
  background: rgba(255, 255, 255, 0.018);
}
.dropzone.hot { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { color: var(--text-faint); margin-bottom: 10px; }
.dropzone.hot .dz-icon { color: var(--accent); }
.dz-main { margin: 0; font-size: 15px; font-weight: 550; }
.dz-sub { margin: 6px 0 0; color: var(--text-dim); font-size: 13px; }

.list { list-style: none; margin: 8px 0 0; padding: 0; }
.list li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  transition: background .15s;
}
.list li:hover { background: rgba(255, 255, 255, 0.05); }
.list .li-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.list .li-tag { font-size: 11px; color: var(--text-faint); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; flex: none; }
.list .li-del { color: var(--text-faint); padding: 2px 6px; border-radius: 6px; flex: none; }
.list .li-del:hover { color: var(--danger); background: rgba(255, 92, 108, 0.12); }

.drop-mask, .drop-hint {
  position: fixed; inset: 0; z-index: 900;
  display: none; place-items: center;
  background: rgba(6, 10, 22, 0.78);
  backdrop-filter: blur(6px);
}
.drop-mask.show, .drop-hint.show { display: grid; }
.drop-mask span, .drop-hint span {
  padding: 22px 40px; border: 2px dashed var(--accent); border-radius: 18px;
  font-size: 18px; font-weight: 600; color: #bcd4ff; background: rgba(79,140,255,.1);
}

/* 首页：本地 / 在线 左右双栏 */
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-col { display: flex; flex-direction: column; min-width: 0; }
.col-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.col-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: .2px; }
.col-ico {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: var(--accent-soft); color: #9bbcff;
}
.home-col .dropzone { padding: 34px 18px; }

/* 播放控制条：图标按钮的「开 / 警告 / 待机」态 */
.icon-btn.on {
  background: linear-gradient(135deg, rgba(79,140,255,.95), rgba(124,92,255,.9));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(79,140,255,.35);
}
.icon-btn.warn { background: #f5b844; color: #1a1205; border-color: transparent; }
.icon-btn.pending { animation: pulseGlow 1.2s ease-in-out infinite; }
@keyframes pulseGlow { 50% { box-shadow: 0 0 0 4px rgba(79,140,255,.20); } }

/* 音量控件（B 站风：默认只显示图标，滑块收进弹出层） */
.vol-wrap { position: relative; flex: none; display: flex; }
/* 音量弹出层：竖向滑块 = 横向滑块旋转 -90°。
   这样圆点(thumb)与轨道(track)的居中关系完全复用横向样式，不会出现错位。 */
.vol-pop {
  position: absolute; bottom: 48px; left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center; justify-content: center;
  width: 48px; height: 148px;
  background: rgba(16,18,24,.96); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); z-index: 25;
}
.vol-wrap:hover .vol-pop, .vol-wrap.open .vol-pop { display: flex; }
.vol-pop .mini-range {
  width: 112px; height: 24px;
  transform: rotate(-90deg);
}
/* hover 桥接层：补掉「图标按钮」与「弹出层」之间的 10px 空隙。
   没有它时，鼠标从图标移向面板的途中会经过空隙 → 离开 .vol-wrap → 触发
   mouseleave → 面板立刻 display:none，表现就是「PC 上鼠标够不到、无法选中」。 */
.vol-pop::after, .rate-pop::after {
  content: ''; position: absolute; left: -8px; right: -8px; bottom: -18px; height: 18px;
}
/* 选中档位后立即收起：即使鼠标还停在面板上，也压过 :hover 不再弹出来 */
.vol-wrap.closed .vol-pop, .rate-wrap.closed .rate-pop { display: none !important; }

/* ==========================================================================
   播放器
   ========================================================================== */
.player {
  position: fixed; inset: 0;
  background: #000; overflow: hidden;
  flex-direction: column;
}
#glcanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden-video {
  position: absolute; width: 1px; height: 1px; opacity: 0.001;
  pointer-events: none; left: -10px; top: -10px;
}
#subtitleBox {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%);
  max-width: 78%; text-align: center; pointer-events: none;
  font-size: 20px; font-weight: 600; line-height: 1.5; color: #fff;
  text-shadow: 0 2px 6px #000, 0 0 3px #000, 0 0 12px rgba(0,0,0,.9);
  z-index: 5; transition: opacity .2s;
}
#subtitleBox:empty { display: none; }

.hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; transition: opacity .28s ease; }
.hud.hide { opacity: 0; }
.hud.hide * { pointer-events: none !important; }
.hud > * { pointer-events: auto; }

/* --- 顶栏 --- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,0));
}
.file-title {
  font-size: 13.5px; font-weight: 500; max-width: 46vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #e6ebf5;
}
.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px; color: #dfe5ef;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all .16s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
/* 顶栏最后一个按钮：退出播放（回首页）。hover 给一点红色提示它是「关闭类」操作 */
.icon-btn.exit:hover { background: rgba(255, 92, 108, .18); color: #ff9aa6; }

.icon-act {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px; color: #dfe5ef;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all .16s ease;
}
.icon-act:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* --- 底部控制条 --- */
.bottombar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 16px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,0));
}
.time { font-size: 12px; color: #cdd4e2; font-variant-numeric: tabular-nums; flex: none; min-width: 42px; text-align: center; }
.seek { position: relative; flex: 1; height: 22px; display: flex; align-items: center; cursor: pointer; }
.seek-track {
  position: relative; width: 100%; height: 4px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.2); overflow: hidden;
}
.seek:hover .seek-track { height: 6px; }
.seek-buf { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255,255,255,.26); }
.seek-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.seek-knob {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%) scale(.75);
  box-shadow: 0 0 8px rgba(0,0,0,.6); opacity: 0; transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.seek:hover .seek-knob { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 音量条：视觉上是 4px 细条，但把整个 input 撑到 24px 高，
   否则 12px 的滑块圆点会溢出 4px 的盒子，圆点的上下半截点不到/拖不动。 */
.mini-range {
  width: 92px; height: 24px; flex: none;
  -webkit-appearance: none; appearance: none;
  background: transparent; outline: none; cursor: pointer;
  touch-action: none;
}
.mini-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 3px;
  background: linear-gradient(90deg,
    var(--accent) 0%, var(--accent) var(--fill, 100%),
    rgba(255,255,255,.22) var(--fill, 100%), rgba(255,255,255,.22) 100%);
}
.mini-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; cursor: pointer; margin-top: -4.5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.55);
}
.mini-range::-moz-range-track { height: 4px; border-radius: 3px; background: rgba(255,255,255,.22); }
.mini-range::-moz-range-progress { height: 4px; border-radius: 3px; background: var(--accent); }
.mini-range::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%;
  background: #fff; cursor: pointer;
}
/* 倍速：与音量条同款弹出层，里面是离散档位选择（非滑动） */
.rate-wrap { position: relative; flex: none; display: flex; }
.rate-btn {
  width: auto; min-width: 52px; padding: 0 10px;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.rate-pop {
  position: absolute; bottom: 48px; left: 50%;
  transform: translateX(-50%);
  display: none; flex-direction: column; gap: 2px;
  padding: 6px; min-width: 68px;
  background: rgba(16,18,24,.96); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); z-index: 25;
}
.rate-wrap:hover .rate-pop, .rate-wrap.open .rate-pop { display: flex; }
.rate-pop button {
  padding: 7px 10px; font-size: 12.5px; border-radius: 8px;
  color: var(--text-dim); text-align: center; font-variant-numeric: tabular-nums;
  transition: background .14s, color .14s;
}
.rate-pop button:hover { background: rgba(255,255,255,.1); color: #fff; }
.rate-pop button.active {
  background: linear-gradient(135deg, rgba(79,140,255,.9), rgba(124,92,255,.85));
  color: #fff;
}

/* 音量反馈 HUD：拖动 / 静音时短暂出现，给出数值反馈 */
.vol-hud {
  position: absolute; left: 50%; bottom: 78px;
  transform: translate(-50%, 6px);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 56px; padding: 10px 12px 11px;
  background: rgba(16,18,24,.94); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.vol-hud.show { opacity: 1; transform: translate(-50%, 0); }
.vol-hud .vh-val { font-size: 12px; color: #dfe5ef; font-variant-numeric: tabular-nums; }
.vol-hud .vh-bar { width: 46px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.22); overflow: hidden; }
.vol-hud .vh-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.vol-hud.muted .vh-fill { background: rgba(255,255,255,.4); }
.vol-hud.muted .vh-val { color: var(--text-dim); }

/* --- 设置面板 --- */
.panel {
  position: absolute; top: 62px; right: 16px; width: 296px;
  max-height: calc(100vh - 150px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform: translateX(calc(100% + 24px)); opacity: 0;
  transition: transform .26s cubic-bezier(.3,.8,.3,1), opacity .2s;
  overflow: hidden;
}
.panel.open { transform: none; opacity: 1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.panel-title { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .3px; }
.panel-body { overflow-y: auto; padding: 0 14px 16px; }
.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

.group { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.group:first-child { border-top: none; }
.group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.group-ico { color: #6f8bd6; opacity: .85; display: flex; }
.group-name { font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--text-dim); }
.group-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }

/* 陀螺仪状态：把「为什么没反应」显示在面板里 */
.gyro-hint { margin: 6px 0 2px; padding: 7px 9px; border-radius: 8px; background: rgba(0,0,0,.24); border-left: 2px solid rgba(255,255,255,.14); }
.gyro-hint.ok { color: #a7f3d0; border-left-color: #34d399; }
.gyro-hint.err { color: #ffc2c9; border-left-color: #ff5c6c; background: rgba(255,92,108,.1); }
.gyro-hint.wait { color: #ffe1a8; border-left-color: #f5b844; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  padding: 7px 11px; font-size: 12.5px; border-radius: 9px;
  background: rgba(255,255,255,.055); border: 1px solid var(--line);
  color: var(--text-dim); transition: all .15s;
}
.chips button:hover { color: var(--text); border-color: rgba(79,140,255,.45); }
.chips button.active {
  background: linear-gradient(135deg, rgba(79,140,255,.9), rgba(124,92,255,.85));
  border-color: transparent; color: #fff;
  box-shadow: 0 5px 14px rgba(79,140,255,.28);
}
.chips button.hidden { display: none; }
.chips.icon-chips { gap: 6px; }
.chips.icon-chips button { padding: 9px; display: grid; place-items: center; }
.chips.icon-chips button svg { width: 20px; height: 20px; }

.slider-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.slider-row > span { font-size: 12px; color: var(--text-dim); flex: none; white-space: nowrap; }
.slider-row > em { font-size: 11.5px; color: var(--text-faint); font-style: normal; flex: none; width: 50px; text-align: right; font-variant-numeric: tabular-nums; }
.slider-row.mini { margin-top: 9px; gap: 8px; }
.slider-row input[type="range"] {
  flex: 1; min-width: 0; height: 4px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.16); border-radius: 3px; outline: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(79,140,255,.16);
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border: none; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}
.sub-group { margin-top: 6px; padding: 10px 12px; background: rgba(0,0,0,.26); border-radius: 10px; }
.sub-group .slider-row:first-child { margin-top: 2px; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; cursor: pointer; font-size: 13px; color: var(--text-dim);
}
.switch-row:hover { color: var(--text); }
.switch-row input { display: none; }
.switch-row > svg { width: 17px; height: 17px; flex: none; color: var(--text-dim); }
.switch-row:hover > svg { color: var(--text); }
.switch-row > span { flex: 1; min-width: 0; font-size: 13px; color: var(--text-dim); }
.switch-row:hover > span { color: var(--text); }
.switch-row i {
  position: relative; width: 38px; height: 22px; flex: none;
  background: rgba(255,255,255,.14); border-radius: 999px; transition: background .2s;
}
.switch-row i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .2s cubic-bezier(.3,.8,.3,1);
}
.switch-row input:checked + i { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch-row input:checked + i::after { transform: translateX(16px); }

/* --- 加载 / 提示 --- */
.loading {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  z-index: 40; color: #cfd6e4; font-size: 13px; pointer-events: none;
}
.spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.16); border-top-color: var(--accent);
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  padding: 10px 20px; border-radius: 999px;
  background: rgba(16, 18, 24, .94); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; z-index: 60;
  opacity: 0; transition: opacity .22s, transform .22s;
  box-shadow: 0 12px 34px rgba(0,0,0,.6); pointer-events: none;
  max-width: 78vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(255,92,108,.5); color: #ffc2c9; }

.xr-badge {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(16, 18, 24, .9); border: 1px solid rgba(52,211,153,.4);
  color: #c9f5e4; font-size: 12.5px; z-index: 30;
}
.xr-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 720px) {
  .home { padding: 26px 14px 44px; }
  .brand { gap: 12px; margin-bottom: 22px; }
  .brand-logo { width: 48px; height: 48px; border-radius: 14px; }
  .brand-text h1 { font-size: 21px; }
  .brand-text p { font-size: 12px; }
  .card { padding: 16px; border-radius: 15px; }
  .url-row { flex-direction: column; }
  .tips { grid-template-columns: 1fr; }
  /* 本地 / 在线 在窄屏下改为上下堆叠 */
  .home-cols { grid-template-columns: 1fr; gap: 16px; }
  .panel { top: 58px; right: 8px; left: 8px; width: auto; max-height: calc(100vh - 132px); }
  /* 音量 / 倍速 弹出层：窄屏略微收拢 */
  .vol-pop { height: 126px; }
  .vol-pop .mini-range { width: 90px; }
  .rate-pop { bottom: 44px; }
  .file-title { max-width: 34vw; }
  .icon-btn { width: 34px; height: 34px; }
  .bottombar { gap: 7px; padding: 9px 10px 11px; }
  #subtitleBox { font-size: 16px; bottom: 96px; }
}
