@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

html { font-size: 14px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }

h1 { font-size: 22px; font-weight: 700; color: var(--text); }
h2 { font-size: 16px; font-weight: 600; color: var(--text); }

.mono { font-family: var(--font-mono); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===== Flash animation ===== */
@keyframes flashOnline {
  0%   { background: rgba(34,197,94,.15); }
  100% { background: transparent; }
}
@keyframes flashOffline {
  0%   { background: rgba(239,68,68,.15); }
  100% { background: transparent; }
}
.flash-online  { animation: flashOnline  1.5s ease-out; }
.flash-offline { animation: flashOffline 1.5s ease-out; }

/* ===== Toast ===== */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  max-width: 320px;
}
@keyframes toastIn {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: translateY(0); }
}
.toast.success { background: #22C55E; }
.toast.error   { background: #EF4444; }
.toast.info    { background: #6C63FF; }
.toast.warning { background: #F59E0B; }

/* ===== Overlay / Dialog ===== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 8000;
  backdrop-filter: blur(2px);
}
.dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px; width: 380px; max-width: 90vw;
  box-shadow: var(--shadow-lg);
}
.dialog-title  { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.dialog-body   { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
