/* ═══ TUTORIAL OVERLAY & MODALS ═══ */

/* Semi-transparent overlay covering the page */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tutFadeIn 0.3s ease;
}

.tutorial-overlay--transparent {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

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

/* Centered modal card */
.tutorial-modal {
    background: linear-gradient(135deg, #1a1d24 0%, #22262f 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: tutSlideUp 0.4s ease;
}

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

.tutorial-modal-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tutorial-modal-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 16px;
}

.tutorial-modal-text strong {
    color: #58b4ff;
}

/* Step indicators */
.tutorial-modal-steps {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.tutorial-step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tutorial-step-indicator--active {
    background: #58b4ff;
    color: #fff;
    border-color: #58b4ff;
    box-shadow: 0 0 12px rgba(88, 180, 255, 0.4);
}

.tutorial-step-indicator--done {
    background: #2ecc71;
    color: #fff;
    border-color: #2ecc71;
}

/* Buttons */
.tutorial-modal-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tutorial-modal-btn--primary {
    background: linear-gradient(135deg, #58b4ff, #3a8fd4);
    color: #fff;
    box-shadow: 0 4px 15px rgba(88, 180, 255, 0.3);
}

.tutorial-modal-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(88, 180, 255, 0.4);
}

.tutorial-modal-btn--primary:active {
    transform: translateY(0);
}

/* Dismiss button */
.tutorial-dismiss {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.tutorial-dismiss:hover {
    color: rgba(255, 255, 255, 0.8);
}

.tutorial-dismiss--fixed {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9002;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-dismiss--fixed:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

/* Pulsing highlight on target elements */
.tutorial-highlight {
    position: relative;
    z-index: 9001 !important;
    animation: tutPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 3px rgba(88, 180, 255, 0.6), 0 0 20px rgba(88, 180, 255, 0.3) !important;
    border-radius: 12px;
}

@keyframes tutPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(88, 180, 255, 0.6), 0 0 20px rgba(88, 180, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(88, 180, 255, 0.3), 0 0 30px rgba(88, 180, 255, 0.5);
    }
}

/* Tooltip speech bubble */
.tutorial-tooltip {
    position: fixed;
    z-index: 9002;
    background: #58b4ff;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(88, 180, 255, 0.4);
    animation: tutBounce 2s ease-in-out infinite;
    pointer-events: none;
}

.tutorial-tooltip--log {
    z-index: 9002;
}

@keyframes tutBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.tutorial-tooltip-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #58b4ff;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 600px) {
    .tutorial-modal {
        padding: 24px 20px;
        margin: 0 12px;
    }

    .tutorial-modal-title {
        font-size: 1.3rem;
    }

    .tutorial-modal-text {
        font-size: 0.88rem;
    }

    .tutorial-modal-btn {
        padding: 11px 24px;
        font-size: 0.95rem;
        width: 100%;
    }

    .tutorial-tooltip {
        font-size: 0.82rem;
        padding: 8px 14px;
    }

    .tutorial-step-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .tutorial-dismiss--fixed {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.78rem;
    }
}
