:root {
    color-scheme: dark;

    --bg: #05060a;
    --bg-elevated: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f2f3f7;
    --text-muted: rgba(242, 243, 247, 0.65);

    --accent-1: #7c5cff;
    --accent-2: #33d6ff;
    --accent-3: #ff5cb3;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-glow: 0 0 40px rgba(124, 92, 255, 0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 0.5em;
}

code {
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

/* ─── Фоновая сетка точек (dot-grid.js) ──────────────────────────────────── */

.dot-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ─── Кнопки ──────────────────────────────────────────────────────────────── */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn--ghost:hover {
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn--particle canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

/* ─── Карточки ────────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
}

/* ─── Toasts ──────────────────────────────────────────────────────────────── */

#toast-root {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: rgba(20, 20, 28, 0.9);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 320px;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.toast--success {
    border-color: rgba(51, 214, 137, 0.5);
}

.toast--error {
    border-color: rgba(255, 92, 92, 0.5);
}
