/* css/base.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #020617;
  --bg-panel: rgba(8, 20, 40, 0.72);
  --bg-panel-solid: #081326;
  --border: rgba(24, 180, 190, 0.35);
  --border-bright: rgba(34, 211, 238, 0.65);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.15);
  --text: #e0f7ff;
  --text-secondary: #7fb3c7;
  --blue: #3b82f6;
  --orange: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --purple: #a855f7;
}

html, body {
  height: 100%;
  min-height: 100vh;
}

body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 35%),
    linear-gradient(180deg, rgba(34,211,238,0.03) 0%, transparent 180px),
    repeating-linear-gradient(90deg, rgba(34,211,238,0.02) 0px, rgba(34,211,238,0.02) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(0deg, rgba(34,211,238,0.02) 0px, rgba(34,211,238,0.02) 1px, transparent 1px, transparent 80px);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(34, 211, 238, 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  background: rgba(8, 20, 40, 0.95);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
  animation: slideIn 0.3s ease;
  min-width: 200px;
}

.toast.error { border-color: rgba(239, 68, 68, 0.5); color: #fecaca; }
.toast.success { border-color: rgba(16, 185, 129, 0.5); color: #a7f3d0; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
