/* ==========================================
   在线工箱 — 全局样式（基于 Tailwind v4 CDN）
   与 Console 设计语言保持一致
   ========================================== */

/* ---- 布局 ---- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
}

/* 嵌入模式：隐藏 header/footer */
body.embed-mode header,
body.embed-mode footer {
  display: none !important;
}
body.embed-mode #app {
  padding: 0 !important;
}

/* ---- 滚动条 ---- */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ---- Code output ---- */
.code-output {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  line-height: 1.6;
  tab-size: 2;
}
.code-output .hl-string { color: #059669; }
.code-output .hl-number { color: #6366f1; }
.code-output .hl-boolean { color: #d97706; }
.code-output .hl-null { color: #dc2626; }
.code-output .hl-key { color: #2563eb; }
.code-output .hl-bracket { color: #6b7280; }
.code-output .hl-error { background: #fef2f2; color: #dc2626; }

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.toast {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  animation: toast-in 0.25s ease;
  pointer-events: auto;
}
.toast-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Tool card grid ---- */
.tool-card {
  transition: all 0.2s ease;
  cursor: pointer;
}
.tool-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.tool-card:active {
  transform: scale(0.97);
}

/* ---- Form controls ---- */
textarea.tool-input {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  resize: vertical;
  min-height: 200px;
  line-height: 1.5;
}
textarea.tool-input:focus {
  outline: none;
  ring: 2px solid #38bdf8;
  border-color: #38bdf8;
}

/* ---- Timestamp section ---- */
