/* ===== 深海实验室 · 探秘卡通 ===== */
:root{
  --ocean-deep:#0B3D6B;
  --ocean-green:#00D4AA;
  --ocean-orange:#FF7F50;
  --ocean-foam:#E8F0FE;
  --ocean-card:rgba(232,240,254,.88);
  --ocean-glow:rgba(0,212,170,.25);
  --ocean-radius:16px;
}

/* 深海蓝主题 — 覆盖在 app-kit 之上 */
.ak-theme-ocean{
  --ak-bg-deep:#0B3D6B;
  --ak-bg:#0f4a7a;
  --ak-surface:#12528a;
  --ak-card:rgba(232,240,254,.92);
  --ak-card-2:rgba(232,240,254,.82);
  --ak-text:#E8F0FE;
  --ak-text-2:#b8d0ea;
  --ak-muted:#8aaccc;
  --ak-primary:#00D4AA;
  --ak-primary-2:#00e6b8;
  --ak-on-primary:#0B3D6B;
  --ak-primary-soft:rgba(0,212,170,.18);
  --ak-border:rgba(232,240,254,.15);
  --ak-divider:rgba(232,240,254,.10);
  --ak-track:rgba(232,240,254,.08);
  --ak-track-strong:rgba(232,240,254,.20);
  --ak-header-bg:rgba(11,61,107,.78);
  --ak-tabbar-bg:rgba(11,61,107,.92);
  --ak-radius:18px;
  --ak-r-3:18px;
  --ak-elev-1:0 2px 8px rgba(0,0,0,.20);
  --ak-elev-2:0 8px 24px rgba(0,0,0,.22);
  --ak-elev-3:0 16px 40px rgba(0,0,0,.30);
  --ak-primary-shadow:0 8px 20px rgba(0,212,170,.35);
}

/* ===== 导航大标题 ===== */
.nav-large{ padding:20px 4px 16px; }
.nav-large h1{ font-size:28px; font-weight:800; margin:0 0 4px; letter-spacing:-.02em; }
.nav-large .sub{ font-size:14px; color:var(--ak-text-2); font-weight:500; }

/* ===== 画图页 ===== */
.graph-card{
  background:var(--ocean-card);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25);
  border-radius:var(--ocean-radius);
  padding:18px;
  box-shadow:0 4px 20px rgba(0,0,0,.15);
  color:#0B3D6B;
}
.graph-form{
  display:flex; align-items:center; gap:10px; margin-bottom:10px;
}
.graph-label{
  font-size:20px; font-weight:800; color:#0B3D6B;
}
.graph-input{
  flex:1; border:2px solid rgba(11,61,107,.20); border-radius:12px;
  padding:10px 14px; font-size:18px; font-weight:700; font-family:monospace;
  background:rgba(255,255,255,.7); color:#0B3D6B; outline:none;
}
.graph-input:focus{ border-color:var(--ocean-green); box-shadow:0 0 0 3px var(--ocean-glow); }
.graph-btn{
  background:linear-gradient(135deg,var(--ocean-green),#00e6b8);
  color:#0B3D6B; font-size:16px; padding:10px 20px; border-radius:14px;
  box-shadow:0 4px 12px var(--ocean-glow); min-height:44px;
}
.graph-btn:active{ transform:scale(.95); }
.graph-hint{
  font-size:12px; color:rgba(11,61,107,.55); margin-bottom:12px; letter-spacing:.3px;
}
.graph-canvas-wrap{
  background:rgba(255,255,255,.6); border-radius:12px; padding:4px;
  border:1px solid rgba(11,61,107,.12); margin-bottom:10px;
}
#graphCanvas{ display:block; width:100%; height:auto; border-radius:10px; }
.graph-info{
  font-size:14px; font-weight:700; color:#0B3D6B; text-align:center;
  padding:6px; background:rgba(0,212,170,.12); border-radius:10px;
}

/* ===== 画图导出栏 ===== */
.graph-export-bar{
  display:flex; gap:8px; margin-top:10px;
}
.export-btn{
  flex:1; font-size:13px; padding:8px 10px; min-height:auto;
  background:rgba(255,255,255,.5); color:#0B3D6B; border:1px solid rgba(0,212,170,.3);
  border-radius:12px; font-weight:700; cursor:pointer; transition:all .12s;
}
.export-btn:active{ background:var(--ocean-green); color:#fff; transform:scale(.96); }

/* ===== 画图缩放键 ===== */
.graph-zoom-bar{
  display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:8px;
}
.zoom-btn{
  width:36px; height:36px; border-radius:50%; border:2px solid rgba(0,212,170,.4);
  background:rgba(255,255,255,.6); color:#0B3D6B; font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:all .12s;
}
.zoom-btn:active{ transform:scale(.9); background:var(--ocean-green); color:#fff; }
.zoom-label{
  font-size:14px; font-weight:800; color:#0B3D6B; min-width:32px; text-align:center;
}

/* ===== 画图颜色条 + 多线 ===== */
.graph-color-bar{
  display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap;
}
.color-label{ font-size:12px; font-weight:700; color:rgba(11,61,107,.6); }
.color-picker{
  width:34px; height:34px; border:2px solid rgba(0,212,170,.4); border-radius:50%;
  padding:2px; cursor:pointer; background:transparent;
}
.add-line-btn, .clear-lines-btn{ font-size:12px; padding:5px 12px; min-height:auto; }
.graph-curve-list{
  display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; min-height:22px;
}
.curve-tag{
  display:inline-flex; align-items:center; gap:4px;
  font-size:11px; font-weight:700; padding:3px 8px; border-radius:10px;
  background:rgba(255,255,255,.6); border:1px solid rgba(11,61,107,.15);
  cursor:pointer; transition:all .12s;
}
.curve-tag .dot{ width:10px; height:10px; border-radius:50%; flex:0 0 auto; }
.curve-tag .del-curve{ font-size:14px; opacity:.4; cursor:pointer; }
.curve-tag .del-curve:hover{ opacity:1; }
.curve-tag.active{ box-shadow:0 0 0 2px var(--ocean-green); }

/* ===== Notebook 实验室风格 ===== */
.notebook-toolbar{
  display:flex; align-items:center; gap:10px; margin-bottom:12px;
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:12px;
  padding:10px 14px; box-shadow:0 2px 10px rgba(0,0,0,.10);
}
.notebook-title{ font-size:15px; font-weight:800; color:#0B3D6B; flex:1; }
.notebook-clear-btn{ font-size:13px; padding:6px 14px; min-height:auto; }
.notebook-cells{
  display:flex; flex-direction:column; gap:8px; margin-bottom:14px;
  min-height:120px;
}
.notebook-cell{
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:14px;
  padding:12px 14px; box-shadow:0 2px 10px rgba(0,0,0,.10);
  display:flex; align-items:center; gap:12px;
  animation:ak-fade .2s ease; cursor:grab;
  transition:transform .12s, box-shadow .12s;
}
.notebook-cell:active{ cursor:grabbing; transform:scale(.98); }
.notebook-cell .cell-emoji{ font-size:28px; flex:0 0 auto; }
.notebook-cell .cell-body{ flex:1; min-width:0; }
.notebook-cell .cell-name{ font-size:14px; font-weight:700; color:#0B3D6B; }
.notebook-cell .cell-desc{ font-size:11px; color:rgba(11,61,107,.6); margin-top:2px; }
.notebook-cell .cell-del{
  cursor:pointer; font-size:18px; opacity:.4; color:#0B3D6B;
  transition:opacity .12s; flex:0 0 auto;
}
.notebook-cell .cell-del:hover{ opacity:1; }
.notebook-cell .cell-drag{
  font-size:16px; opacity:.3; color:#0B3D6B; cursor:grab; flex:0 0 auto;
}
.notebook-footer{
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:14px;
  padding:14px; box-shadow:0 2px 10px rgba(0,0,0,.10);
}
.notebook-run-btn{
  width:100%; background:linear-gradient(135deg,var(--ocean-green),#00e6b8);
  color:#0B3D6B; font-size:16px; padding:12px; border-radius:12px;
  box-shadow:0 4px 12px var(--ocean-glow); margin-bottom:10px;
}
.notebook-output{
  background:rgba(255,255,255,.5); border-radius:10px;
  padding:12px; font-size:13px; color:#0B3D6B; line-height:1.5;
  min-height:40px; border:1px solid rgba(11,61,107,.10);
  font-family:monospace; white-space:pre-wrap;
}

/* ===== Notebook 器材箱 ===== */
.notebook-palette{
  margin-bottom:10px;
}
.palette-label{
  font-size:12px; font-weight:700; color:rgba(11,61,107,.5); margin-bottom:6px;
}
.palette-items{
  display:flex; flex-wrap:wrap; gap:6px;
}
.palette-btn{
  border:1px solid rgba(0,212,170,.35); background:rgba(255,255,255,.5);
  color:#0B3D6B; font-size:12px; font-weight:700; padding:6px 12px;
  border-radius:20px; cursor:pointer; transition:all .12s;
}
.palette-btn:active{ background:var(--ocean-green); color:#fff; transform:scale(.95); }

/* ===== 拍照页 ===== */
.cam-mode{
  display:flex; gap:10px; margin-bottom:16px;
}
.mode-btn{
  flex:1; border:2px solid rgba(232,240,254,.25); background:transparent;
  color:var(--ak-text-2); font-size:15px; font-weight:700; padding:10px;
  border-radius:14px; cursor:pointer; transition:all .15s;
}
.mode-btn.active{
  background:var(--ocean-green); color:#0B3D6B; border-color:var(--ocean-green);
  box-shadow:0 4px 12px var(--ocean-glow);
}
.cam-btn{
  display:block; width:100%; background:linear-gradient(135deg,var(--ocean-orange),#ff9a6a);
  color:#fff; font-size:20px; padding:16px; border-radius:16px;
  box-shadow:0 6px 20px rgba(255,127,80,.35); margin-bottom:16px;
}
.cam-btn:active{ transform:scale(.97); }
.cam-result{
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:var(--ocean-radius);
  padding:18px; min-height:100px; color:#0B3D6B; box-shadow:0 4px 20px rgba(0,0,0,.10);
}
.cam-placeholder{ text-align:center; color:rgba(11,61,107,.4); font-size:14px; padding:20px 0; }
.cam-answer{ font-size:15px; line-height:1.6; font-weight:600; }
.cam-answer .highlight{ color:var(--ocean-green); font-weight:800; }

/* ===== 我的页 ===== */
.login-card{
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:var(--ocean-radius);
  padding:24px; text-align:center; box-shadow:0 4px 20px rgba(0,0,0,.10);
}
.login-avatar{ font-size:56px; margin-bottom:12px; }
.login-input{
  display:block; width:100%; border:2px solid rgba(11,61,107,.20); border-radius:12px;
  padding:12px 14px; font-size:16px; margin-bottom:10px; background:rgba(255,255,255,.7);
  color:#0B3D6B; outline:none;
}
.login-input:focus{ border-color:var(--ocean-green); box-shadow:0 0 0 3px var(--ocean-glow); }
.login-btns{
  display:flex; gap:10px; margin-bottom:8px;
}
.login-btns .login-btn{
  flex:1; font-size:16px; padding:12px; border-radius:14px;
}
.login-btn{
  width:100%; background:linear-gradient(135deg,var(--ocean-green),#00e6b8);
  color:#0B3D6B; font-size:16px; padding:12px; border-radius:14px;
  box-shadow:0 4px 12px var(--ocean-glow);
}
.login-tip{
  text-align:center; font-size:13px; font-weight:600; min-height:20px;
  margin-top:4px;
}
.profile-header{
  display:flex; align-items:center; gap:14px; margin-bottom:20px;
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:var(--ocean-radius);
  padding:18px; box-shadow:0 4px 20px rgba(0,0,0,.10);
}
.profile-avatar{ font-size:48px; }
.profile-name{ font-size:20px; font-weight:800; color:#0B3D6B; }
.logout-btn{ display:block; width:100%; margin-top:16px; color:var(--ak-text-2); }

/* ===== 历史记录卡片 ===== */
.history-area{ margin-top:16px; }
.history-list{ display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.history-card{
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:14px;
  padding:14px; box-shadow:0 2px 10px rgba(0,0,0,.10);
}
.history-head{ font-size:13px; font-weight:700; color:#0B3D6B; display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.history-time{ font-size:11px; font-weight:500; color:rgba(11,61,107,.5); margin-left:auto; }
.history-label{ font-size:13px; color:rgba(11,61,107,.7); margin-bottom:6px; font-weight:600; }
.history-img{ width:100%; border-radius:10px; border:1px solid rgba(11,61,107,.10); margin-top:4px; }
.history-report{ font-size:12px; color:#0B3D6B; background:rgba(255,255,255,.5); border-radius:8px; padding:10px; white-space:pre-wrap; line-height:1.4; margin:4px 0 0; font-family:monospace; }
.back-btn{ display:block; width:100%; font-size:14px; padding:10px; border-radius:12px; color:var(--ak-text-2); }
@keyframes bubble-up{
  0%{ transform:translateY(0); opacity:0; }
  50%{ opacity:1; }
  100%{ transform:translateY(-40px); opacity:0; }
}
.bubble{
  position:fixed; pointer-events:none; font-size:14px; color:rgba(0,212,170,.4);
  animation:bubble-up 2s ease-out forwards; z-index:100;
}

/* ===== 聊天 ===== */
.chat-box{
  background:var(--ocean-card);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25);
  border-radius:var(--ocean-radius);
  padding:16px;
  display:flex;
  flex-direction:column;
  height:calc(100vh - 200px);
  max-height:520px;
}
.chat-msgs{
  flex:1;
  overflow-y:auto;
  padding:8px 4px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.chat-msg{
  max-width:85%;
  padding:10px 14px;
  border-radius:14px;
  font-size:15px;
  line-height:1.5;
  word-break:break-word;
  animation:ak-fade .25s ease;
}
.chat-msg.ai{
  align-self:flex-start;
  background:var(--ak-primary-soft);
  color:var(--ak-text);
  border-bottom-left-radius:4px;
}
.chat-msg.user{
  align-self:flex-end;
  background:var(--ak-primary);
  color:var(--ak-on-primary);
  border-bottom-right-radius:4px;
}
.chat-msg.thinking{
  align-self:flex-start;
  background:var(--ak-track);
  color:var(--ak-text-2);
  font-style:italic;
}
.chat-form{
  display:flex;
  gap:8px;
  margin-top:10px;
}
.chat-input{
  flex:1;
  border:1px solid var(--ak-border);
  border-radius:12px;
  padding:10px 14px;
  font-size:15px;
  background:rgba(232,240,254,.06);
  color:var(--ak-text);
  outline:none;
}
.chat-input::placeholder{ color:var(--ak-muted); }
.chat-btn{
  white-space:nowrap;
  background:var(--ak-primary);
  color:var(--ak-on-primary);
  border:none;
  border-radius:12px;
  padding:10px 20px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
}
.chat-btn:disabled{ opacity:.5; cursor:not-allowed; }

/* ===== 留言板 ===== */
.board-box{
  background:var(--ocean-card); backdrop-filter:blur(8px);
  border:1px solid rgba(232,240,254,.25); border-radius:var(--ocean-radius);
  padding:18px; box-shadow:0 4px 20px rgba(0,0,0,.15);
}
.board-form{
  display:flex; flex-direction:column; gap:8px; margin-bottom:16px;
}
.board-input{
  width:100%; border:2px solid rgba(11,61,107,.20); border-radius:12px;
  padding:10px 14px; font-size:16px; background:rgba(255,255,255,.7);
  color:#0B3D6B; outline:none;
}
.board-input:focus{ border-color:var(--ocean-green); box-shadow:0 0 0 3px var(--ocean-glow); }
.board-btn{
  background:linear-gradient(135deg,var(--ocean-green),#00e6b8);
  color:#0B3D6B; font-size:16px; padding:12px; border-radius:14px;
  box-shadow:0 4px 12px var(--ocean-glow);
}
.board-list{
  display:flex; flex-direction:column; gap:8px; min-height:80px;
}
.board-item{
  display:flex; align-items:flex-start; gap:10px;
  background:rgba(255,255,255,.55); border-radius:14px;
  padding:12px; border:1px solid rgba(11,61,107,.08);
  animation:ak-fade .2s ease;
}
.board-avatar{
  width:36px; height:36px; border-radius:50%; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800; color:#fff;
}
.board-body{ flex:1; min-width:0; }
.board-name{ font-size:13px; font-weight:700; color:#0B3D6B; display:flex; align-items:center; gap:6px; }
.board-time{ font-size:11px; font-weight:500; color:rgba(11,61,107,.45); }
.board-text{ font-size:14px; color:#0B3D6B; margin-top:3px; line-height:1.4; word-break:break-word; }
.board-del{
  cursor:pointer; font-size:16px; opacity:.35; color:#0B3D6B;
  transition:opacity .12s; flex:0 0 auto; padding:2px;
}
.board-del:hover{ opacity:1; }
