/* ===== 字体 ===== */
/* 字体通过 HTML 中 <link> 直接引入 fonts.css，加快加载速度 */

/* ===== CSS 变量 ===== */
:root {
  --ink: #1a1a2e;
  --red: #e53e3e;
  --blue: #3182ce;
  --yellow: #fefcbf;
  --paper: #f7f8fa;
  --muted: #e2e8f0;
  --white: #ffffff;
  --shadow-hard: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hard-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-hard-xl: 0 8px 24px rgba(0, 0, 0, 0.1);
  --wobbly-1: 8px;
  --wobbly-2: 10px;
  --wobbly-3: 8px;
  --wobbly-4: 6px;
}

/* ===== 基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: var(--white);
  color: var(--ink);
  padding: 10px 24px;
  border: 1px solid var(--muted);
  border-radius: 8px;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  z-index: 10000;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #f0fff4; border-color: #48bb78; color: #276749; }
.toast.error { background: #fff5f5; border-color: var(--red); color: #c53030; }

/* ===== 抖动 ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.shake { animation: shake 0.4s ease; }

/* 按钮悬停粒子 */
.particle-burst {
  position: absolute;
  pointer-events: none;
  z-index: 10;
}
.particle-burst .dot {
  position: absolute;
  font-size: 12px;
  animation: burstOut 0.7s ease-out forwards;
}
@keyframes burstOut {
  0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* ===== 通用动画 ===== */
@keyframes spinDoodle {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gentleHeartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.08); }
  30% { transform: scale(1); }
  45% { transform: scale(1.06); }
  60% { transform: scale(1); }
}
