:root {
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #4cc9f0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(1200px 800px at 70% -10%, #15203a, var(--bg));
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

/* 透明叠层 */
.overlay-online {
  position: fixed; top: 12px; left: 14px; z-index: 20;
  color: var(--muted); font-size: 13px; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.overlay-qr {
  position: fixed; top: 12px; right: 14px; z-index: 20;
  width: 120px; height: 120px; padding: 6px; border-radius: 10px;
  background: rgba(255,255,255,0.92);
}
.overlay-qr svg { width: 100%; height: 100%; display: block; }

/* 飞屏弹幕层(宽屏) */
.danmaku-layer {
  position: fixed; inset: 0 0 76px 0; overflow: hidden;
}
.bullet {
  position: absolute; left: 0;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap; will-change: transform;
  font-weight: 700; font-size: 22px; line-height: 1.2;
  cursor: pointer; transition: transform 0.12s ease;
}
.bullet--paused { z-index: 5; }
.bullet__avatar { width: 40px; height: 40px; display: inline-block; flex: none; }
.bullet__avatar svg { width: 100%; height: 100%; display: block; }
.bullet__text { text-shadow: 0 1px 3px rgba(0,0,0,0.65); }
.veh { display: inline-block; flex: none; }

/* 点赞按钮(飞屏 + 聊天通用) */
.like {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,0.35); color: var(--muted);
  border: none; border-radius: 999px; padding: 2px 8px;
  font-size: 13px; font-weight: 700; cursor: pointer; line-height: 1;
}
.like__icon { display: block; }
.is-liked .like { color: #ff6b9d; background: rgba(255,107,157,0.18); }

/* 聊天流(窄屏) */
.chat-list {
  position: fixed; inset: 0 0 76px 0;
  display: none; flex-direction: column; gap: 8px;
  padding: 12px 12px 4px; overflow-y: auto;
}
.chat-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05); border-radius: 12px; padding: 6px 10px;
}
.chat-row__avatar { width: 34px; height: 34px; flex: none; }
.chat-row__avatar svg { width: 100%; height: 100%; display: block; }
.chat-row__text { flex: 1; font-size: 16px; word-break: break-word; }
.chat-row .like { flex: none; }

/* 底部输入 */
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; height: 64px; z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
}
.composer__avatar {
  width: 44px; height: 44px; flex: none; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,0.15); border-radius: 50%;
  overflow: hidden;
}
.composer__avatar svg { width: 100%; height: 100%; display: block; }
.composer__input {
  flex: 1; height: 44px; padding: 0 14px;
  background: rgba(11,18,32,0.7); color: var(--fg);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; font-size: 16px; outline: none;
  backdrop-filter: blur(4px);
}
.composer__input:focus { border-color: var(--accent); }
.composer__send {
  height: 44px; padding: 0 18px; cursor: pointer;
  background: var(--accent); color: #03131a; border: none; border-radius: 12px;
  font-weight: 700; font-size: 16px;
}

/* 头像气泡(无用户名) */
.popover {
  position: fixed; left: 14px; bottom: 76px; z-index: 40;
  min-width: 150px; padding: 12px;
  background: rgba(22,27,34,0.96); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.popover__reroll {
  width: 100%; height: 36px; cursor: pointer; margin-bottom: 8px;
  background: rgba(255,255,255,0.08); color: var(--fg);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; font-size: 14px;
}
.popover__langs { display: flex; gap: 6px; }
.popover__langs button {
  flex: 1; height: 32px; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; font-size: 13px;
}
.popover__langs button.active { color: #0d1117; background: var(--accent); border-color: var(--accent); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: rgba(0,0,0,0.8); color: #fff; padding: 10px 16px; border-radius: 10px;
  z-index: 50; font-size: 14px;
}

/* 模式切换:窄屏 = 聊天流,隐藏飞屏与二维码 */
@media (max-width: 640px) {
  .danmaku-layer { display: none; }
  .chat-list { display: flex; }
  .overlay-qr { display: none; }
}
