/* ==========================================================================
   ONBOARDING SYSTEM - CSS Styles
   ========================================================================== */

/* --- OVERLAY Y BACKDROP --- */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- MODAL PRINCIPAL --- */
.onboarding-modal {
    background: linear-gradient(145deg, #1a2235 0%, #0d1117 100%);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 20px;
    box-shadow:
        0 0 40px rgba(0, 210, 255, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.onboarding-overlay.active .onboarding-modal {
    transform: scale(1) translateY(0);
}

/* Scrollbar personalizada */
.onboarding-modal::-webkit-scrollbar {
    width: 6px;
}

.onboarding-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.onboarding-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.3);
    border-radius: 3px;
}

/* --- HEADER DEL MODAL --- */
.onboarding-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    position: relative;
}

.onboarding-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.3), transparent);
}

.onboarding-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.5));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(0, 210, 255, 0.8));
        transform: scale(1.05);
    }
}

.onboarding-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.onboarding-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- PROGRESS BAR --- */
.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 1.25rem 2rem;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.progress-dot.active {
    background: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.progress-dot.completed {
    background: #00ff9d;
    box-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
}

.progress-dot.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5rem;
    color: #000;
}

/* --- CONTENIDO DEL STEP --- */
.onboarding-content {
    padding: 1.5rem 2rem;
    min-height: 200px;
}

/* --- FORMULARIO STEP 2 --- */
.onboarding-form-group {
    margin-bottom: 1.25rem;
}

.onboarding-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.onboarding-input,
.onboarding-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.onboarding-input:focus,
.onboarding-select:focus {
    outline: none;
    border-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.onboarding-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.onboarding-select option {
    background: #1a2235;
    color: #fff;
}

/* --- HIGHLIGHT DE HERRAMIENTAS (STEP 3) --- */
.highlight-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.highlight-tool-card {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.highlight-tool-card:hover {
    background: rgba(0, 210, 255, 0.15);
    transform: translateY(-3px);
}

.highlight-tool-icon {
    font-size: 2rem;
    color: #00d2ff;
    margin-bottom: 0.5rem;
    display: block;
}

.highlight-tool-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.highlight-tool-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

/* --- MISIONES (STEP 4) --- */
.mission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mission-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mission-item:hover {
    background: rgba(0, 210, 255, 0.05);
    border-left-color: #00d2ff;
}

.mission-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mission-item.completed .mission-checkbox {
    background: #00ff9d;
    border-color: #00ff9d;
}

.mission-item.completed .mission-checkbox::after {
    content: '✓';
    color: #000;
    font-weight: bold;
}

.mission-text {
    flex: 1;
}

.mission-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.mission-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.mission-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- FOOTER DEL MODAL --- */
.onboarding-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.onboarding-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.onboarding-btn-skip {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.onboarding-btn-skip:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.onboarding-btn-primary {
    background: linear-gradient(135deg, #00d2ff 0%, #00ff9d 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.onboarding-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 210, 255, 0.4);
}

.onboarding-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.onboarding-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- ANIMACIONES DE ENTRADA/SALIDA --- */
.step-content {
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 576px) {
    .onboarding-modal {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }

    .onboarding-header {
        padding: 1.5rem 1.25rem 1rem;
    }

    .onboarding-icon {
        font-size: 3rem;
    }

    .onboarding-title {
        font-size: 1.4rem;
    }

    .onboarding-content {
        padding: 1rem 1.25rem;
    }

    .highlight-tools-grid {
        grid-template-columns: 1fr;
    }

    .onboarding-footer {
        flex-direction: column-reverse;
        padding: 1rem 1.25rem 1.5rem;
    }

    .onboarding-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- CONFETTI ANIMATION (FINAL STEP) --- */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}