/* ═══════════════════════════════════════════════════════════════
   AION Core Systems — Interactive Tutorial / Guided Tour
   Spotlight overlay + step tooltips + progress bar
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.tut-overlay {
    position: fixed; inset: 0; z-index: 10000;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.tut-overlay.active { pointer-events: auto; }
.tut-overlay.hidden { opacity: 0; pointer-events: none; }

/* ── Backdrop (dark scrim with cutout) ── */
.tut-backdrop {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(0, 0, 0, 0.72);
    transition: opacity 0.35s ease;
    pointer-events: auto;
}

/* ── Spotlight Cutout ── */
.tut-spotlight {
    position: fixed; z-index: 10002;
    border-radius: 12px;
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.72),
        0 0 30px rgba(6, 214, 208, 0.25),
        inset 0 0 0 2px rgba(6, 214, 208, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.tut-spotlight::after {
    content: '';
    position: absolute; inset: -4px;
    border-radius: 14px;
    border: 2px solid rgba(6, 214, 208, 0.35);
    animation: tutPulse 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes tutPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.01); }
}

/* ── Tooltip Card ── */
.tut-tooltip {
    position: fixed; z-index: 10003;
    width: 380px; max-width: calc(100vw - 2rem);
    background: linear-gradient(145deg, rgba(10, 14, 26, 0.97), rgba(15, 20, 35, 0.97));
    border: 1px solid rgba(6, 214, 208, 0.3);
    border-radius: 16px;
    padding: 1.6rem 1.8rem 1.4rem;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(6, 214, 208, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: tutTooltipIn 0.35s ease;
    pointer-events: auto;
    font-family: 'Inter', -apple-system, sans-serif;
}
[data-theme="light"] .tut-tooltip {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.97));
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(13, 148, 136, 0.08);
}
@keyframes tutTooltipIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Tooltip: Step Badge ── */
.tut-step-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.2rem 0.7rem;
    background: linear-gradient(135deg, rgba(6, 214, 208, 0.15), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(6, 214, 208, 0.25);
    border-radius: 99px;
    font-size: 0.65rem; font-weight: 700;
    color: #06d6d0;
    letter-spacing: 0.05em; text-transform: uppercase;
    margin-bottom: 0.75rem;
}
[data-theme="light"] .tut-step-badge { color: #0d9488; }

/* ── Tooltip: Icon ── */
.tut-icon {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    display: block;
}

/* ── Tooltip: Title ── */
.tut-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
[data-theme="light"] .tut-title { color: #0f172a; }

/* ── Tooltip: Description ── */
.tut-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 1.2rem;
}
[data-theme="light"] .tut-desc { color: #475569; }
.tut-desc strong {
    color: #06d6d0;
    font-weight: 600;
}
[data-theme="light"] .tut-desc strong { color: #0d9488; }

/* ── Tooltip: Footer (buttons + progress) ── */
.tut-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.tut-btn {
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.tut-btn--primary {
    background: linear-gradient(135deg, #06d6d0, #7c3aed);
    color: #fff;
}
.tut-btn--primary:hover {
    box-shadow: 0 4px 20px rgba(6, 214, 208, 0.3);
    transform: translateY(-1px);
}
.tut-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}
[data-theme="light"] .tut-btn--ghost {
    border-color: rgba(0, 0, 0, 0.1);
    color: #64748b;
}
.tut-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}
[data-theme="light"] .tut-btn--ghost:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0f172a;
}
.tut-btn--skip {
    background: none; border: none;
    color: #4a6668; font-size: 0.72rem;
    cursor: pointer; padding: 0.3rem 0.5rem;
    transition: color 0.2s;
}
.tut-btn--skip:hover { color: #94a3b8; }
[data-theme="light"] .tut-btn--skip { color: #94a3b8; }
[data-theme="light"] .tut-btn--skip:hover { color: #475569; }

.tut-btns {
    display: flex; gap: 0.5rem; align-items: center;
}

/* ── Progress Dots ── */
.tut-progress {
    display: flex; gap: 5px; align-items: center;
}
.tut-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}
[data-theme="light"] .tut-dot { background: rgba(0, 0, 0, 0.1); }
.tut-dot.active {
    background: #06d6d0;
    box-shadow: 0 0 8px rgba(6, 214, 208, 0.4);
    width: 18px;
    border-radius: 4px;
}
.tut-dot.done {
    background: rgba(6, 214, 208, 0.4);
}

/* ── Welcome (Full-Screen first step) ── */
.tut-welcome {
    position: fixed; inset: 0; z-index: 10005;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    animation: tutFadeIn 0.4s ease;
}
[data-theme="light"] .tut-welcome {
    background: rgba(255, 255, 255, 0.9);
}
.tut-welcome-card {
    text-align: center;
    max-width: 480px;
    padding: 3rem 2.5rem;
    animation: tutTooltipIn 0.5s ease 0.15s both;
}
.tut-welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: tutBounce 2s ease-in-out infinite;
}
@keyframes tutBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.tut-welcome-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #e2e8f0, #06d6d0);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .tut-welcome-title {
    background: linear-gradient(135deg, #0f172a, #0d9488);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tut-welcome-desc {
    font-size: 1rem; color: #94a3b8;
    line-height: 1.7; margin-bottom: 2rem;
}
[data-theme="light"] .tut-welcome-desc { color: #475569; }
.tut-welcome-actions {
    display: flex; gap: 1rem; justify-content: center;
    flex-wrap: wrap;
}

@keyframes tutFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Tutorial CTA Button in Topbar ── */
.tut-trigger-btn {
    display: flex; align-items: center; justify-content: center;
    padding: 0.3rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    width: 28px; height: 28px;
}
.tut-trigger-btn:hover {
    color: #06d6d0;
    border-color: rgba(6, 214, 208, 0.3);
    background: rgba(6, 214, 208, 0.06);
    box-shadow: 0 0 12px rgba(6, 214, 208, 0.1);
}
[data-theme="light"] .tut-trigger-btn {
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .tut-trigger-btn:hover {
    color: #0d9488; border-color: rgba(13, 148, 136, 0.3);
    background: rgba(13, 148, 136, 0.06);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .tut-tooltip { width: calc(100vw - 1rem); left: 0.5rem !important; }
}
