/* ============================================================
   E-BOT 联机站 — 深色科技风样式表
   Task 7: 页面结构与 CSS（无交互逻辑）
   字体：Sora（拉丁展示） / Noto Sans SC（中文正文） / JetBrains Mono（ID·代码）
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 色板 */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-gradient: linear-gradient(135deg, #00d4ff, #7c3aed);
  --self-bubble: linear-gradient(135deg, #238636, #2ea043);
  --bot-bubble: linear-gradient(135deg, #8957e5, #a371f7);
  --border: #30363d;

  /* 派生色 */
  --bubble-other: #87ceeb; /* 其他用户气泡：天空蓝（SkyBlue） */
  --glass: rgba(22, 27, 34, 0.62);
  --glass-strong: rgba(13, 17, 23, 0.78);
  --hairline: rgba(230, 237, 243, 0.08);
  --accent-soft: rgba(88, 166, 255, 0.16);
  --cyan: #00d4ff;
  --violet: #7c3aed;

  /* 字体 */
  --font-display: 'Sora', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  /* 度量 */
  --rail-left: 240px;
  --rail-right: 200px;
  --input-h: 116px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  /* 阴影 */
  --shadow-panel: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --shadow-glow: 0 0 0 1px var(--accent-soft), 0 8px 28px -8px rgba(88, 166, 255, 0.45);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure { margin: 0; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

.mono { font-family: var(--font-mono); font-variant-ligatures: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. 氛围层：网格 / 光晕 / 颗粒 ---------- */
.atmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* 极细工程网格 */
.atmos--grid {
  background-image:
    linear-gradient(rgba(230, 237, 243, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 237, 243, 0.035) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 8%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 8%, transparent 78%);
}

/* 青 / 紫双色辉光 + 底部渐隐 */
.atmos--glow {
  background:
    radial-gradient(58% 42% at 8% -6%, rgba(0, 212, 255, 0.20), transparent 62%),
    radial-gradient(52% 46% at 96% 4%, rgba(124, 58, 237, 0.22), transparent 64%),
    radial-gradient(70% 50% at 50% 116%, rgba(88, 166, 255, 0.12), transparent 70%),
    linear-gradient(180deg, #0d1117 0%, #0b0f15 55%, #090c11 100%);
  z-index: -1;
}

/* 颗粒感：内联 SVG 湍流（非外部图片） */
.atmos--grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 4. 布局骨架 ---------- */
#app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail-left) 1fr var(--rail-right);
  grid-template-rows: 1fr;
  height: 100vh;
  height: 100dvh;
  gap: 14px;
  padding: 14px;
}
/* 关键：display 声明会覆盖 hidden 属性，必须强制隐藏（否则登录页下会压着主界面） */
#app[hidden] { display: none !important; }
.auth-form[hidden] { display: none !important; }

/* 玻璃卡片层 */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 顶部一线渐变高光 */
.panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.55), rgba(124, 58, 237, 0.45), transparent);
  opacity: 0.7;
}

/* 入场错峰 */
#panel-profile { animation-delay: 0.05s; }
#panel-chat    { animation-delay: 0.16s; }
#panel-actions { animation-delay: 0.27s; }

.panel__head {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--hairline);
}

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.brand {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--text-secondary);
  background: none;
  -webkit-text-fill-color: var(--text-secondary);
}

.panel__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--hairline);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.dot-line {
  flex: 1;
  height: 1px;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 5px 1px;
}

/* ---------- 5. 左栏：个人信息 ---------- */
#panel-profile {
  padding-bottom: 0;
}

.avatar-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 头像靠左，昵称在右侧 */
  gap: 13px;
  padding: 26px 14px 18px;
}

.avatar {
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 10px 26px -12px rgba(0, 212, 255, 0.55);
}

/* 旋转的渐变环 */
.avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--cyan), var(--violet), var(--accent), var(--cyan));
  animation: ringSpin 9s linear infinite;
}

/* 内层不透明圆盘，遮住渐变环中心，形成环形 */
.avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.avatar__glyph {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  opacity: 0.92;
}

.avatar__pulse {
  position: absolute;
  top: 26px;
  left: 14px; /* 与头像对齐（avatar-block padding-left） */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.45);
  animation: glowPulse 2.8s ease-out infinite;
}

.avatar__badge {
  position: absolute;
  top: 68px;
  left: 62px; /* 头像右下角（14 + 60 - 12） */
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ea043;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px rgba(46, 160, 67, 0.9);
}

/* 昵称（头像右侧） */
.nickname-box {
  min-width: 0;
  flex: 1;
}
.nickname {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nickname__hint {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.6;
  letter-spacing: 0.1em;
}

/* 聊天气泡中的发送者昵称 */
.bubble__nick {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 管理员：紫色渐变；超级管理员：琥珀渐变 */
.bubble__nick--admin {
  color: #b98aff;
  text-shadow: 0 0 8px rgba(180, 140, 255, 0.35);
}
.bubble__nick--super {
  color: #ffc36a;
  text-shadow: 0 0 8px rgba(255, 195, 106, 0.35);
}
.bubble__nick--clickable {
  cursor: pointer;
  border-bottom: 1px dotted rgba(230, 237, 243, 0.35);
}
.bubble__nick--clickable:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.bubble__nick--admin.bubble__nick--clickable:hover,
.bubble__nick--super.bubble__nick--clickable:hover {
  color: inherit;
  border-bottom-color: currentColor;
}

/* 昵称操作菜单（管理员点击昵称弹出） */
.nick-menu {
  position: absolute;
  z-index: 90;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 23, 30, 0.97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.nick-menu[hidden] { display: none; }
.nick-menu__head {
  padding: 5px 8px 7px;
  font-size: 11px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nick-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
  cursor: pointer;
}
.nick-menu button:hover { background: rgba(88, 166, 255, 0.12); }
.nick-menu button.nick-menu__danger { color: #ff9a9a; }
.nick-menu button.nick-menu__danger:hover { background: rgba(255, 110, 110, 0.14); }

/* 后台面板操作按钮 */
.player-modal__actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.player-modal__btn {
  padding: 3px 8px;
  font-size: 10.5px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.7);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.player-modal__btn:hover { color: var(--text-primary); border-color: var(--accent); }
.player-modal__btn--danger { color: #ff9a9a; }
.player-modal__btn--danger:hover { border-color: #ff5f5f; color: #ffb3b3; }
.player-modal__btn--amber { color: #ffc36a; }
.player-modal__btn--amber:hover { border-color: #ffc36a; }
.player-modal__role {
  flex: 0 0 auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.player-modal__role--admin { color: #b98aff; border-color: rgba(180, 140, 255, 0.5); }
.player-modal__role--super { color: #ffc36a; border-color: rgba(255, 195, 106, 0.5); }

.card {
  margin: 0 14px 12px;
  padding: 12px 13px;
  background: linear-gradient(180deg, rgba(33, 38, 45, 0.85), rgba(33, 38, 45, 0.55));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.card__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.card__hint {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.8;
}

.id-card__value {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  word-break: break-all;
  text-shadow: 0 0 18px rgba(88, 166, 255, 0.35);
}

.online-card__value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

/* 在线人数行：人数 + 游客数 + 「玩家列表」按钮 */
.online-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.online-card__guests {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.online-card__guests b {
  font-family: var(--font-mono);
  color: #ffc36a;
}
.player-list-btn {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.6);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.player-list-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 玩家列表弹窗 */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 12, 0.55);
  backdrop-filter: blur(4px);
}
.player-modal[hidden] { display: none; }
.player-modal__panel {
  width: min(320px, 88vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24, 29, 36, 0.98), rgba(15, 19, 25, 0.98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.player-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}
.player-modal__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.player-modal__close {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.7);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.player-modal__close:hover { color: var(--text-primary); border-color: var(--accent); }
.player-modal__list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.player-modal__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(230, 237, 243, 0.045);
  border: 1px solid rgba(230, 237, 243, 0.06);
}
.player-modal__item .player-modal__nick {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-modal__item .player-modal__id {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}
.player-modal__empty {
  padding: 22px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.online-card__slash {
  margin: 0 4px;
  color: var(--text-secondary);
  font-weight: 400;
}

.online-card__bar {
  margin-top: 10px;
  height: 3px;
  border-radius: 3px;
  background: rgba(230, 237, 243, 0.08);
  overflow: hidden;
}

.online-card__bar i {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: 3px;
  background: var(--accent-gradient);
}

/* 公告区（左侧在线人数下方，紧凑） */
.announcement-bar { display: none; } /* 手机公告条：仅窄屏显示 */
/* 手机专属状态条（ID + 在线人数）：仅窄屏显示 */
.mobile-status { display: none; }

.announce-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1; /* 占满剩余高度，把「暂无公告」之外的滚动区留给公告列表 */
}
/* 公告标题行：左「公告」右实时时钟 */
.announce-card .card__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.announce-card__clock {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.85;
}
.announce-card__list {
  margin-top: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 420px);
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 166, 255, 0.35) transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.announce-card__list::-webkit-scrollbar {
  width: 4px;
}
.announce-card__list::-webkit-scrollbar-thumb {
  background: rgba(88, 166, 255, 0.35);
  border-radius: 4px;
}
.announce-card__item {
  position: relative;
  padding: 7px 9px 7px 11px;
  border-radius: 8px;
  background: rgba(88, 166, 255, 0.08);
  border-left: 2px solid var(--accent);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  animation: announceIn 0.35s ease both;
  word-break: break-all;
}
.announce-card__item .announce-card__time {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}
.announce-card__empty {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.6;
}
@keyframes announceIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 6. 中栏：交流区 ---------- */
#panel-chat {
  display: flex;
  flex-direction: column;
}

#chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.55), transparent);
}

.chat-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.chat-title h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chan {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* 公共频道 / 私聊 Bot 切换按钮 */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.6);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.mode-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.mode-toggle__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.7;
  transition: background 0.2s;
}
/* 私聊模式激活态 */
.mode-toggle.is-dm {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
}
.mode-toggle.is-dm .mode-toggle__dot {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.7);
}

/* 连接状态指示器 */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.6);
  color: var(--text-secondary);
  white-space: nowrap;
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: glowPulse 1.9s ease-out infinite;
}

.status.is-pending { color: #d29922; border-color: rgba(210, 153, 34, 0.4); }
.status.is-online  { color: #2ea043; border-color: rgba(46, 160, 67, 0.4); }
.status.is-offline { color: #f85149; border-color: rgba(248, 81, 73, 0.4); }
.status.is-offline .status__dot { animation: none; }

/* 消息列表 */
#message-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 148, 158, 0.35) transparent;
}

#message-list:focus-visible {
  outline: 1px solid var(--accent-soft);
  outline-offset: -2px;
}

#message-list::-webkit-scrollbar { width: 6px; }
#message-list::-webkit-scrollbar-track { background: transparent; }
#message-list::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 158, 0.28);
  border-radius: 999px;
}
#message-list::-webkit-scrollbar-thumb:hover { background: rgba(139, 148, 158, 0.5); }

.msg-row {
  display: flex;
  width: 100%;
}
.msg-row--left  { justify-content: flex-start; }
.msg-row--right { justify-content: flex-end; }

/* ---------- 7. 消息气泡 ---------- */
.message-bubble {
  position: relative;
  max-width: min(560px, 74%);
  padding: 9px 13px 10px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.9);
  animation: slideInLeft 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bubble__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* 时间加长后自动换行，避免溢出 */
  gap: 7px;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.bubble__meta time { font-family: var(--font-mono); }
/* 保留消息中的换行符（DLL 回复的多行文本） */
.bubble__body {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 自己：右侧 · 绿色渐变 · 左侧圆角更大 */
.bubble-self {
  background: var(--self-bubble);
  color: #f0fff4;
  border-radius: var(--r-md) 4px var(--r-md) var(--r-md);
  animation-name: slideInRight;
}
.bubble-self .bubble__meta { justify-content: flex-end; }

/* 他人：左侧 · 中性灰 · 右侧圆角更大 */
.bubble-other {
  background: var(--bubble-other);
  color: #0b2338; /* 天空蓝背景上用深色文字保证可读 */
  border: 1px solid rgba(135, 206, 235, 0.55);
  border-radius: 4px var(--r-md) var(--r-md) var(--r-md);
}

/* 机器人：紫色渐变 + 特殊描边 */
.bubble-bot {
  background: var(--bot-bubble);
  color: #f6f2ff;
  border: 1px solid rgba(163, 113, 247, 0.85);
  border-left: 3px solid var(--cyan);
  border-radius: 4px var(--r-md) var(--r-md) var(--r-md);
  box-shadow: 0 10px 30px -16px rgba(137, 87, 229, 0.95);
}

/* 插件外发消息气泡：霓虹色渐变气泡 + 白色光晕小幅散发
   仅 .bubble-bot--plugin（插件调用 bot 发出的消息）生效，玩家对话的 bot 回复不受影响 */
.bubble-bot--plugin {
  position: relative;
  background: linear-gradient(135deg, #00d4ff, #7c3aed); /* 青→紫霓虹渐变 */
  border-color: rgba(0, 212, 255, 0.65);
  color: #fff;
}
@keyframes pluginGlow {
  0%   { opacity: 0.85; transform: scale(1); }
  70%  { opacity: 0.35; transform: scale(1.12); }
  100% { opacity: 0.85; transform: scale(1); }
}
.bubble-bot--plugin::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 2px;
  /* 白色光晕小幅散发（扩散改小：scale 1.12，不旋转） */
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  animation: pluginGlow 2.8s ease-out infinite;
  pointer-events: none;
}

.tag-bot {
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  border-radius: 4px;
  background: rgba(13, 17, 23, 0.45);
  color: var(--cyan);
}

/* 系统：居中 · 透明 · 灰色斜体小字 */
.bubble-system {
  align-self: center;
  max-width: 84%;
  padding: 3px 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.04em;
  animation-name: fadeInUp;
}

/* ---------- 8. 输入区 ---------- */
#input-area {
  flex: 0 0 auto;
  height: var(--input-h);
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(0deg, rgba(13, 17, 23, 0.72), rgba(13, 17, 23, 0.25));
}

#message-input {
  flex: 1;
  min-width: 0;
  resize: none;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
  background: rgba(13, 17, 23, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 148, 158, 0.3) transparent;
}

#message-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.75;
}

#message-input:hover { border-color: #3d444d; }

#message-input:focus {
  border-color: var(--accent);
  background: rgba(13, 17, 23, 0.9);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#message-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#message-input::-webkit-scrollbar { width: 6px; }
#message-input::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 158, 0.26);
  border-radius: 999px;
}

#send-button {
  position: relative;
  flex: 0 0 auto;
  width: 94px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--r-md);
  background: var(--accent-gradient);
  color: #04121c;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

#send-button .send-button__arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
}

#send-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.45), 0 12px 30px -10px rgba(0, 212, 255, 0.75);
}

#send-button:active { transform: translateY(0) scale(0.985); }

#send-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#send-button:disabled {
  filter: grayscale(0.7);
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 发送中的加载态（Task 12）：轻微呼吸动画 */
#send-button.loading {
  animation: sendPulse 1.1s ease-in-out infinite;
}

@keyframes sendPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

/* ---------- 9. 右栏：按钮预留区 ---------- */
#panel-actions .panel__head { padding-bottom: 12px; }

#action-buttons {
  flex: 1;
  min-height: 0;
  margin: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(135deg, rgba(230, 237, 243, 0.022) 0 8px, transparent 8px 16px);
  color: var(--text-secondary);
  text-align: center;
}

.reserved__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent-gradient);
  opacity: 0.5;
  animation: glowPulse 3.2s ease-out infinite;
}

.reserved__text {
  font-size: 11.5px;
  letter-spacing: 0.16em;
}

/* ---------- 快捷指令按钮（上/下/左/右/打怪攻击/打怪技能1/自定义×2） ---------- */
#action-buttons.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 16px 12px;
}
#action-buttons .action-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  padding: 9px 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 220, 0.22);
  background: linear-gradient(180deg, rgba(120, 170, 220, 0.10), rgba(120, 170, 220, 0.03) 60%, rgba(10, 15, 22, 0.4));
  color: #cfe3f5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.24s ease, transform 0.14s ease, background 0.2s ease;
}
#action-buttons .action-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
#action-buttons .action-btn:hover {
  border-color: rgba(120, 180, 255, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(88, 166, 255, 0.18), 0 6px 16px rgba(0, 0, 0, 0.35);
}
#action-buttons .action-btn:active {
  transform: scale(0.95);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}
#action-buttons .action-btn__icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.95;
  filter: drop-shadow(0 0 5px rgba(88, 166, 255, 0.45));
}

/* 方向键（上/下/左/右）：青色箭头 */
#action-buttons .action-btn[data-quick="上"] .action-btn__icon,
#action-buttons .action-btn[data-quick="下"] .action-btn__icon,
#action-buttons .action-btn[data-quick="左"] .action-btn__icon,
#action-buttons .action-btn[data-quick="右"] .action-btn__icon {
  color: #58e0ff;
  filter: drop-shadow(0 0 5px rgba(88, 224, 255, 0.5));
}

/* 打怪攻击 / 打怪技能1：红色战斗渐变 */
#action-buttons .action-btn--hot {
  border-color: rgba(255, 110, 110, 0.35);
  background: linear-gradient(180deg, rgba(255, 110, 110, 0.16), rgba(255, 110, 110, 0.04) 60%, rgba(10, 15, 22, 0.4));
  color: #ffb3b3;
}
#action-buttons .action-btn--hot .action-btn__icon {
  color: #ff7d7d;
  filter: drop-shadow(0 0 6px rgba(255, 110, 110, 0.55));
}
#action-buttons .action-btn--hot:hover {
  border-color: rgba(255, 110, 110, 0.65);
  box-shadow: 0 0 14px rgba(255, 110, 110, 0.22), 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* 自定义按钮：紫色虚线，设置后转实线 */
#action-buttons .action-btn--custom {
  border-style: dashed;
  border-color: rgba(180, 140, 255, 0.35);
  background: linear-gradient(180deg, rgba(180, 140, 255, 0.10), rgba(180, 140, 255, 0.03) 60%, rgba(10, 15, 22, 0.4));
  color: #d9c8ff;
}
#action-buttons .action-btn--custom .action-btn__icon {
  color: #b98aff;
  filter: drop-shadow(0 0 5px rgba(180, 140, 255, 0.5));
}
#action-buttons .action-btn--custom:hover {
  border-color: rgba(180, 140, 255, 0.7);
  box-shadow: 0 0 14px rgba(180, 140, 255, 0.2), 0 6px 16px rgba(0, 0, 0, 0.35);
}
#action-buttons .action-btn--custom.is-set {
  border-style: solid;
  border-color: rgba(180, 140, 255, 0.55);
  color: #e8dcff;
}
#action-buttons .action-btn--custom .action-btn__text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 9.5 顶部系统通知 toast（Task 10: ChatUI.showSystemNotification） ---------- */
.toast {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  max-width: 78%;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.9);
  animation: fadeInUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
}
.toast--warn  { border-left-color: #d29922; }
.toast--error { border-left-color: #f85149; }
.toast--out   { opacity: 0; transition: opacity 0.3s ease; }

/* ---------- 10. 动画 ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translate3d(-14px, 10px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translate3d(14px, 10px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes glowPulse {
  0%   { opacity: 0.85; transform: scale(1); box-shadow: 0 0 0 0 currentColor; }
  70%  { opacity: 0.25; transform: scale(1.35); box-shadow: 0 0 0 6px transparent; }
  100% { opacity: 0.85; transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 768px) {
  #app {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  #panel-profile { display: none; }

  #panel-chat {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding-bottom: 114px; /* 给底部按钮条（一排高度 + 内边距）留空间 */
  }

  .message-bubble { max-width: 86%; }

    /* 手机输入区：高度由 116px 压小约 1/3 */
  :root { --input-h: 78px; }
  #input-area { padding: 8px 10px 10px; gap: 8px; }
  #message-input { padding: 8px 10px; font-size: 13px; }
  #send-button {
    width: 110px;
    font-size: 15px;
    padding: 6px 12px;
  }
  #send-button .send-button__arrow { font-size: 16px; }

  /* ---------- 手机专属公告条（仅窄屏显示） ---------- */
  .announcement-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 6px 12px;
    background: rgba(88, 166, 255, 0.10);
    border-bottom: 1px solid rgba(88, 166, 255, 0.16);
    font-size: 12px;
    line-height: 1.4;
  }
  .announcement-bar__label {
    flex: 0 0 auto;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--accent);
    color: #0a0f16;
    font-weight: 700;
    font-size: 11px;
  }
  .announcement-bar__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
  }

  /* ---------- 手机端按钮区：右侧栏变为底部固定按钮条 ---------- */
  #panel-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: 100vw;             /* 强制铺满 viewport（width:auto 在某些浏览器+fixed 下不稳） */
    max-width: 100vw;
    box-sizing: border-box;   /* padding 不撑破 */
    height: auto;
    padding: 8px 10px 10px;
    border-radius: 14px 14px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    background: rgba(10, 15, 22, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
    transform: none;          /* 防祖先 transform 把 fixed 限制到非视口 */
  }
  #panel-actions .panel__head,
  #panel-actions .panel__foot { display: none; }
  /* 手机状态条：SAO + ID + 在线人数 + 玩家列表（输入框与按钮区之间） */
  .mobile-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 4px 7px;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(230, 237, 243, 0.08);
  }
  .mobile-status b {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
  }
  .mobile-status__brand {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .mobile-status__item--id {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .player-list-btn--mini {
    flex: 0 0 auto;
    padding: 3px 8px;
    font-size: 10px;
  }
  /* 手机底部按钮条：固定一排高度（约 4 列），超出部分垂直滑动查看 */
  /* 注意：选择器必须用 #action-buttons.action-grid（与桌面基础规则同特异性覆盖 display:grid）；
     flex:none 必须加——旧规则 #action-buttons{flex:1} 的 flex-basis:0% 优先于 height，会把容器撑满 */
  #action-buttons.action-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center; /* 行内居中：按钮不满一行时也居中，左右对称 */
    gap: 6px;
    width: 100%;
    height: 52px;         /* 只显示一排按钮 */
    flex: none;           /* 覆盖旧规则 flex:1，锁死容器高度 */
    margin: 0;            /* 覆盖旧规则 margin:14px（否则左 24px 空白、右侧溢出） */
    overflow-y: auto;     /* 上下滑动查看更多 */
    overflow-x: hidden;
    padding: 0 2px;
    align-content: flex-start;
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 166, 255, 0.45) transparent;
  }
  #action-buttons::-webkit-scrollbar {
    width: 3px;
  }
  #action-buttons::-webkit-scrollbar-thumb {
    background: rgba(88, 166, 255, 0.45);
    border-radius: 3px;
  }
  #action-buttons.action-grid .action-btn {
    flex: 1 1 calc(25% - 4.5px); /* 一排固定 4 个：4×(25%-4.5)+3×6gap=100% 铺满，第5个换行 */
    width: auto;
    min-width: 0;
    height: 46px;
    padding: 4px 2px;
    gap: 1px;
  }
  #action-buttons .action-btn__icon {
    font-size: 13px;
  }
  #action-buttons.action-grid .action-btn > span:not(.action-btn__icon) {
    font-size: 11px;
  }
}

/* ---------- 12. 无障碍偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .panel { opacity: 1; }
}

/* ---------- 13. 登录 / 注册 / 游客视图 ---------- */
.auth-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card {
  width: min(360px, 92vw);
  padding: 30px 26px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(24, 29, 36, 0.96), rgba(13, 17, 23, 0.96));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.auth-card__logo {
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}
.auth-card__logo span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5em;
  color: var(--text-secondary);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field > span {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}
.auth-field input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.75);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.auth-btn {
  padding: 11px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.12s;
}
.auth-btn:active { transform: scale(0.98); }
.auth-btn--primary {
  background: var(--accent-gradient);
  color: #04121c;
}
.auth-btn--primary:hover { opacity: 0.9; }
.auth-btn--ghost {
  background: rgba(230, 237, 243, 0.06);
  color: var(--text-primary);
  border-color: var(--border);
  font-size: 13px;
  letter-spacing: 0.1em;
}
.auth-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.auth-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.auth-link:hover { text-decoration: underline; }
.auth-server-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-server-panel[hidden] { display: none; }
.auth-server-panel__actions { display: flex; gap: 8px; }
.auth-server-panel__actions .auth-btn { flex: 1; padding: 9px 0; font-size: 13px; }
.auth-link--dim {
  display: block;
  margin: 0 auto;
  color: var(--text-secondary);
  opacity: 0.75;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.auth-tip {
  min-height: 16px;
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.auth-tip.is-error { color: #ff9a9a; }
.auth-tip.is-ok { color: #7ee787; }

/* 游客模式：主界面顶部只读提示条 */
.guest-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: #ffc36a;
  background: rgba(255, 195, 106, 0.10);
  border-bottom: 1px solid rgba(255, 195, 106, 0.18);
}
body.is-guest .guest-banner { display: flex; }

/* 超管后台：宽面板 + 搜索框 + 总数 */
.player-modal__panel--wide { width: min(480px, 94vw); }
.admin-panel__total {
  margin-left: 10px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.admin-panel__search {
  display: flex;
  gap: 6px;
  padding: 10px 12px 4px;
}
.admin-panel__search input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.75);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.admin-panel__search input:focus { border-color: var(--accent); }

/* 禁言提示条：输入框上方，显示剩余时间（每秒刷新） */
.muted-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 8px;
  border-radius: 9px;
  font-size: 12.5px;
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 110, 110, 0.35);
  color: #ffb3b3;
}
.muted-banner[hidden] { display: none; }
.muted-banner__label { font-weight: 600; letter-spacing: 0.06em; }
.muted-countdown {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ff6b6b;
}

/* ---------- 14. APP 端专属界面（body.is-app 由 Capacitor 环境注入，网页端不受影响） ---------- */
/* 1. 隐藏公共频道旁边的 #general 字母 */
body.is-app #chat-chan { display: none; }

/* 2. 状态条移到聊天区顶部：Sword Art Online | ID | 玩家·游客 | 列表 从左到右 */
body.is-app .mobile-status {
  position: static;               /* 覆盖底部的 fixed 容器内样式 */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 9px 12px;
  font-size: 12px;
  letter-spacing: 0.03em;
  background: rgba(88, 166, 255, 0.07);
  border-bottom: 1px solid rgba(88, 166, 255, 0.15);
}
body.is-app .mobile-status__brand {
  flex: 0 0 auto;
  font-size: 13px;
}
body.is-app .mobile-status__item,
body.is-app .mobile-status__item--id {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.is-app .mobile-status__item--id { color: var(--text-primary); }
body.is-app .mobile-status__nick {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
body.is-app .mobile-status__nick:hover { text-decoration: underline; }
.mobile-nick-input {
  width: 72px;
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid rgba(0, 212, 255, 0.5);
  background: #0a0f16;
  color: #fff;
  outline: none;
}
body.is-app .player-list-btn--mini { margin-left: auto; }

/* 3. 公告条加高：标签竖排在左，内容多行显示在右，可滚动看完 */
body.is-app .announcement-bar {
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  max-height: 136px;
  overflow-y: auto;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 166, 255, 0.45) transparent;
}
body.is-app .announcement-bar__label {
  flex: 0 0 auto;
  writing-mode: vertical-rl;   /* 「公告」两字竖排，不再独占一行 */
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3em;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 2px;
  background: var(--accent);
  color: #0a0f16;
  border-radius: 4px;
}
body.is-app .announcement-bar__text {
  white-space: normal;     /* 允许换行 */
  overflow: visible;
  text-overflow: clip;
  line-height: 1.5;
  word-break: break-word;
  align-self: center;
}

/* 标题框内品牌字母：蓝色渐变 + 字号略小（恢复 SAO 渐变文字） */
body.is-app #chat-title-text {
  font-size: 14px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 底部按钮条区域：状态条移除后按钮条仅71px高，padding 收紧到71px消除空白 */
body.is-app #panel-chat { padding-bottom: 71px; }

/* 玩家列表：端标签（浏览器端/APP端） */
.player-modal__platform {
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.5;
  background: rgba(88, 166, 255, 0.12);
  color: #6fb6ff;
  border: 1px solid rgba(88, 166, 255, 0.3);
}
.player-modal__platform--app {
  background: rgba(124, 58, 237, 0.14);
  color: #b79aff;
  border-color: rgba(124, 58, 237, 0.4);
}

/* APP 端标题框间距减小 */
body.is-app #chat-header {
  padding: 9px 14px;
  gap: 8px;
}
