/* TUTORIAL STYLES */

/* Tutorial Prompt (initial popup) */
.tutorial-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.tutorial-prompt {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-900) 100%);
    border: 1px solid var(--slate-700);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
}

.tutorial-prompt-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: wave 1s ease-in-out infinite;
}

.tutorial-prompt h2 {
    color: var(--slate-100);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tutorial-prompt p {
    color: var(--slate-300);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tutorial-prompt-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.tutorial-prompt-buttons button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tutorial-prompt-buttons .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.tutorial-prompt-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.tutorial-prompt-buttons .btn-secondary {
    background: transparent;
    color: var(--slate-400);
    border: 1px solid var(--slate-700);
}

.tutorial-prompt-buttons .btn-secondary:hover {
    background: var(--slate-800);
    border-color: var(--slate-600);
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 9998;
    animation: fadeIn 0.3s ease-out;
    pointer-events: none;
}

/* Tutorial Box */
.tutorial-box {
    position: fixed;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #6366f1;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9),
                0 0 0 4px rgba(99, 102, 241, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10001;
    max-width: 550px;
    animation: slideUp 0.3s ease-out;
    pointer-events: auto;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--slate-700);
}

.tutorial-step-indicator {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.tutorial-close {
    background: transparent;
    border: none;
    color: var(--slate-400);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.2s;
    border-radius: 8px;
}

.tutorial-close:hover {
    background: var(--slate-700);
    color: var(--slate-200);
}

.tutorial-content {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.tutorial-content h3 {
    color: var(--slate-100);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tutorial-content p {
    color: var(--slate-300);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tutorial-content ul {
    color: var(--slate-300);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tutorial-content ul li {
    margin-bottom: 0.5rem;
}

.tutorial-content ol {
    color: var(--slate-300);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tutorial-content ol li {
    margin-bottom: 0.75rem;
}

.tutorial-content strong {
    color: var(--slate-100);
    font-weight: 600;
}

.tutorial-mode-card {
    background: var(--slate-700);
    border: 1px solid var(--slate-600);
    border-radius: 12px;
    padding: 1rem;
}

.tutorial-mode-card h4 {
    color: var(--indigo-400);
    margin-bottom: 0.5rem;
}

.tutorial-mode-card p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.tutorial-final-tips {
    background: var(--slate-700);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.tutorial-final-tips h4 {
    color: var(--indigo-400);
    margin-bottom: 1rem;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--slate-700);
}

.tutorial-footer button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tutorial-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.tutorial-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.tutorial-footer .btn-secondary {
    background: transparent;
    color: var(--slate-400);
    border: 1px solid var(--slate-700);
}

.tutorial-footer .btn-secondary:hover {
    background: var(--slate-700);
    border-color: var(--slate-600);
    color: var(--slate-200);
}

/* Tutorial dots indicator */
.tutorial-dots {
    display: flex;
    gap: 0.5rem;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--slate-600);
    transition: all 0.3s;
}

.tutorial-dot.active {
    background: var(--indigo-500);
    width: 24px;
    border-radius: 4px;
}

/* Highlighted element */
.tutorial-highlight {
    position: relative !important;
    z-index: 10000 !important;
    box-shadow: 0 0 0 4px #6366f1 !important,
                0 0 30px rgba(99, 102, 241, 0.8) !important,
                0 0 60px rgba(99, 102, 241, 0.4) !important;
    border-radius: 8px !important;
    background-color: inherit !important;
    animation: pulseGlow 2s ease-in-out infinite !important;
    outline: none !important;
}

/* Alert styles for tutorial */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 4px #6366f1,
                    0 0 30px rgba(99, 102, 241, 0.8),
                    0 0 60px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px #818cf8,
                    0 0 40px rgba(99, 102, 241, 1),
                    0 0 80px rgba(99, 102, 241, 0.6);
    }
}

/* Spotlight effect for highlighted element */
.tutorial-highlight::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 12px;
    z-index: -1;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .tutorial-box {
        max-width: 90vw !important;
        width: 90vw !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
    }

    .tutorial-prompt {
        margin: 1rem;
        padding: 1.5rem;
        max-width: 90vw;
    }

    .tutorial-prompt-icon {
        font-size: 3rem;
    }

    .tutorial-prompt h2 {
        font-size: 1.5rem;
    }

    .tutorial-content {
        max-height: 60vh;
        padding: 1.5rem;
    }

    .tutorial-content h3 {
        font-size: 1.25rem;
    }

    .tutorial-header {
        padding: 1rem;
    }

    .tutorial-footer {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tutorial-footer button {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .tutorial-dots {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .tutorial-box {
        max-width: 95vw !important;
        width: 95vw !important;
    }

    .tutorial-content {
        padding: 1rem;
        max-height: 55vh;
        font-size: 0.9rem;
    }

    .tutorial-content h3 {
        font-size: 1.1rem;
    }

    .tutorial-prompt {
        padding: 1.25rem;
    }

    .tutorial-prompt h2 {
        font-size: 1.25rem;
    }

    .tutorial-step-indicator {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}
