:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-muted: #aeaeb2;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: rgba(0, 113, 227, 0.08);
  --accent-soft: #e8f2fc;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 980px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --sidebar-w: 248px;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.47059;
  font-size: 15px;
  letter-spacing: -0.022em;
}

a { color: inherit; }

/* SVG 尺寸 */
.w-4, .h-4 { width: 16px; height: 16px; }
.w-5, .h-5 { width: 20px; height: 20px; }
.w-6, .h-6 { width: 24px; height: 24px; }
.w-7, .h-7 { width: 28px; height: 28px; }
.w-8, .h-8 { width: 32px; height: 32px; }
.w-10, .h-10 { width: 40px; height: 40px; }
.w-\[18px\], .h-\[18px\] { width: 18px; height: 18px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 400;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  cursor: pointer; border: none; text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 113, 227, 0.2);
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.01); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-outline {
  background: rgba(255, 255, 255, 0.8); color: var(--accent);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: #fff; border-color: #b0b0b5; transform: scale(1.01); }
.btn-outline:active { transform: scale(0.98); }
.btn-ghost {
  background: transparent; color: var(--accent); border: none;
  padding: 10px 18px;
}
.btn-ghost:hover { background: var(--accent-light); transform: scale(1.02); }
.btn-ghost:active { transform: scale(0.97); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 17px; font-weight: 400; }

/* 输入 */
.input, .textarea, select.input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 15px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
  color: var(--text);
}
.input:focus, .textarea:focus, select.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}
.textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 8px; color: var(--text-secondary); letter-spacing: 0; }

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.25s;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card-hover:active {
  transform: translateY(-1px) scale(0.99);
  transition-duration: 0.1s;
}
.card-pad { padding: 28px; }
.card-pad-sm { padding: 22px; }

/* 导航 */
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius); font-size: 14px;
  color: var(--text-secondary); text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: relative; overflow: hidden;
}
.nav-link:hover { background: rgba(0, 0, 0, 0.04); color: var(--text); transform: translateX(2px); }
.nav-link:active { transform: scale(0.98); }
.nav-link.active {
  background: var(--accent-light); color: var(--accent); font-weight: 500;
}

/* 页面 */
.page-header { margin-bottom: 32px; }
.page-header h1 {
  font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
}
.page-header p { font-size: 15px; color: var(--text-secondary); margin-top: 8px; letter-spacing: 0; }

/* 图标 */
.icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); flex-shrink: 0;
}
.icon-wrap-lg { width: 56px; height: 56px; border-radius: 14px; }

/* 进度条 */
.progress { height: 4px; background: rgba(0, 0, 0, 0.06); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1); }

/* 聊天气泡 — iMessage 风格 */
.msg-row { display: flex; margin-bottom: 10px; }
.msg-row.user { justify-content: flex-end; }
.msg-bubble {
  max-width: 75%; padding: 10px 16px; font-size: 15px;
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.bubble-user {
  background: var(--accent); color: #fff;
  border-radius: 20px 20px 4px 20px;
}
.bubble-ai {
  background: #e9e9eb; color: var(--text);
  border-radius: 20px 20px 20px 4px;
}

/* 标签 */
.tag {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
}
.tag-green { background: #e8f8ef; color: #1d8348; }
.tag-yellow { background: #fef6e7; color: #b7791f; }
.tag-red { background: #fdecea; color: #c0392b; }
.tag-gray { background: rgba(0, 0, 0, 0.05); color: var(--text-secondary); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 14px 22px; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02); letter-spacing: 0.02em; text-transform: uppercase;
}
.table td { padding: 16px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(0, 113, 227, 0.02); }

/* 统计 */
.stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 400; }
.stat-value { font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.stat-value-sm { font-size: 24px; }
.stat-sub { font-size: 14px; font-weight: 400; color: var(--text-muted); }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  padding: 24px 20px 20px;
  display: flex; align-items: center; gap: 12px;
}
.sidebar-brand span { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.sidebar-brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.sidebar-footer {
  padding: 12px; margin: 8px;
  background: rgba(0, 0, 0, 0.03); border-radius: var(--radius-lg);
}
.main { flex: 1; padding: 40px 52px; overflow: auto; min-width: 0; }
.main-narrow { max-width: 820px; }
.main-chat {
  max-width: 780px; display: flex; flex-direction: column;
  height: 100vh; padding-bottom: 0;
}

/* 网格 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* 工具卡片 */
.tool-card {
  padding: 24px; text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: 16px;
}
.tool-card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.tool-card-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* 额度面板 */
.quota-box { padding: 4px 8px 8px; margin-bottom: 4px; }
.quota-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-secondary); margin-bottom: 6px;
}
.quota-row + .quota-row { margin-top: 12px; }

/* 认证页 */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-head { text-align: center; margin-bottom: 36px; }
.auth-head h1 { font-size: 28px; font-weight: 600; margin-top: 24px; letter-spacing: -0.03em; }
.auth-head p { font-size: 15px; color: var(--text-secondary); margin-top: 8px; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-footer { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 28px; }
.auth-footer a { color: var(--accent); font-weight: 400; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.alert {
  font-size: 14px; text-align: center; margin-bottom: 16px; padding: 12px 16px;
  border-radius: var(--radius);
}
.alert-error { color: #c0392b; background: #fdecea; }
.alert-success { color: #1d8348; background: #e8f8ef; }

/* 落地页 */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 980px; margin: 0 auto; height: 52px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.site-logo span { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }

.hero {
  max-width: 980px; margin: 0 auto;
  padding: 48px 22px 36px; text-align: center;
}
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 500; margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 56px); font-weight: 600;
  letter-spacing: -0.045em; line-height: 1.08; margin-bottom: 14px;
  background: linear-gradient(180deg, #1d1d1f 0%, #424245 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 17px; color: var(--text-secondary); font-weight: 400;
  max-width: 480px; margin: 0 auto 28px; line-height: 1.55; letter-spacing: -0.01em;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.landing-main { padding-top: 52px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.features {
  max-width: 1100px; margin: 0 auto; padding: 8px 22px 72px;
}
.features-head {
  text-align: center; margin-bottom: 28px;
}
.features-head h2 {
  font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 8px;
}
.features-head p { font-size: 17px; color: var(--text-secondary); }

.feature-card {
  padding: 24px 18px; text-align: center;
  border: none; background: var(--surface);
}
.feature-card .icon-wrap {
  width: 48px; height: 48px; margin: 0 auto; border-radius: 14px;
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.feature-card:hover .icon-wrap { transform: scale(1.08); }
.feature-card h3 {
  font-size: 16px; font-weight: 600; margin: 16px 0 6px; letter-spacing: -0.02em;
}
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }

.site-footer {
  padding: 32px 22px; text-align: center;
  font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* 聊天区 */
.chat-card {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  min-height: 0; border: none; box-shadow: var(--shadow);
}
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; background: var(--surface); }
.chat-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: 15px;
}
.chat-input-bar {
  border-top: 1px solid var(--border); padding: 16px 20px;
  flex-shrink: 0; background: rgba(245, 245, 247, 0.8);
  backdrop-filter: blur(10px);
}
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-row .textarea {
  flex: 1; resize: none; min-height: 44px;
  border-radius: 20px; background: var(--surface);
}
.chat-input-row .btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; flex-shrink: 0; }

/* 上传区 */
.upload-zone {
  width: 100%; height: 200px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: rgba(0, 113, 227, 0.03); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 14px; overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }

/* 预览区 */
.preview-box {
  min-height: 340px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px;
}
.preview-box img { max-width: 100%; border-radius: var(--radius); }

/* 手机底栏 */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 50;
}
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 12px; font-size: 10px; color: var(--text-muted); text-decoration: none;
}
.mobile-nav a.active { color: var(--accent); font-weight: 500; }

/* 状态页 */
.status-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.status-card { padding: 52px 40px; text-align: center; max-width: 420px; border: none; box-shadow: var(--shadow); }
.status-card h1 { font-size: 22px; font-weight: 600; margin-top: 20px; letter-spacing: -0.02em; }
.status-card p { font-size: 15px; color: var(--text-secondary); margin-top: 10px; }

/* 管理后台 */
.admin-section-title {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
}
.admin-empty { padding: 56px; text-align: center; color: var(--text-muted); font-size: 15px; }
.key-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.key-item:last-child { border-bottom: none; }
.key-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.key-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 统一对话（豆包式） */
.main-unified {
  padding: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
}
.unified-chat {
  flex: 1; display: flex; flex-direction: column;
  max-width: 820px; width: 100%; margin: 0 auto;
  min-height: 0; padding: 0 20px;
}
.unified-messages {
  flex: 1; overflow-y: auto; padding: 32px 0 16px;
  background: transparent;
}
.unified-empty {
  flex-direction: column; text-align: center; padding: 40px 20px;
}
.unified-empty-icon { margin-bottom: 20px; opacity: 0.9; }
.unified-empty h2 {
  font-size: 26px; font-weight: 600; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 10px;
}
.unified-empty p { font-size: 15px; color: var(--text-secondary); max-width: 360px; }

.chat-dock {
  flex-shrink: 0; padding: 0 0 24px;
  position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.chat-dock-box {
  display: flex; align-items: flex-end; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 10px 10px 10px 14px;
  box-shadow: var(--shadow);
}
.dock-input {
  flex: 1; border: none; background: transparent;
  min-height: 24px; max-height: 120px; padding: 8px 0;
  box-shadow: none; font-size: 15px; resize: none;
}
.dock-input:focus { border: none; box-shadow: none; outline: none; }
.dock-send {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; flex-shrink: 0;
}
.dock-upload {
  width: 36px; height: 36px; border: none; background: var(--accent-soft);
  color: var(--accent); border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dock-upload:hover { background: var(--accent-light); }

.mode-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-top: 14px;
}
.mode-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  transition: all 0.15s ease; font-family: inherit;
}
.mode-chip:hover { border-color: #b0b0b5; color: var(--text); }
.mode-chip.active {
  background: var(--accent-light); border-color: var(--accent);
  color: var(--accent); font-weight: 500;
}

.group-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; justify-content: center;
}
.group-bar-label { font-size: 13px; color: var(--text-secondary); }
.count-chip {
  padding: 5px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 12px; color: var(--text-secondary); cursor: pointer; font-family: inherit;
}
.count-chip.active {
  background: var(--accent-light); border-color: var(--accent); color: var(--accent);
}

.ref-preview {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 8px 12px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); width: fit-content;
}
.ref-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.ref-clear {
  width: 24px; height: 24px; border: none; background: rgba(0,0,0,0.06);
  border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-secondary);
}

.msg-ref-img {
  max-width: 160px; border-radius: 10px; margin-bottom: 8px; display: block;
}
.msg-images {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px; padding: 10px !important;
}
.msg-gen-img {
  width: 100%; border-radius: 10px; display: block;
  transition: transform 0.15s;
}
.msg-gen-img:hover { transform: scale(1.02); }

.typing-dots { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.typing-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); animation: blink 1.2s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.2s; }
.typing-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* ===== 动画系统 ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes iconPop {
  0% { opacity: 0; transform: scale(0.6); }
  70% { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}

body { opacity: 0; transition: opacity 0.25s ease; }
body.is-ready { opacity: 1; }

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.55s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
.anim-fade-down {
  animation: fadeDown 0.45s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
.anim-icon-pop {
  animation: iconPop 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s forwards;
  opacity: 0;
}
.anim-d1 { animation-delay: 0.08s; }
.anim-d2 { animation-delay: 0.16s; }
.anim-d3 { animation-delay: 0.24s; }
.anim-d4 { animation-delay: 0.32s; }
.anim-d5 { animation-delay: 0.40s; }
.anim-d6 { animation-delay: 0.48s; }
.anim-d7 { animation-delay: 0.56s; }
.anim-d8 { animation-delay: 0.64s; }

.msg-row { animation: msgIn 0.35s cubic-bezier(0.25, 0.1, 0.25, 1); }

.ripple-wrap { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0); animation: rippleOut 0.55s ease-out;
  pointer-events: none; z-index: 1;
}
.mode-chip .ripple, .nav-link .ripple, .card-hover .ripple {
  background: rgba(0, 113, 227, 0.12);
}
.is-pressing { transform: scale(0.97) !important; }

.chat-dock-box {
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.chat-dock-box.is-focused,
.chat-dock-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1), var(--shadow);
  transform: translateY(-1px);
}

.mode-chip { transition: all 0.22s cubic-bezier(0.25, 0.1, 0.25, 1); }
.mode-chip:active { transform: scale(0.96); }
.count-chip { transition: all 0.2s ease; }
.count-chip:active { transform: scale(0.95); }

.unified-empty { animation: fadeUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1); }
.chat-dock { animation: fadeUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.15s backwards; }

.auth-wrap { animation: fadeUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); }
.auth-head { animation: fadeUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.08s backwards; }
.auth-wrap .card { animation: fadeUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.16s backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  body { opacity: 1; }
  .anim-fade-up, .anim-icon-pop { opacity: 1; transform: none; }
}

/* 响应式 */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .main { padding: 28px 20px 96px; }
  .main-unified { padding: 0; height: calc(100vh - 56px); padding-bottom: 56px; }
  .unified-chat { padding: 0 12px; }
  .chat-dock { padding-bottom: 12px; }
  .main-chat { height: calc(100vh - 52px); padding-bottom: 0; }
  .mobile-nav { display: flex; justify-content: space-around; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; padding-bottom: 64px; }
  .hero p { font-size: 17px; }
  .main { padding: 24px 16px 96px; }
  .page-header h1 { font-size: 24px; }
}
