/* 知游工具箱 · 公共样式 */

:root {
  --blue: #2563EB;
  --blue-deep: #1D4ED8;
  --blue-light: #3B82F6;
  --blue-soft: #EAF1FF;
  --blue-border: #C9D8F8;
  --bg: #EEF3FC;
  --card: #FFFFFF;
  --card-hover: #F4F8FF;
  --text: #1E2A44;
  --text-2: #5B6B8C;
  --text-3: #94A3B8;
  --border: #E3EAF6;
  --border-light: #EDF1F9;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(30,42,68,0.06), 0 1px 2px rgba(30,42,68,0.04);
  --shadow-md: 0 4px 12px rgba(30,42,68,0.08), 0 2px 4px rgba(30,42,68,0.04);
  --shadow-lg: 0 12px 32px rgba(30,42,68,0.12), 0 4px 8px rgba(30,42,68,0.06);
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(37,99,235,.13), transparent 60%),
    radial-gradient(700px 400px at 102% 6%, rgba(59,130,246,.10), transparent 55%),
    linear-gradient(180deg, #F4F8FF 0%, #EDF3FC 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* 背景装饰 */
.deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.deco span {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 600;
  color: rgba(37,99,235,.055);
  user-select: none;
  white-space: pre;
}
.deco .d1 { top: 8%; left: 6%; font-size: 64px; }
.deco .d2 { bottom: 10%; right: 5%; font-size: 76px; }
.deco .d3 { top: 42%; right: 12%; font-size: 42px; }
.deco .d4 { bottom: 16%; left: 10%; font-size: 40px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  background: var(--blue-light);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--text-3);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text-3);
}

/* Toast 提示 */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { background: #16A34A; }
.toast.error { background: #DC2626; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

/* 返回首页链接 */
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.home-link svg { width: 15px; height: 15px; }
.home-link:hover {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--card-hover);
}

/* 响应式：手机端 */
@media (max-width: 768px) {
  .deco .d1 { font-size: 42px; }
  .deco .d2 { font-size: 52px; }
  .deco .d3 { font-size: 28px; }
  .deco .d4 { font-size: 28px; }
}
