/* 聊天页的欢迎状态（还没发消息时）：和登录页同一套流光 + 网格背景、毛玻璃建议卡片、输入框聚焦发光 */
.chat-bg {
  --cb-orb: .5; --cb-grid: rgba(30, 30, 60, 0.055);
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .5s ease;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chat-bg { --cb-orb: .42; --cb-grid: rgba(255, 255, 255, 0.045); } }
:root[data-theme="dark"] .chat-bg { --cb-orb: .42; --cb-grid: rgba(255, 255, 255, 0.045); }
.main.empty .chat-bg { opacity: 1; }
/* 背景放在 .main 自己的层里（z-index: -1），不要给顶栏 / 消息区 / 输入框设 z-index：
   那样会把模型菜单、设置面板这些弹层关在里面，被别的区域盖住（v0.9.11 出过这个问题） */
.main { isolation: isolate; }
.chat-bg .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: var(--cb-orb); }
.chat-bg .o1 { width: 60vmax; height: 60vmax; left: -22vmax; top: -26vmax; background: radial-gradient(circle, #ff7a2f, transparent 65%); animation: drift1 24s ease-in-out infinite alternate; }
.chat-bg .o2 { width: 50vmax; height: 50vmax; right: -22vmax; top: 8vmax; background: radial-gradient(circle, #8b5cf6, transparent 65%); animation: drift2 28s ease-in-out infinite alternate; }
.chat-bg .o3 { width: 44vmax; height: 44vmax; left: 20%; bottom: -28vmax; background: radial-gradient(circle, #22d3ee, transparent 65%); opacity: calc(var(--cb-orb) * .7); animation: drift3 32s ease-in-out infinite alternate; }
.chat-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--cb-grid) 1px, transparent 1px), linear-gradient(90deg, var(--cb-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 38%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 38%, #000 25%, transparent 72%);
}
/* 欢迎态下底部渐隐不要盖住背景 */
.main.empty .composer-wrap::before { display: none; }

/* 欢迎页：有每天次数限制时的提示 */
.quota-tip { margin-top: 4px; padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); background: color-mix(in srgb, var(--panel) 70%, transparent); border: 1px solid var(--border); }
.quota-tip b { color: var(--accent); }
.quota-tip.out { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }

/* 欢迎页：项目名 + 版本号 */
.brand-tag { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--muted); }
.brand-tag span {
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; letter-spacing: .3px; color: #fff;
  background: linear-gradient(100deg, #ff7a2f, #ff4f81 55%, #8b5cf6); box-shadow: 0 4px 12px -4px rgba(255, 79, 129, .55);
}
.brand .ver { margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); line-height: 17px; }

/* 建议卡片：毛玻璃 + 渐变小图标 + 右上角箭头 */
.main.empty .sg {
  position: relative; padding-right: 30px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
}
.sg::after { content: "↗"; position: absolute; top: 11px; right: 12px; font-size: 13px; color: var(--faint); transition: transform .2s, color .2s; }
.sg:hover::after { transform: translate(2px, -2px); color: var(--accent); }
.sg b::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 2px;
  background: linear-gradient(135deg, #ff7a2f, #8b5cf6); box-shadow: 0 0 8px rgba(255, 79, 129, .6);
}

/* 「换一批」 */
.suggest.swap .sg { animation: rise .3s ease both; }
.suggest.swap .sg:nth-child(2) { animation-delay: .04s; }
.suggest.swap .sg:nth-child(3) { animation-delay: .08s; }
.suggest.swap .sg:nth-child(4) { animation-delay: .12s; }
.sg-more {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px;
  color: var(--muted); background: color-mix(in srgb, var(--panel) 60%, transparent); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: color .15s, border-color .15s;
}
.sg-more:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.sg-more:active svg { transform: rotate(-180deg); }
.sg-more svg { transition: transform .35s; }

/* 输入框：聚焦时渐变光晕 */
.composer:focus-within {
  border-color: color-mix(in srgb, #8b5cf6 45%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, #8b5cf6 12%, transparent), 0 14px 36px -14px rgba(139, 92, 246, .45);
}
.main.empty .composer { background: color-mix(in srgb, var(--panel) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

@media (max-width: 820px) {
  .welcome h1 { font-size: 25px; }
  .chat-bg .grid { background-size: 30px 30px; }
}
@media (prefers-reduced-motion: reduce) { .chat-bg .orb { animation: none; } }
