
/* === NEXUS UI KIT v2.0 === */

/* 1. TOAST NOTIFICATIONS */
#toast-container {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    z-index: 100000; display: flex; flex-direction: column; gap: 10px;
    width: 90%; max-width: 400px; pointer-events: none;
}

.nexus-toast {
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #fff;
    padding: 15px; border-radius: 12px;
    color: #fff; font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: space-between;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.nexus-toast.success { border-left-color: var(--n-green); box-shadow: 0 5px 20px rgba(57, 255, 20, 0.1); }
.nexus-toast.error { border-left-color: var(--n-red); box-shadow: 0 5px 20px rgba(255, 0, 60, 0.15); }
.nexus-toast.info { border-left-color: var(--n-cyan); box-shadow: 0 5px 20px rgba(0, 243, 255, 0.1); }

.toast-content { display: flex; flex-direction: column; gap: 4px; }
.toast-title { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.toast-msg { font-size: 12px; color: #a0aec0; line-height: 1.4; }

.toast-close {
    background: transparent; border: none; color: #555;
    font-size: 18px; cursor: pointer; padding: 5px;
}

@keyframes toastSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastFadeOut { to { transform: translateY(-10px); opacity: 0; } }

/* 2. GLOBAL LOADER */
#global-loader {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px); z-index: 99999;
    display: none; align-items: center; justify-content: center;
    flex-direction: column; gap: 20px;
    opacity: 0; transition: opacity 0.3s;
}
#global-loader.visible { display: flex; opacity: 1; }

.scanner {
    width: 60px; height: 60px; border-radius: 50%;
    border: 2px solid transparent; border-top-color: var(--n-cyan);
    animation: spin 1s linear infinite; position: relative;
}
.scanner::before {
    content: ''; position: absolute; inset: 5px; border-radius: 50%;
    border: 2px solid transparent; border-top-color: var(--n-blue);
    animation: spin 1.5s linear infinite reverse;
}
.loader-text {
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    color: var(--n-cyan); font-weight: 700; letter-spacing: 2px;
    animation: pulse 1s infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }


/* ============================================================
   🛸 ONBOARDING SYSTEM (FTUE)
   ============================================================ */

#onboarding-overlay {
    position: fixed; inset: 0; z-index: 99990; /* Поверх всего, кроме загрузчика */
    display: flex; flex-direction: column; justify-content: flex-end;
    pointer-events: auto; /* Блокируем клики по экрану под маской */
    transition: opacity 0.5s ease;
}

#onboarding-overlay.hidden { display: none; opacity: 0; pointer-events: none; }

/* 1. Световая маска */
.onboarding-mask {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
}

/* 2. Контейнер UI (Сам терминал и Персонаж) */
.onboarding-ui {
    position: relative; z-index: 10; width: 100%; max-width: 500px;
    margin: 0 auto; display: flex; flex-direction: column; align-items: center;
    padding-bottom: 20px;
}

/* 3. Аватар Черепахи */
.onboarding-character-wrap {
    position: relative; width: 120px; height: 120px;
    margin-bottom: -15px; /* Чтобы она "сидела" на окне диалога */
    animation: floatAvatar 3s ease-in-out infinite;
}

.onboarding-avatar { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 -5px 15px rgba(0, 243, 255, 0.3)); }

.char-glow {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,243,255,0.4) 0%, transparent 70%);
    z-index: -1; animation: pulseGlow 2s infinite;
}

/* 4. Окно Диалога (Sci-Fi Glass) */
.onboarding-dialog-box {
    width: 90%; background: rgba(5, 7, 10, 0.95);
    border: 1px solid rgba(0, 243, 255, 0.3); border-radius: 16px;
    padding: 20px; box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 243, 255, 0.1);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

.dialog-header { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: #5a6a85; margin-bottom: 12px; font-weight: 800; text-transform: uppercase; }
.dialog-tag { color: var(--n-cyan); letter-spacing: 1px; }

#onboarding-title { font-size: 16px; font-weight: 900; color: #fff; margin-bottom: 8px; letter-spacing: 1px; }
#onboarding-text { font-size: 13px; line-height: 1.5; color: #a0aec0; min-height: 60px; }
#onboarding-text b { color: var(--n-cyan); font-weight: 900; }

/* 5. Кнопки навигации */
.onboarding-actions { display: flex; justify-content: space-between; margin-top: 15px; }

.btn-skip { background: transparent; border: none; color: #5a6a85; font-size: 11px; font-weight: 800; cursor: pointer; }
.btn-next { background: var(--n-cyan); color: #000; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 900; font-size: 12px; cursor: pointer; box-shadow: 0 0 15px rgba(0,243,255,0.3); display: flex; align-items: center; gap: 8px; }
.btn-next:active { transform: scale(0.95); }

/* Анимации */
@keyframes floatAvatar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeInText { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

