/* =============================================================
   忆宇 AI 建站平台 - 全局样式 (阿里 / Ant Design 风格)
   主色 #1677ff · 浅色背景 #f5f7fa · 白色卡片圆角8px · 深蓝侧栏 #001529
   ============================================================= */
:root {
  /* 阿里 Ant Design 主色系 */
  --primary: #1677ff;            /* 主色(纯色,用于按钮/高亮) */
  --primary-solid: #1677ff;
  --primary-hover: #4096ff;
  --primary-deep: #0958d9;       /* 深蓝(链接/hover) */
  --bg: #f5f7fa;                 /* 全局浅灰背景 */
  --panel: #ffffff;              /* 卡片白底 */
  --border: #e8ecf2;             /* 细边框 */
  --text: #1f2733;               /* 主文字 */
  --muted: #8a94a3;              /* 次要文字 */
  --danger: #ff4d4f;
  --success: #52c41a;
  --warning: #faad14;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 10px rgba(22, 44, 80, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ---------- 顶栏 ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 6px rgba(22,44,80,.04); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: .3px; }
.brand:hover { color: var(--text); }
.brand-logo { width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0; object-fit: contain; display: inline-block; }
.main-nav { display: flex; align-items: center; gap: 26px; flex: 1; }
.main-nav a { color: var(--muted); font-size: 14px; position: relative; padding: 18px 0; transition: color .2s; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); font-weight: 600; }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.balance-pill {
  display: inline-flex; align-items: center; padding: 4px 12px;
  background: #e6f2ff; color: var(--primary); border-radius: 14px;
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.user-box { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.user-box:hover { color: var(--primary); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
.user-name { font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; line-height: 1.5; cursor: pointer; background: #fff; color: var(--text);
  transition: all .2s; text-decoration: none; vertical-align: middle;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(22,119,255,.2); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; border-color: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-block { width: 100%; display: flex; justify-content: center; }
.btn-sm { padding: 2px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 7px 11px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; background: #fff; color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.15); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .field input { flex: 1; }
.input-group .btn { white-space: nowrap; }

/* ---------- 前台主区 ---------- */
.front-main { min-height: calc(100vh - 60px); }
.hero {
  position: relative; overflow: hidden;
  text-align: center; padding: 84px 20px 76px;
  background:
    radial-gradient(620px 300px at 18% 0%, rgba(22,119,255,.10), transparent 62%),
    radial-gradient(720px 320px at 85% 8%, rgba(64,150,255,.10), transparent 62%),
    linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: ''; position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%);
  width: 760px; height: 120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(22,119,255,.12), transparent);
  filter: blur(10px); pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; margin-bottom: 24px;
  border: 1px solid #d6e6ff; background: #fff; color: var(--primary);
  border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(82,196,26,.16); }
.hero h1 { font-size: 44px; margin: 0 0 18px; font-weight: 800; letter-spacing: .5px; line-height: 1.25; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--primary) 0%, #4096ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 16px; margin: 0 auto 34px; max-width: 680px; }
.hero-cta { display: flex; justify-content: center; gap: 14px; position: relative; z-index: 2; }
.hero-cta .btn-primary { font-size: 16px; padding: 11px 32px; border-radius: 8px; }
.hero-cta .btn-ghost { font-size: 16px; padding: 11px 28px; border-radius: 8px; background: #fff; }
.hero-stats { display: flex; justify-content: center; gap: 64px; margin-top: 54px; position: relative; z-index: 2; }
.hero-stats .stat b { font-size: 30px; color: var(--primary); display: block; font-weight: 800; }
.hero-stats .stat span { color: var(--muted); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 20px; }
.section-title { text-align: center; font-size: 26px; margin: 0 0 30px; font-weight: 700; }

/* 6 宫格 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: block; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s; color: var(--text);
}
.card:hover { box-shadow: 0 6px 20px rgba(22,44,80,.1); transform: translateY(-2px); color: var(--text); }
.card .icon { font-size: 30px; margin-bottom: 10px; }
.card .icon svg { width: 30px; height: 30px; color: var(--primary); }
/* 首页功能卡图标(Feather 线性) */
.card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef4ff, #deedff);
  border: 1px solid #d6e6ff; color: var(--primary);
  margin-bottom: 14px; transition: transform .25s, box-shadow .25s;
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,119,255,.20); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { color: var(--muted); font-size: 13px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 25px; left: 12%; right: 12%;
  height: 2px; background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 12px);
}
.steps .step { position: relative; z-index: 1; text-align: center; padding: 0 20px; }
.steps .step b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--primary); border: 2px solid #d6e6ff;
  margin-bottom: 14px; font-weight: 700; font-size: 18px; box-shadow: var(--shadow);
}
.steps .step p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 32px 20px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-size: 18px; font-weight: 700; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { margin: 0 0 10px; font-size: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 13px; padding: 2px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-copy { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; border-top: 1px solid var(--border); }

/* ---------- 后台布局 (简约白色侧栏) ---------- */
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
  width: 232px; background: #fff; color: var(--text); flex-shrink: 0;
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; z-index: 40;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}
.menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; color: var(--text); }
.sidebar-head { display: none; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); flex-shrink: 0; }
.sidebar-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.sidebar-logo:hover { color: var(--text); }
.sidebar-title { font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.nav-toggle { cursor: pointer; font-size: 15px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 4px 9px; line-height: 1; }
.sidebar-nav { padding: 8px 8px; flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 8px; }
.nav-caption {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 12px 6px; color: var(--text); font-size: 13px;
  letter-spacing: .5px; font-weight: 600; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.nav-caption:hover { color: var(--primary); }
.cap-arrow { font-size: 10px; transition: transform .2s; color: var(--muted); }
.nav-group.collapsed .cap-arrow { transform: rotate(-90deg); }
.nav-group.collapsed .nav-collapse { display: none; }
.nav-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px 4px 18px; color: #a0a8b5;
  font-size: 11px; letter-spacing: .5px;
}
.nav-sub::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #c3cad6; flex-shrink: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 30px; margin: 2px 0; border-radius: 8px;
  color: #3d4757; font-size: 14px;
  transition: background .2s, color .2s;
}
.nav-ico { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; color: #6b7686; }
.nav-item:hover { background: #f5f7fa; color: var(--primary); }
.nav-item:hover .nav-ico { color: var(--primary); }
.nav-item.active { background: #e6f2ff; color: var(--primary); font-weight: 600; }
.nav-item.active .nav-ico { color: var(--primary); opacity: 1; }

.main { flex: 1; padding: 24px 28px; min-width: 0; }

/* ---------- 通用面板/统计 ---------- */
.page-title { margin: 0 0 20px; font-size: 22px; font-weight: 700; }
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card b { font-size: 24px; color: var(--primary); display: block; }
.stat-card span { color: var(--muted); font-size: 13px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: #fafbfc; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #f7faff; }
.table tr:last-child td { border-bottom: none; }
.table .muted { color: var(--muted); }

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-block; padding: 1px 9px; border-radius: 4px; font-size: 12px;
  line-height: 20px; background: #f2f4f7; color: var(--muted); border: 1px solid var(--border);
}
.tag-success { background: #f0feeb; color: var(--success); border-color: #c3ecb0; }
.tag-warn { background: #fff7e6; color: var(--warning); border-color: #ffe7a3; }
.tag-danger { background: #fff1f0; color: var(--danger); border-color: #ffd6d4; }
.tag-primary { background: #e6f2ff; color: var(--primary); border-color: #b7d6ff; }

/* ---------- Tabs (阿里分段/页签) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); cursor: pointer; font-size: 14px; transition: all .2s;
}
.tab:hover { color: var(--primary); border-color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ptab { margin-bottom: 16px; }

/* ---------- 进度条 ---------- */
.progress { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }

/* ---------- 单选框 ---------- */
.radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; margin-bottom: 6px; }

/* ---------- 提示条 ---------- */
.alert {
  padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; cursor: pointer;
  background: #f0f6ff; color: var(--primary); border: 1px solid #b7d6ff;
}
.alert-success { background: #f0feeb; color: var(--success); border-color: #c3ecb0; }
.alert-error { background: #fff1f0; color: var(--danger); border-color: #ffd6d4; }

/* ---------- 日志输出区 ---------- */
.stream-output {
  background: #f7f8fa; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; min-height: 120px; white-space: pre-wrap; font-size: 12px; color: var(--text);
}

/* ---------- 认证页 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #eef4ff 0%, var(--bg) 100%);
}
.auth-box {
  width: 420px; max-width: 100%; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 36px 32px 30px; box-shadow: 0 12px 40px rgba(22,44,80,.1);
}
.auth-box h2 { margin: 0 0 6px; font-size: 22px; }
.auth-box .sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.auth-box .foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: none; align-items: center; justify-content: center; }
.modal-mask.open { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 420px; max-width: 92vw; padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }

/* ---------- 聊天页 ---------- */
.chat-page { display: flex; gap: 16px; height: calc(100vh - 130px); }
.chat-sessions {
  width: 220px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; overflow-y: auto; flex-shrink: 0;
}
.session-item {
  padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .15s;
}
.session-item:hover { background: #f5f7fa; }
.session-item.active { background: #e6f2ff; color: var(--primary); }
.chat-main {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; min-width: 0;
}
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fafbfc; }
.chat-empty { color: var(--muted); text-align: center; margin: auto; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 8px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text); }
.chat-input { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: inherit; outline: none; }
.chat-input textarea:focus { border-color: var(--primary); }
.model-price { margin-left: 10px; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .chat-sessions { width: 64px; }
  .chat-sessions .session-item { font-size: 0; }
  .chat-sessions .session-item::first-letter { font-size: 14px; }
}

/* ---------- 会话/群聊列表项 ---------- */
.sess, .gitem { transition: background .15s; }
.sess:hover, .gitem:hover { background: #f5f7fa; }
.sess.active, .gitem.active { background: #e6f2ff; }

/* ---------- 桌面/移动端 ---------- */
.viewport-switch {
  position: fixed; right: 12px; bottom: 12px; z-index: 60; display: flex;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--shadow);
}
.viewport-switch button { border: none; background: transparent; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.viewport-switch button.on { background: var(--primary); color: #fff; }
body.mobile .front-main, body.mobile .main { max-width: 480px; margin: 0 auto; }

/* 响应式 */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 200px; }
}
@media (max-width: 640px) {
  .grid-3, .steps, .stats-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; left: -100%; transition: left .25s; height: 100vh; top: 0; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
  .sidebar.open { left: 0; }
  .hero h1 { font-size: 30px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   客户控制台: 底部 Tab 导航栏 (仅手机/平板显示; 桌面用左侧菜单栏)
   ============================================================= */
.tabbar {
  display: none;                 /* 桌面隐藏 */
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(22, 44, 80, .06);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 0 8px;
  color: #9aa4b1;
  font-size: 11px;
  text-decoration: none;
  transition: color .15s;
}
.tabbar-item svg { width: 22px; height: 22px; }
.tabbar-item:hover { color: #5b6472; }
.tabbar-item.active { color: #1677ff; font-weight: 600; }

#console-nav a:hover { color: #1677ff; }

/* ---- 手机/平板 (UA 自动检测) 优先应用移动布局 ---- */
body.device-mobile .tabbar,
body.device-tablet .tabbar { display: flex; max-width: 100%; }
body.device-mobile .menu-btn,
body.device-tablet .menu-btn { display: inline-flex; }
body.device-mobile .sidebar,
body.device-tablet .sidebar { position: fixed; left: -100%; transition: left .25s; height: 100vh; top: 0; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
body.device-mobile .sidebar.open,
body.device-tablet .sidebar.open { left: 0; }
body.device-mobile .sidebar-head,
body.device-tablet .sidebar-head { display: flex; }
body.device-mobile .layout .main,
body.device-tablet .layout .main { padding-bottom: 84px; }

/* ---- 窄视口 (CSS 媒体查询) 兜底: UA 识别不到时按屏幕宽度自动适应 ---- */
@media (max-width: 960px) {
  .tabbar { display: flex; max-width: 100%; }
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; left: -100%; transition: left .25s; height: 100vh; top: 0; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
  .sidebar.open { left: 0; }
  .sidebar-head { display: flex; }
  body.backend .layout .main { padding-bottom: 84px; }
  body.front .front-main.console { padding-bottom: 84px; }
}

/* ---------- 进入系统 3s 浅色科技风入场 (Splash) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(620px 320px at 16% 0%, rgba(22,119,255,.10), transparent 62%),
    radial-gradient(700px 340px at 86% 6%, rgba(64,150,255,.12), transparent 62%),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
  color: #1f2733; overflow: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
/* 透视科技网格 */
.splash-grid {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background-image:
    linear-gradient(rgba(22,119,255,.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,119,255,.20) 1px, transparent 1px);
  background-size: 38px 38px;
  transform: perspective(340px) rotateX(64deg);
  transform-origin: 50% 0;
  animation: gridMove 1.1s linear infinite;
  -webkit-mask-image: linear-gradient(to top, rgba(255,255,255,.95), transparent);
  mask-image: linear-gradient(to top, rgba(255,255,255,.95), transparent);
  pointer-events: none;
}
/* 数字雨 */
.splash-matrix { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.splash-matrix span {
  position: absolute; font-family: Consolas, Menlo, monospace; font-size: 13px;
  color: #2f7bff; text-shadow: 0 0 7px rgba(47,123,255,.35);
}
/* 中央主视觉 */
.splash-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.splash-logo-wrap {
  position: relative; width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.splash-logo-wrap::before {
  content: ''; position: absolute; inset: 0; border-radius: 22px;
  background: #fff; border: 1px solid #d6e6ff;
  box-shadow: 0 4px 18px rgba(22,119,255,.18), inset 0 0 14px rgba(22,119,255,.12);
  animation: splashPulse 1.8s ease-out infinite;
}
.splash-logo { position: relative; z-index: 1; width: 46px; height: 46px; object-fit: contain; border-radius: 10px; display: block; }
.splash-name {
  margin-top: 22px; font-size: 24px; font-weight: 800; letter-spacing: 3px; text-align: center;
  color: #0958d9; text-shadow: 0 1px 2px rgba(9,88,217,.12);
  animation: splashFadeUp .7s ease both;
}
/* 终端开机日志 */
.splash-term {
  margin-top: 26px; width: 340px; max-width: 86vw; min-height: 118px;
  text-align: left; font-family: Consolas, Menlo, monospace; font-size: 13px;
  color: #1f2733; line-height: 1.9;
  padding: 12px 14px; border: 1px solid #d6e6ff; border-radius: 8px;
  background: rgba(255,255,255,.92); box-shadow: 0 6px 20px rgba(22,119,255,.10);
}
.splash-term .t-line { opacity: 0; animation: tIn .22s forwards; }
.splash-term .t-prompt { color: #0958d9; }
.splash-term .t-ok { color: #16a34a; }
.splash-term .t-link { color: #7c3aed; }
.splash-term .t-cur {
  display: inline-block; width: 8px; height: 13px; margin-left: 2px; vertical-align: -2px;
  background: #1677ff; box-shadow: 0 0 8px rgba(22,119,255,.7); animation: cur .85s steps(1) infinite;
}
/* 进度条 */
.splash-progress { margin-top: 20px; width: 340px; max-width: 86vw; height: 4px; position: relative; background: rgba(22,119,255,.18); border-radius: 2px; overflow: visible; }
.splash-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 2px; background: linear-gradient(90deg, #4096ff, #1677ff, #22d3ee); box-shadow: 0 0 10px rgba(22,119,255,.8); transition: width .2s linear; }
.splash-progress b { position: absolute; top: -19px; right: 0; font-size: 12px; color: #1677ff; font-family: Consolas, Menlo, monospace; font-weight: 600; }
@keyframes gridMove { from { background-position: 0 0; } to { background-position: 0 38px; } }
@keyframes matrixFall { from { top: -8%; } to { top: 112%; } }
@keyframes tIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes cur { 50% { opacity: 0; } }
@keyframes splashPulse {
  0% { box-shadow: 0 4px 14px rgba(22,119,255,.14), inset 0 0 10px rgba(22,119,255,.10); }
  50% { box-shadow: 0 6px 26px rgba(22,119,255,.34), inset 0 0 18px rgba(22,119,255,.20); }
  100% { box-shadow: 0 4px 14px rgba(22,119,255,.14), inset 0 0 10px rgba(22,119,255,.10); }
}
@keyframes splashFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .splash-grid, .splash-matrix span, .splash-logo-wrap::before, .splash-term .t-cur { animation: none; }
  .splash { transition: opacity .35s ease; }
}
