/* Tutorial Overlay Styles */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9998;
    display: none;
    animation: fadeIn 0.3s ease;
}

.tutorial-overlay.active {
    display: block;
}

/* Tutorial Spotlight */
.tutorial-spotlight {
    position: absolute;
    border: 3px solid #4A90E2;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75),
        0 0 40px rgba(74, 144, 226, 0.6),
        inset 0 0 40px rgba(74, 144, 226, 0.3);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75),
            0 0 40px rgba(74, 144, 226, 0.6),
            inset 0 0 40px rgba(74, 144, 226, 0.3);
    }

    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75),
            0 0 60px rgba(74, 144, 226, 0.8),
            inset 0 0 60px rgba(74, 144, 226, 0.5);
    }
}

/* Tutorial Tooltip */
.tutorial-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 16px;
    padding: 25px 30px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(74, 144, 226, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Tooltip arrow positions */
.tutorial-tooltip.arrow-top::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 12px 12px 12px;
    border-color: transparent transparent #fff transparent;
}

.tutorial-tooltip.arrow-bottom::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 12px 12px 0 12px;
    border-color: #fff transparent transparent transparent;
}

.tutorial-tooltip.arrow-left::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 12px 12px 0;
    border-color: transparent #fff transparent transparent;
}

.tutorial-tooltip.arrow-right::before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 0 12px 12px;
    border-color: transparent transparent transparent #fff;
}

/* Tooltip header */
.tutorial-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.tutorial-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4A90E2, #50E3C2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.tutorial-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    background: linear-gradient(135deg, #4A90E2, #50E3C2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tooltip content */
.tutorial-content {
    margin-bottom: 20px;
}

.tutorial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 12px;
}

.tutorial-highlight {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.1));
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #4A90E2;
    font-weight: 600;
    color: #333;
    margin-top: 10px;
}

/* Tutorial progress */
.tutorial-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: linear-gradient(135deg, #4A90E2, #50E3C2);
    width: 30px;
    border-radius: 5px;
}

/* Tutorial buttons */
.tutorial-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.tutorial-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.tutorial-btn-skip {
    background: transparent;
    color: #999;
    border: 2px solid #ddd;
}

.tutorial-btn-skip:hover {
    background: #f5f5f5;
    color: #666;
    border-color: #ccc;
}

.tutorial-btn-prev {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
}

.tutorial-btn-prev:hover {
    background: #e0e0e0;
}

.tutorial-btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tutorial-btn-next,
.tutorial-btn-finish {
    background: linear-gradient(135deg, #4A90E2, #50E3C2);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.tutorial-btn-next:hover,
.tutorial-btn-finish:hover {
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
}

/* Welcome screen */
.tutorial-welcome {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.tutorial-welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4A90E2, #50E3C2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
}

.tutorial-welcome h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4A90E2, #50E3C2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tutorial-welcome p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

.tutorial-welcome-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tutorial-tooltip {
        max-width: 90%;
        padding: 20px;
        left: 5% !important;
        right: 5% !important;
        width: auto !important;
    }

    .tutorial-title {
        font-size: 1.1rem;
    }

    .tutorial-text {
        font-size: 0.95rem;
    }

    .tutorial-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .tutorial-welcome {
        padding: 30px 20px;
    }

    .tutorial-welcome h2 {
        font-size: 1.6rem;
    }

    .tutorial-welcome p {
        font-size: 1rem;
    }

    .tutorial-buttons {
        flex-direction: column;
    }

    .tutorial-btn-skip {
        order: 3;
    }
}

/* Bounce animation for important elements */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.tutorial-bounce {
    animation: bounce 2s infinite;
}