:root {
    --bg: #050508;
    --bg-alt: #0a0a0f;
    --surface: rgba(15, 15, 20, 0.75);
    --surface-light: rgba(21, 21, 28, 0.5);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --text: #fff;
    --text-muted: #5a5a6a;
    --text-dim: #707080;
    --text-subtle: #8b8b9a;
    --accent: #4a76f0;
    --accent-hover: #3e6ae1;
    --accent-glow: rgba(74, 118, 240, 0.3);
    --accent-2: #9d4edd;
    --success: #7effc0;
    --danger: #ff6b6b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === КНОПКИ === */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px var(--accent-glow);
}
.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(74, 118, 240, 0.45);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg {
    width: 18px; height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.btn-secondary {
    background: rgba(42, 42, 53, 0.8);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn-secondary:hover:not(:disabled) {
    background: rgba(58, 58, 69, 0.9);
    box-shadow: none;
}

/* === ТОСТ === */
.toast {
    position: fixed;
    bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 42, 26, 0.9);
    backdrop-filter: blur(20px);
    color: var(--success);
    border: 1px solid rgba(126, 255, 192, 0.2);
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* === ОШИБКИ / ЛОАДЕР === */
.error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 14px;
    padding: 12px;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 10px;
    display: none;
}
.loader {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    display: none;
}

/* === СТЕКЛЯННАЯ КАРТОЧКА === */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-strong);
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* === АНИМАЦИИ === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cardAppear {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes stepIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.9; }
}