/* ============================================
   超级炫酷AI聊天平台UI - 赛博朋克风格
   设计风格：深色霓虹 + 玻璃拟态 + 完美移动端适配
   ============================================ */

:root{
  /* 主色调 - 霓虹紫蓝 */
  --neon-purple: #a855f7;
  --neon-blue: #3b82f6;
  --neon-pink: #ec4899;
  --neon-cyan: #06b6d4;
  --neon-green: #10b981;
  
  --primary: #a855f7;
  --primary-light: #c084fc;
  --primary-dark: #9333ea;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --primary-gradient-hover: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f472b6 100%);
  
  /* 背景色 - 深色主题 */
  --bg: #0f0f1a;
  --bg-gradient: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
  --panel: rgba(30, 30, 50, 0.85);
  --panel-soft: rgba(40, 40, 70, 0.6);
  --side: #0a0a14;
  --side-gradient: linear-gradient(180deg, #0a0a14 0%, #121225 50%, #1a1a35 100%);
  
  /* 文字色 */
  --text: #f1f5f9;
  --text-light: #cbd5e1;
  --text-lighter: #94a3b8;
  --muted: #64748b;
  
  /* 边框和分割线 */
  --line: rgba(148, 163, 184, 0.15);
  --line-light: rgba(148, 163, 184, 0.08);
  --line-strong: rgba(148, 163, 184, 0.25);
  
  /* 强调色 */
  --accent: #a855f7;
  --accent-hover: #c084fc;
  --accent-soft: rgba(168, 85, 247, 0.15);
  --accent-glow: rgba(168, 85, 247, 0.4);
  
  /* 状态色 */
  --success: #10b981;
  --success-light: #34d399;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.15);
  
  /* 代码块 */
  --code-bg: #0a0a12;
  --code-text: #e2e8f0;
  
  /* 阴影和发光 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.5), 0 0 60px rgba(59, 130, 246, 0.3);
  --shadow-glow-sm: 0 0 15px rgba(168, 85, 247, 0.4);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* 过渡 */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浅色主题覆盖 */
[data-theme=light]{
  --bg: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 50%, #f0e8ff 100%);
  --panel: rgba(255, 255, 255, 0.95);
  --panel-soft: rgba(248, 250, 252, 0.9);
  --side: #1e1b4b;
  --side-gradient: linear-gradient(180deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  --text: #1e293b;
  --text-light: #475569;
  --text-lighter: #64748b;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.2);
  --line-light: rgba(148, 163, 184, 0.1);
  --line-strong: rgba(148, 163, 184, 0.3);
  --accent-soft: rgba(168, 85, 247, 0.1);
  --code-bg: #1e293b;
}

/* 全局重置 */
*{box-sizing:border-box}
html,body{
  margin:0;
  min-height:100%;
  font-family:'Inter','Segoe UI','Microsoft YaHei','PingFang SC',sans-serif;
  color:var(--text);
  background:var(--bg-gradient);
  letter-spacing:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
body{
  font-size:15px;
  line-height:1.6;
  position:relative;
  overflow-x:hidden;
}

/* 背景动画效果 */
body::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  pointer-events:none;
  z-index:0;
}

button,input,textarea,select{font:inherit;color:inherit}
button,a{cursor:pointer}
button{transition:var(--transition)}
button:active{transform:translateY(1px)}
a{color:var(--primary-light);text-decoration:none;transition:var(--transition)}
a:hover{color:var(--primary)}

/* 输入框样式 */
input,textarea,select{
  width:100%;
  border:1.5px solid var(--line);
  background:var(--panel);
  border-radius:var(--radius);
  padding:12px 16px;
  outline:none;
  transition:var(--transition);
  font-size:14px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:var(--text);
}
input:focus,textarea:focus,select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--accent-glow), 0 0 20px rgba(168, 85, 247, 0.2);
}
textarea{line-height:1.7;resize:vertical}
select{
  cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:18px;
  appearance:none;
  -webkit-appearance:none;
  padding-right:40px;
}

small,.muted{color:var(--muted)}

/* 按钮样式 */
.primary,.new-chat{
  border:0;
  background:var(--primary-gradient);
  background-size:200% 200%;
  color:#fff;
  border-radius:var(--radius);
  padding:12px 20px;
  font-weight:600;
  box-shadow:var(--shadow-md), var(--shadow-glow-sm);
  transition:var(--transition);
  position:relative;
  overflow:hidden;
}
.primary:hover,.new-chat:hover{
  background:var(--primary-gradient-hover);
  background-size:200% 200%;
  box-shadow:var(--shadow-lg), var(--shadow-glow);
  transform:translateY(-2px) scale(1.02);
}
.primary:active,.new-chat:active{
  transform:translateY(0) scale(0.98);
}

.button{display:inline-flex;align-items:center;justify-content:center}

/* ============================================
   主布局
   ============================================ */
.app{
  height:100vh;
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  overflow:hidden;
  background:var(--bg-gradient);
  position:relative;
}

/* ============================================
   侧边栏
   ============================================ */
.app aside{
  background:var(--side-gradient);
  border-right:1px solid var(--line);
  padding:20px 14px 16px;
  display:flex;
  flex-direction:column;
  min-width:0;
  position:relative;
  overflow:hidden;
  z-index:1;
}

/* 侧边栏发光边框 */
.app aside::before{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:1px;
  height:100%;
  background:linear-gradient(180deg, transparent, var(--neon-purple), var(--neon-pink), var(--neon-purple), transparent);
  box-shadow:0 0 10px var(--neon-purple);
}

/* 侧边栏背景装饰 */
.app aside::after{
  content:"";
  position:absolute;
  top:-50%;
  left:-50%;
  width:200%;
  height:200%;
  background:
    radial-gradient(circle at 30% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%);
  pointer-events:none;
}

/* 品牌Logo */
.brand{
  height:44px;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:17px;
  color:#fff;
  position:relative;
  z-index:1;
  padding:0 6px;
}
.brand b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:700;
  background:linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #f9a8d4 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.logo,.message-icon{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:var(--radius);
  background:var(--primary-gradient);
  background-size:200% 200%;
  color:#fff;
  font-weight:800;
  box-shadow:0 0 15px rgba(168, 85, 247, 0.4), 0 4px 12px rgba(0,0,0,0.3);
}

/* 登录注册按钮 */
.sidebar-auth{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:20px 0 10px;
  position:relative;
  z-index:1;
}
.sidebar-auth button{
  height:40px;
  border:1.5px solid rgba(168, 85, 247, 0.3);
  border-radius:var(--radius);
  background:rgba(168, 85, 247, 0.1);
  color:#e9d5ff;
  font-weight:600;
  backdrop-filter:blur(10px);
  transition:var(--transition);
}
.sidebar-auth button:hover{
  background:rgba(168, 85, 247, 0.2);
  border-color:rgba(168, 85, 247, 0.5);
  box-shadow:0 0 12px rgba(168, 85, 247, 0.3);
}
.sidebar-auth .sidebar-register{
  border-color:transparent;
  background:linear-gradient(135deg, #10b981 0%, #059669 100%);
  color:#fff;
  box-shadow:0 0 15px rgba(16, 185, 129, 0.35);
}
.sidebar-auth .sidebar-register:hover{
  background:linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow:0 0 20px rgba(16, 185, 129, 0.5);
}

/* 新建对话按钮 */
.new-chat{
  width:100%;
  margin:14px 0 14px;
  text-align:left;
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
  z-index:1;
  height:44px;
}
.new-chat::before{
  content:"+";
  font-size:20px;
  font-weight:300;
  line-height:1;
}

/* 搜索框 */
.search{
  height:42px;
  background:rgba(255,255,255,0.05);
  border:1.5px solid rgba(168, 85, 247, 0.2);
  color:#fff;
  border-radius:var(--radius);
  position:relative;
  z-index:1;
  backdrop-filter:blur(10px);
}
.search::placeholder{color:rgba(203, 213, 225, 0.5)}
.search:focus{
  background:rgba(255,255,255,0.08);
  border-color:rgba(168, 85, 247, 0.5);
  box-shadow:0 0 0 3px rgba(168, 85, 247, 0.2), 0 0 15px rgba(168, 85, 247, 0.2);
}

/* 历史记录导航 */
nav{
  flex:1;
  overflow-y:auto;
  margin-top:14px;
  padding-right:4px;
  position:relative;
  z-index:1;
  scrollbar-width:thin;
  scrollbar-color:rgba(168, 85, 247, 0.3) transparent;
}
nav::-webkit-scrollbar{width:4px}
nav::-webkit-scrollbar-track{background:transparent}
nav::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, var(--neon-purple), var(--neon-pink));
  border-radius:2px;
}

.history-wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 28px;
  align-items:center;
  margin:3px 0;
  border-radius:var(--radius-sm);
  transition:var(--transition);
}
.history-wrap:hover{
  background:rgba(168, 85, 247, 0.1);
}
.history-item{
  min-width:0;
  width:100%;
  border:0;
  background:transparent;
  padding:10px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  text-align:left;
  color:rgba(226, 232, 240, 0.75);
  border-radius:var(--radius-sm);
  transition:var(--transition);
  font-size:14px;
}
.history-item span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.history-item small{
  font-size:11px;
  color:rgba(148, 163, 184, 0.6);
}
.history-item.active{
  background:linear-gradient(90deg, rgba(168, 85, 247, 0.25) 0%, rgba(168, 85, 247, 0.1) 100%);
  color:#fff;
  box-shadow:inset 3px 0 0 var(--neon-purple);
}

.conversation-menu{
  width:28px;
  height:28px;
  border:0;
  background:transparent;
  color:rgba(148, 163, 184, 0.6);
  border-radius:var(--radius-sm);
  transition:var(--transition);
}
.conversation-menu:hover{
  background:rgba(168, 85, 247, 0.2);
  color:#fff;
}

/* 侧边栏底部 */
.side-foot{
  display:grid;
  gap:6px;
  padding:14px 4px 2px;
  border-top:1px solid rgba(168, 85, 247, 0.15);
  position:relative;
  z-index:1;
}
.side-foot>a,.side-foot>.link{
  display:flex;
  align-items:center;
  min-height:34px;
  padding:7px 10px;
  border-radius:var(--radius-sm);
  color:rgba(203, 213, 225, 0.7);
  font-size:13px;
  text-align:left;
  transition:var(--transition);
}
.side-foot>a:hover,.side-foot>.link:hover{
  background:rgba(168, 85, 247, 0.15);
  color:#fff;
}
.side-foot .primary{
  color:#fff;
  justify-content:center;
}

/* 用户信息行 */
.user-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:5px 6px 12px;
}
.user-row>div{
  min-width:0;
  display:grid;
}
.user-row b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
  font-size:14px;
  font-weight:600;
}
.user-row small{
  font-size:11px;
  color:rgba(148, 163, 184, 0.7);
}

.avatar{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  background:linear-gradient(135deg, #10b981 0%, #059669 100%);
  color:#fff;
  font-weight:700;
  box-shadow:0 0 12px rgba(16, 185, 129, 0.35);
}

.link,.head-actions button,.mobile-menu{
  border:0;
  background:transparent;
}

/* ============================================
   主内容区
   ============================================ */
.app>main{
  height:100vh;
  min-width:0;
  display:flex;
  flex-direction:column;
  position:relative;
  background:transparent;
  z-index:1;
}

/* 顶部导航栏 - 玻璃拟态 */
.app>main>header{
  height:60px;
  flex:0 0 60px;
  padding:0 24px;
  border-bottom:1px solid var(--line);
  background:var(--panel);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:10;
  position:sticky;
  top:0;
}

.app>main>header select{
  width:auto;
  min-width:130px;
  padding:8px 36px 8px 12px;
  background:var(--panel-soft);
  border-color:var(--line);
  font-size:14px;
  font-weight:500;
  color:var(--text);
}

.head-actions{
  display:flex;
  align-items:center;
  gap:6px;
}
.head-actions>button{
  height:38px;
  min-width:38px;
  border-radius:var(--radius);
  color:var(--text-light);
  transition:var(--transition);
  font-size:16px;
}
.head-actions>button:hover{
  background:var(--accent-soft);
  color:var(--primary-light);
}

.server-mobile-login,.static-mobile-close,.mobile-menu{display:none}

/* ============================================
   欢迎页面
   ============================================ */
#welcome{
  margin:auto;
  width:min(760px,100%);
  padding:50px 32px 200px;
  text-align:center;
  position:relative;
}

#welcome::before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:400px;
  height:400px;
  background:radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  pointer-events:none;
}

.hero-mark{
  display:inline-grid;
  place-items:center;
  width:64px;
  height:64px;
  border-radius:var(--radius-lg);
  background:var(--primary-gradient);
  background-size:200% 200%;
  color:#fff;
  font-size:28px;
  font-weight:800;
  box-shadow:var(--shadow-glow-sm), 0 0 40px rgba(168, 85, 247, 0.3);
  position:relative;
  z-index:1;
}

#welcome h1{
  margin:24px 0 12px;
  font-size:32px;
  line-height:1.2;
  font-weight:800;
  background:linear-gradient(135deg, #fff 0%, #c4b5fd 30%, #f9a8d4 60%, #93c5fd 100%);
  background-size:200% 200%;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  position:relative;
  z-index:1;
}
#welcome p{
  margin:0;
  color:var(--text-light);
  line-height:1.75;
  font-size:15px;
  max-width:480px;
  margin-left:auto;
  margin-right:auto;
  position:relative;
  z-index:1;
}

/* 快捷提示按钮 */
.suggestions{
  margin-top:36px;
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px;
  max-width:560px;
  margin-left:auto;
  margin-right:auto;
  position:relative;
  z-index:1;
}
.suggestions button{
  border:1.5px solid var(--line);
  background:var(--panel);
  backdrop-filter:blur(10px);
  padding:16px 20px;
  border-radius:var(--radius-md);
  color:var(--text);
  text-align:left;
  font-weight:500;
  transition:var(--transition);
  box-shadow:var(--shadow-sm);
  position:relative;
  overflow:hidden;
  font-size:14px;
}
.suggestions button:hover{
  border-color:var(--primary);
  background:var(--accent-soft);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md), 0 0 20px rgba(168, 85, 247, 0.15);
}

/* ============================================
   消息区域
   ============================================ */
#messages{
  width:min(900px,100%);
  margin:0 auto;
  padding:28px 24px 220px;
  overflow-y:auto;
  scroll-behavior:smooth;
}

.message{
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:14px;
  margin-bottom:28px;
  animation:fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp{
  from{opacity:0;transform:translateY(15px)}
  to{opacity:1;transform:translateY(0)}
}

.message.user .message-icon{
  background:linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color:#fff;
  box-shadow:0 0 15px rgba(59, 130, 246, 0.35);
}

.bubble{
  min-width:0;
  padding-top:2px;
}
.message-meta{
  min-height:26px;
  display:flex;
  align-items:center;
  font-size:14px;
  font-weight:700;
  margin-bottom:6px;
  color:var(--text-light);
}
.content{
  line-height:1.8;
  overflow-wrap:anywhere;
  color:var(--text);
  font-size:15px;
}

/* 徽章 */
.badge{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  border:1px solid var(--line);
  border-radius:var(--radius-full);
  padding:3px 10px;
  color:var(--muted);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.badge.official{
  border-color:var(--success);
  background:var(--success-soft);
  color:var(--success-light);
  box-shadow:0 0 8px rgba(16, 185, 129, 0.25);
}

/* 工具按钮 */
.tools{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line-light);
}
.tools button{
  height:30px;
  min-width:30px;
  padding:4px 10px;
  border:1px solid transparent;
  background:transparent;
  border-radius:var(--radius-sm);
  color:var(--text-lighter);
  font-size:12px;
  transition:var(--transition);
}
.tools button:hover{
  border-color:var(--line);
  background:var(--panel);
  color:var(--text);
}
.tools button.action-done{
  background:var(--accent-soft);
  color:var(--primary-light);
  border-color:var(--primary);
}

/* 代码块 */
.content pre{
  position:relative;
  margin:16px 0;
  background:var(--code-bg);
  color:var(--code-text);
  border-radius:var(--radius-md);
  padding:48px 18px 18px;
  overflow:auto;
  line-height:1.6;
  box-shadow:var(--shadow-md);
  border:1px solid var(--line);
}

.content pre::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:38px;
  background:linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-radius:var(--radius-md) var(--radius-md) 0 0;
  border-bottom:1px solid var(--line);
}

.content pre::after{
  content:"● ● ●";
  position:absolute;
  top:13px;
  left:16px;
  font-size:10px;
  letter-spacing:4px;
  color:#ef4444;
  text-shadow:16px 0 0 #f59e0b, 32px 0 0 #10b981;
}

.copy-code{
  position:absolute;
  right:12px;
  top:7px;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.1);
  color:rgba(255,255,255,0.7);
  border-radius:var(--radius-sm);
  padding:5px 12px;
  font-size:11px;
  transition:var(--transition);
  z-index:1;
}
.copy-code:hover{
  background:rgba(168, 85, 247, 0.3);
  color:#fff;
  border-color:var(--primary);
}

/* 代码高亮 */
.syntax-keyword{color:#c084fc}
.syntax-string{color:#34d399}
.syntax-function{color:#60a5fa}
.syntax-comment{color:#6b7280}
.syntax-number{color:#fbbf24}

/* ============================================
   输入区域
   ============================================ */
.composer{
  position:fixed;
  z-index:20;
  left:280px;
  right:0;
  bottom:0;
  padding:18px max(24px,calc((100% - 1124px)/2));
  background:linear-gradient(to bottom,transparent 0%, var(--bg) 35%, var(--bg) 100%);
}

.composer textarea{
  display:block;
  min-height:72px;
  max-height:200px;
  resize:vertical;
  padding:16px 18px;
  background:var(--panel);
  border:2px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg), 0 0 30px rgba(168, 85, 247, 0.1);
  font-size:15px;
  transition:var(--transition);
  backdrop-filter:blur(20px);
  color:var(--text);
}
.composer textarea:focus{
  border-color:var(--primary);
  box-shadow:var(--shadow-xl), 0 0 40px rgba(168, 85, 247, 0.2);
}

.compose-row{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.compose-row>span{
  text-align:center;
  color:var(--muted);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.attach-button{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  background:var(--panel);
  cursor:pointer;
  transition:var(--transition);
  font-size:18px;
  backdrop-filter:blur(10px);
}
.attach-button:hover{
  border-color:var(--primary);
  background:var(--accent-soft);
  color:var(--primary-light);
  transform:scale(1.05);
  box-shadow:0 0 15px rgba(168, 85, 247, 0.25);
}

.send{
  width:44px;
  height:44px;
  border:0!important;
  border-radius:var(--radius)!important;
  background:var(--primary-gradient)!important;
  background-size:200% 200%!important;
  color:#fff;
  font-size:20px;
  box-shadow:var(--shadow-md), var(--shadow-glow-sm)!important;
  transition:var(--transition)!important;
}
.send:hover{
  background:var(--primary-gradient-hover)!important;
  background-size:200% 200%!important;
  box-shadow:var(--shadow-lg), var(--shadow-glow)!important;
  transform:scale(1.05)!important;
}
.send:active{
  transform:scale(0.95)!important;
}

/* 附件列表 */
#attachment-list{
  min-height:0;
  margin-bottom:8px;
}
.attachment-chip,.uploading{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0 8px 8px 0;
  border:1.5px solid var(--line);
  background:var(--panel);
  border-radius:var(--radius);
  padding:8px 12px;
  color:var(--text-light);
  font-size:12px;
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(10px);
}
.attachment-chip button{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:0 4px;
  font-size:14px;
  transition:var(--transition);
}
.attachment-chip button:hover{
  color:var(--danger-light);
}

.empty{
  padding:32px;
  text-align:center;
  color:var(--muted);
}

/* ============================================
   弹窗对话框 - 重点修复登录注册
   ============================================ */
dialog{
  width:min(440px, calc(100% - 32px));
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  padding:28px;
  background:var(--panel);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  box-shadow:var(--shadow-xl), 0 0 50px rgba(168, 85, 247, 0.15);
  color:var(--text);
  margin:auto;
  max-height:90vh;
  overflow-y:auto;
}

dialog::backdrop{
  background:rgba(0, 0, 0, 0.7);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
dialog h2{
  margin:4px 0 24px;
  font-size:22px;
  font-weight:700;
  background:linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  padding-right:40px;
}

.close{
  position:absolute;
  top:16px;
  right:16px;
  width:36px;
  height:36px;
  border:0;
  border-radius:var(--radius);
  background:transparent;
  color:var(--muted);
  font-size:24px;
  transition:var(--transition);
  display:grid;
  place-items:center;
  float:none;
}
.close:hover{
  background:var(--danger-soft);
  color:var(--danger-light);
}

/* 标签页 - 登录注册切换 */
.tabs{
  display:flex;
  margin-bottom:24px;
  border-bottom:2px solid var(--line-light);
  gap:4px;
  position:relative;
}
.tabs button{
  flex:1;
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  padding:12px 8px;
  color:var(--muted);
  font-weight:500;
  margin-bottom:-2px;
  transition:var(--transition);
  border-radius:var(--radius-sm) var(--radius-sm) 0 0;
  font-size:14px;
  white-space:nowrap;
}
.tabs button.active{
  border-bottom-color:var(--primary);
  color:var(--primary-light);
  font-weight:600;
  background:var(--accent-soft);
}

/* 表单 - 登录注册 */
dialog form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

dialog label{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--text-light);
  font-size:13px;
  font-weight:600;
}

dialog input{
  width:100%;
  min-height:44px;
}

/* 注册专用 - 昵称输入框 */
.register-only{
  display:none;
}

/* 验证码行 */
.code-row{
  display:none;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:end;
}
.code-row button{
  height:44px;
  border:1.5px solid var(--line);
  background:var(--panel-soft);
  border-radius:var(--radius);
  padding:0 16px;
  font-weight:500;
  transition:var(--transition);
  white-space:nowrap;
  font-size:13px;
  min-width:100px;
}
.code-row button:hover{
  border-color:var(--primary);
  color:var(--primary-light);
  background:var(--accent-soft);
}

/* 提交按钮 */
dialog .primary{
  width:100%;
  min-height:46px;
  font-size:15px;
  margin-top:4px;
}

/* 错误提示 */
.error,.alert,.danger{color:var(--danger-light)}
.error{
  margin:0;
  font-size:13px;
  min-height:18px;
}
.alert{
  padding:12px 16px;
  border:1px solid var(--danger);
  border-radius:var(--radius);
  background:var(--danger-soft);
  color:var(--danger-light);
}

/* ============================================
   安装页面
   ============================================ */
.install{
  display:grid;
  place-items:center;
  padding:40px 20px;
  min-height:100vh;
  background:var(--bg-gradient);
  position:relative;
}
.install::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 50%);
  pointer-events:none;
}
.install-panel{
  width:min(620px,100%);
  padding:40px;
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:var(--panel);
  backdrop-filter:blur(20px);
  box-shadow:var(--shadow-xl), 0 0 60px rgba(168, 85, 247, 0.12);
  position:relative;
  z-index:1;
}
.install-panel h1{
  margin-top:0;
  font-size:28px;
  font-weight:800;
  background:linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--neon-pink) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

/* ============================================
   管理后台
   ============================================ */
.admin-head{
  height:68px;
  padding:0 max(24px,calc((100% - 1200px)/2));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  border-bottom:1px solid var(--line);
  background:var(--panel);
  backdrop-filter:blur(20px);
  box-shadow:var(--shadow-sm);
  position:relative;
}
.admin-head>div:last-child{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.admin-head a{
  color:var(--text-light);
  font-weight:500;
  padding:8px 14px;
  border-radius:var(--radius);
  transition:var(--transition);
}
.admin-head a:hover{
  background:var(--accent-soft);
  color:var(--primary-light);
}

.admin-main{
  width:min(1200px,calc(100% - 48px));
  margin:28px auto;
  display:grid;
  grid-template-columns:420px minmax(0,1fr);
  gap:28px;
}

.answer-editor,.account-panel,.feedback-box,.help-main details,.share-card{
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--panel);
  backdrop-filter:blur(10px);
  padding:28px;
  box-shadow:var(--shadow-sm);
  transition:var(--transition);
}
.answer-editor:hover,.account-panel:hover,.feedback-box:hover,.help-main details:hover,.share-card:hover{
  box-shadow:var(--shadow-md), 0 0 25px rgba(168, 85, 247, 0.1);
  border-color:rgba(168, 85, 247, 0.3);
}
.answer-editor h1,.answer-editor h2{
  margin-top:0;
  font-size:22px;
  font-weight:700;
  background:linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.settings-editor{
  margin-top:24px;
}

.check{
  display:flex;
  align-items:center;
  gap:10px;
}
.check input{width:auto}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.section-title h2{
  margin:0;
  font-size:20px;
  font-weight:700;
}

.answer-list{
  display:grid;
  gap:12px;
}
.answer-list article{
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  background:var(--panel);
  backdrop-filter:blur(10px);
  transition:var(--transition);
}
.answer-list article:hover{
  border-color:var(--primary);
  box-shadow:var(--shadow-md), 0 0 20px rgba(168, 85, 247, 0.12);
  transform:translateX(4px);
}
.answer-list article h3{
  margin:0 0 8px;
  font-size:16px;
  font-weight:600;
}
.answer-list article p{
  margin:0 0 10px;
  color:var(--text-light);
  line-height:1.6;
}
.answer-list article>div:last-child{
  display:flex;
  align-items:flex-start;
  gap:6px;
}
.answer-list button,.list-row button{
  border:1.5px solid var(--line);
  background:var(--panel-soft);
  border-radius:var(--radius-sm);
  padding:8px 12px;
  font-size:13px;
  transition:var(--transition);
}
.answer-list button:hover,.list-row button:hover{
  border-color:var(--primary);
  color:var(--primary-light);
  background:var(--accent-soft);
}

/* ============================================
   个人中心
   ============================================ */
.account-main,.help-main{
  width:min(960px,calc(100% - 48px));
  margin:28px auto;
}

.account-tabs{
  display:flex;
  overflow-x:auto;
  border-bottom:2px solid var(--line-light);
  gap:4px;
  margin-bottom:24px;
}
.account-tabs button{
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  padding:14px 18px;
  color:var(--muted);
  white-space:nowrap;
  font-weight:500;
  margin-bottom:-2px;
  transition:var(--transition);
  border-radius:var(--radius-sm) var(--radius-sm) 0 0;
}
.account-tabs button.active{
  border-bottom-color:var(--primary);
  color:var(--primary-light);
  font-weight:600;
  background:var(--accent-soft);
}

.account-panel{
  display:none;
  margin-top:24px;
}
.account-panel.active{
  display:block;
  animation:fadeIn 0.3s ease-out;
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

.list-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:18px 0;
  border-bottom:1px solid var(--line);
}
.list-row:last-child{border-bottom:0}
.list-row>div:first-child{
  min-width:0;
  display:grid;
  gap:6px;
}
.list-row p{
  margin:4px 0;
  line-height:1.6;
  overflow-wrap:anywhere;
  color:var(--text-light);
}

.inline-form{
  display:grid;
  grid-template-columns:200px minmax(0,1fr) auto;
  gap:12px;
  margin-bottom:20px;
}

.danger-button{
  border:0;
  border-radius:var(--radius);
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color:#fff;
  padding:11px 20px;
  font-weight:600;
  box-shadow:0 4px 12px rgba(239, 68, 68, 0.35);
  transition:var(--transition);
}
.danger-button:hover{
  background:linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow:0 6px 16px rgba(239, 68, 68, 0.45);
  transform:translateY(-1px);
}

/* ============================================
   帮助中心
   ============================================ */
.help-main h1{
  margin-top:0;
  font-size:28px;
  font-weight:800;
  background:linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--neon-pink) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.help-main details{
  margin:12px 0;
  transition:var(--transition);
}
.help-main summary{
  cursor:pointer;
  font-weight:600;
  padding:4px 0;
  list-style:none;
  position:relative;
  padding-left:28px;
  font-size:15px;
}
.help-main summary::before{
  content:"+";
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  background:var(--accent-soft);
  color:var(--primary-light);
  border-radius:5px;
  font-size:14px;
  font-weight:700;
  transition:var(--transition);
}
.help-main details[open] summary::before{
  content:"−";
  background:var(--primary);
  color:#fff;
  box-shadow:0 0 10px rgba(168, 85, 247, 0.35);
}
.help-main details p{
  color:var(--text-light);
  line-height:1.7;
  margin:12px 0 4px;
  padding-left:28px;
}

.feedback-box{
  margin-top:32px;
}
.feedback-box h2{
  margin-top:0;
  font-size:20px;
  font-weight:700;
}

/* ============================================
   分享页面
   ============================================ */
.share-page{
  display:grid;
  place-items:center;
  padding:40px 20px;
  min-height:100vh;
  background:var(--bg-gradient);
  position:relative;
}
.share-page::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 30% 70%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  pointer-events:none;
}
.share-card{
  width:min(800px,100%);
  box-shadow:var(--shadow-xl), 0 0 60px rgba(168, 85, 247, 0.12);
  position:relative;
  z-index:1;
}
.shared-content{
  margin:28px 0;
  line-height:1.8;
  color:var(--text);
  font-size:15px;
}

/* ============================================
   对话设置弹窗
   ============================================ */
.dialog-kicker{
  display:block;
  margin-bottom:8px;
  color:var(--primary-light);
  font-size:11px;
  font-weight:700;
  letter-spacing:2px;
  text-transform:uppercase;
}
.conversation-dialog label{
  margin:12px 0 24px;
}
.dialog-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.dialog-actions button,.confirm-actions button{
  min-height:44px;
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  background:var(--panel-soft);
  padding:10px 14px;
  font-weight:600;
  transition:var(--transition);
  color:var(--text);
  font-size:13px;
}
.dialog-actions button:hover,.confirm-actions button:hover{
  border-color:var(--primary);
  color:var(--primary-light);
  background:var(--accent-soft);
}
.dialog-actions .primary{
  border-color:transparent;
  background:var(--primary-gradient);
  background-size:200% 200%;
  color:#fff;
}
.dialog-actions .primary:hover{
  background:var(--primary-gradient-hover);
  background-size:200% 200%;
  color:#fff;
  box-shadow:0 0 15px rgba(168, 85, 247, 0.35);
}
.dialog-actions .danger-button,.confirm-actions .danger-button{
  border-color:transparent;
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color:#fff;
}
.dialog-actions .danger-button:hover,.confirm-actions .danger-button:hover{
  background:linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color:#fff;
}

/* 确认弹窗 */
.confirm-dialog{
  text-align:center;
}
.confirm-mark{
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  margin:0 auto 16px;
  border-radius:50%;
  background:var(--danger-soft);
  color:var(--danger-light);
  font-size:28px;
  font-weight:800;
  box-shadow:0 0 20px rgba(239, 68, 68, 0.3);
}
.confirm-dialog h2{
  margin-bottom:10px;
  font-size:20px;
  padding-right:0;
}
.confirm-dialog p{
  margin:0 0 24px;
  color:var(--muted);
  line-height:1.6;
}
.confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

/* ============================================
   移动端响应式适配 - 完美适配
   ============================================ */
@media(max-width:768px){
  .app{
    display:block;
    height:100dvh;
  }
  
  /* 侧边栏 - 抽屉式 */
  .app aside{
    position:fixed;
    z-index:100;
    inset:0 auto 0 0;
    width:min(88vw, 320px);
    transform:translateX(-105%);
    transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:var(--shadow-xl);
    padding:16px 12px 12px;
  }
  .menu-open aside{transform:translateX(0)}
  .menu-open::after{
    content:"";
    position:fixed;
    z-index:90;
    inset:0;
    background:rgba(0, 0, 0, 0.7);
    backdrop-filter:blur(4px);
    animation:fadeIn 0.2s ease-out;
  }
  
  .static-mobile-close{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
    margin-bottom:14px;
    border:1.5px solid rgba(168, 85, 247, 0.3);
    background:rgba(168, 85, 247, 0.1);
    color:#fff;
    border-radius:var(--radius);
    padding:12px 14px;
    text-align:left;
    font-weight:600;
    backdrop-filter:blur(10px);
    font-size:14px;
  }
  .static-mobile-close::after{
    content:"MENU";
    color:rgba(196, 181, 253, 0.7);
    font-size:10px;
    letter-spacing:2px;
    font-weight:700;
  }
  
  .mobile-menu{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border-radius:var(--radius);
    font-size:22px;
    color:var(--text);
    transition:var(--transition);
  }
  .mobile-menu:hover{
    background:var(--accent-soft);
  }
  
  .server-mobile-login{
    display:inline-flex;
    align-items:center;
    height:38px;
    padding:0 16px;
    border:0;
    border-radius:var(--radius);
    background:var(--primary-gradient);
    background-size:200% 200%;
    color:#fff;
    font-size:13px;
    font-weight:600;
    text-decoration:none;
    box-shadow:var(--shadow-md), var(--shadow-glow-sm);
  }
  .server-mobile-login.logged{
    border:1.5px solid var(--line);
    background:var(--panel);
    color:var(--text);
    box-shadow:none;
  }
  
  /* 顶部导航 */
  .app>main>header{
    height:58px;
    flex-basis:58px;
    padding:0 14px;
    gap:10px;
  }
  .app>main>header select{
    min-width:100px;
    max-width:120px;
    font-size:13px;
    padding:7px 34px 7px 12px;
  }
  .head-actions{gap:2px}
  .head-actions>button{
    height:36px;
    min-width:36px;
    font-size:15px;
  }
  
  /* 欢迎页面 */
  #welcome{
    padding:40px 20px 200px;
  }
  #welcome h1{font-size:26px}
  #welcome p{font-size:14px}
  .hero-mark{
    width:56px;
    height:56px;
    font-size:24px;
  }
  
  .suggestions{
    grid-template-columns:1fr;
    gap:10px;
    margin-top:28px;
  }
  .suggestions button{
    padding:14px 18px;
    font-size:14px;
  }
  
  /* 消息区域 */
  #messages{
    padding:24px 16px 200px;
  }
  .message{
    grid-template-columns:34px minmax(0,1fr);
    gap:12px;
    margin-bottom:24px;
  }
  .message-icon{
    width:34px;
    height:34px;
    flex-basis:34px;
    font-size:13px;
  }
  .content{font-size:14px}
  
  /* 输入区域 */
  .composer{
    left:0;
    padding:14px 14px max(12px,env(safe-area-inset-bottom));
  }
  .composer textarea{
    min-height:64px;
    padding:14px 16px;
    font-size:14px;
  }
  .compose-row{
    grid-template-columns:40px minmax(0,1fr) 40px;
    gap:8px;
  }
  .attach-button,.send{
    width:40px;
    height:40px;
    font-size:16px;
  }
  .compose-row>span{font-size:11px}
  
  /* 弹窗 - 重点修复登录注册 */
  dialog{
    width:calc(100% - 24px);
    max-width:420px;
    padding:24px 20px;
    margin:12px;
    max-height:92dvh;
    overflow-y:auto;
  }
  dialog h2{
    font-size:20px;
    margin-bottom:20px;
    padding-right:36px;
  }
  .close{
    top:14px;
    right:14px;
    width:32px;
    height:32px;
    font-size:20px;
  }
  
  /* 标签页 */
  .tabs{
    margin-bottom:20px;
    gap:2px;
  }
  .tabs button{
    padding:10px 6px;
    font-size:13px;
  }
  
  /* 表单 */
  dialog form{
    gap:12px;
  }
  dialog input{
    min-height:42px;
    padding:10px 14px;
    font-size:14px;
  }
  dialog label{
    font-size:12px;
    gap:6px;
  }
  
  /* 验证码行 */
  .code-row{
    gap:8px;
  }
  .code-row button{
    height:42px;
    padding:0 12px;
    font-size:12px;
    min-width:90px;
  }
  
  /* 提交按钮 */
  dialog .primary{
    min-height:44px;
    font-size:14px;
  }
  
  /* 管理后台 */
  .admin-head{
    height:auto;
    min-height:60px;
    padding:12px 16px;
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }
  .admin-head>div:last-child{
    gap:8px;
    font-size:13px;
    flex-wrap:wrap;
  }
  .admin-main{
    grid-template-columns:1fr;
    width:calc(100% - 24px);
    margin:20px auto;
    gap:20px;
  }
  
  /* 个人中心 */
  .account-main,.help-main{
    width:calc(100% - 24px);
    margin:20px auto;
  }
  .account-tabs button{
    padding:12px 14px;
    font-size:13px;
  }
  
  .grid2,.inline-form{
    grid-template-columns:1fr;
  }
  
  .answer-list article{
    display:block;
    padding:16px;
  }
  .answer-list article>div:last-child{
    margin-top:14px;
  }
  
  .list-row{
    align-items:flex-start;
    flex-direction:column;
    gap:12px;
  }
  
  .answer-editor,.account-panel,.feedback-box,.help-main details,.share-card{
    padding:20px;
  }
  
  /* 安装页面 */
  .install-panel{
    padding:28px 24px;
  }
  .install-panel h1{
    font-size:24px;
  }
  
  /* 对话弹窗 */
  .dialog-actions,.confirm-actions{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .dialog-actions button,.confirm-actions button{
    min-height:42px;
    font-size:12px;
    padding:8px 10px;
  }
}

/* 小屏幕优化 */
@media(max-width:480px){
  #welcome h1{font-size:22px}
  .hero-mark{
    width:48px;
    height:48px;
    font-size:20px;
  }
  .composer textarea{min-height:56px}
  
  /* 弹窗在超小屏幕 */
  dialog{
    padding:20px 16px;
    margin:8px;
  }
  dialog h2{
    font-size:18px;
  }
  .tabs button{
    font-size:12px;
    padding:10px 4px;
  }
  
  /* 确认弹窗按钮单列 */
  .confirm-actions{
    grid-template-columns:1fr;
  }
  
  .install-panel{
    padding:24px 20px;
  }
  .install-panel h1{
    font-size:22px;
  }
}

/* 平板适配 */
@media(min-width:769px) and (max-width:1024px){
  .app{grid-template-columns:260px minmax(0,1fr)}
  .app aside{padding:18px 12px 12px}
  .composer{left:260px}
  .admin-main{grid-template-columns:380px minmax(0,1fr)}
}

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, var(--neon-purple), var(--neon-pink));
  border-radius:3px;
}
::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
}

/* ============================================
   加载动画
   ============================================ */
.loading{
  display:inline-flex;
  gap:5px;
}
.loading span{
  width:8px;
  height:8px;
  background:var(--primary);
  border-radius:50%;
  animation:bounce 1.4s infinite ease-in-out both;
  box-shadow:0 0 8px var(--primary);
}
.loading span:nth-child(1){animation-delay:-0.32s;background:var(--neon-purple)}
.loading span:nth-child(2){animation-delay:-0.16s;background:var(--neon-pink)}
.loading span:nth-child(3){background:var(--neon-blue)}

@keyframes bounce{
  0%,80%,100%{transform:scale(0);opacity:0.5}
  40%{transform:scale(1);opacity:1}
}

/* ============================================
   辅助类
   ============================================ */
.text-center{text-align:center}
.text-right{text-align:right}
.text-primary{color:var(--primary-light)}
.text-success{color:var(--success-light)}
.text-danger{color:var(--danger-light)}
.text-muted{color:var(--muted)}

.mt-1{margin-top:8px}
.mt-2{margin-top:16px}
.mt-3{margin-top:24px}
.mb-1{margin-bottom:8px}
.mb-2{margin-bottom:16px}
.mb-3{margin-bottom:24px}

.w-full{width:100%}
.hidden{display:none}
.flex{display:flex}
.items-center{align-items:center}
.justify-between{justify-content:space-between}
.gap-2{gap:8px}
.gap-3{gap:12px}

/* 选中文本样式 */
::selection{
  background:var(--primary);
  color:#fff;
}
