/* ========================================================
   ENGINEX DEVS - ONBOARDING MODAL & GUIDED TOUR STYLES
   Cyberpunk Glassmorphic Aesthetics v7.0.0
======================================================== */

:root {
    --tour-theme-color: #a855f7;
    --tour-theme-rgb: 168, 85, 247;
}

/* --- 1. MODAL DE BIENVENIDA (¿QUÉ BUSCAS HOY?) --- */
.enginex-tour-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(7, 5, 13, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.enginex-tour-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.enginex-tour-modal {
    background: linear-gradient(135deg, rgba(22, 16, 38, 0.95) 0%, rgba(13, 10, 24, 0.98) 100%);
    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(168, 85, 247, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    padding: 36px 32px 28px 32px;
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

.enginex-tour-modal::-webkit-scrollbar {
    width: 6px;
}
.enginex-tour-modal::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.4);
    border-radius: 6px;
}

.enginex-tour-modal-backdrop.active .enginex-tour-modal {
    transform: scale(1) translateY(0);
}

.enginex-tour-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s ease;
}

.enginex-tour-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    transform: rotate(90deg);
}

.enginex-tour-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.enginex-tour-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.enginex-tour-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.enginex-tour-modal-subtitle {
    color: #94a3b8;
    font-size: 14.5px;
    margin: 0;
    line-height: 1.5;
}

/* Opciones / Tarjetas por Categoría */
.enginex-tour-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.enginex-tour-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enginex-tour-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, var(--card-glow, rgba(168, 85, 247, 0.15)), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enginex-tour-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px var(--card-shadow, rgba(168, 85, 247, 0.15));
}

.enginex-tour-card:hover::before {
    opacity: 1;
}

.enginex-tour-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.enginex-tour-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: transform 0.3s ease;
}

.enginex-tour-card:hover .enginex-tour-card-icon {
    transform: scale(1.1);
}

.enginex-tour-card-time {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Colores de Tarjetas por Servicio */
.enginex-tour-card.bot {
    --card-glow: rgba(168, 85, 247, 0.2);
    --card-shadow: rgba(168, 85, 247, 0.25);
}
.enginex-tour-card.bot .enginex-tour-card-icon {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}
.enginex-tour-card.bot:hover {
    border-color: rgba(168, 85, 247, 0.6);
}

.enginex-tour-card.store {
    --card-glow: rgba(0, 242, 255, 0.2);
    --card-shadow: rgba(0, 242, 255, 0.25);
}
.enginex-tour-card.store .enginex-tour-card-icon {
    background: rgba(0, 242, 255, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(0, 242, 255, 0.4);
}
.enginex-tour-card.store:hover {
    border-color: rgba(0, 242, 255, 0.6);
}

.enginex-tour-card.gameservers {
    --card-glow: rgba(16, 185, 129, 0.2);
    --card-shadow: rgba(16, 185, 129, 0.25);
}
.enginex-tour-card.gameservers .enginex-tour-card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-color: rgba(16, 185, 129, 0.4);
}
.enginex-tour-card.gameservers:hover {
    border-color: rgba(16, 185, 129, 0.6);
}

.enginex-tour-card.webdev {
    --card-glow: rgba(56, 189, 248, 0.2);
    --card-shadow: rgba(56, 189, 248, 0.25);
}
.enginex-tour-card.webdev .enginex-tour-card-icon {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}
.enginex-tour-card.webdev:hover {
    border-color: rgba(56, 189, 248, 0.6);
}

.enginex-tour-card.dev {
    --card-glow: rgba(234, 179, 8, 0.2);
    --card-shadow: rgba(234, 179, 8, 0.25);
}
.enginex-tour-card.dev .enginex-tour-card-icon {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}
.enginex-tour-card.dev:hover {
    border-color: rgba(234, 179, 8, 0.6);
}

.enginex-tour-card.pulse {
    --card-glow: rgba(244, 63, 94, 0.2);
    --card-shadow: rgba(244, 63, 94, 0.25);
}
.enginex-tour-card.pulse .enginex-tour-card-icon {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.4);
}
.enginex-tour-card.pulse:hover {
    border-color: rgba(244, 63, 94, 0.6);
}

.enginex-tour-card.guided {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(0, 242, 255, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.45);
}
.enginex-tour-card.guided .enginex-tour-card-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(0, 242, 255, 0.3));
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.enginex-tour-card.guided:hover {
    border-color: #00f2ff;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.2);
}

.enginex-tour-card-title {
    font-weight: 700;
    font-size: 14.5px;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.enginex-tour-card-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.enginex-tour-card-arrow {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.25s ease, color 0.25s ease;
}

.enginex-tour-card:hover .enginex-tour-card-arrow {
    transform: translateX(4px);
    color: #c084fc;
}

.enginex-tour-card.guided:hover .enginex-tour-card-arrow {
    color: #00f2ff;
}

.enginex-tour-modal-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

.enginex-tour-skip-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.enginex-tour-skip-btn:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
}


/* --- 2. SPOTLIGHT & TOUR STEP-BY-STEP --- */
.enginex-spotlight-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99990;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.enginex-spotlight-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Tooltip emergente del Tour */
.enginex-tour-tooltip {
    position: fixed;
    z-index: 99995;
    background: linear-gradient(135deg, rgba(20, 15, 34, 0.98) 0%, rgba(10, 8, 20, 0.98) 100%);
    border: 1px solid var(--tour-theme-color, rgba(168, 85, 247, 0.45));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(var(--tour-theme-rgb, 168, 85, 247), 0.25);
    border-radius: 20px;
    padding: 24px;
    max-width: 440px;
    width: 90vw;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: auto;
    overflow: hidden;
}

.enginex-tour-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.enginex-tour-tooltip.step-changing {
    opacity: 0 !important;
    transform: translateY(6px) scale(0.97) !important;
    pointer-events: none;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

/* Barra de progreso Neón animada en la parte superior */
.enginex-tour-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.enginex-tour-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tour-theme-color, #a855f7), #00f2ff);
    box-shadow: 0 0 10px var(--tour-theme-color, #a855f7);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.enginex-tour-step-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.enginex-tour-step-pill {
    background: rgba(var(--tour-theme-rgb, 168, 85, 247), 0.18);
    border: 1px solid var(--tour-theme-color, rgba(168, 85, 247, 0.4));
    color: var(--tour-theme-color, #c084fc);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 12px;
}

.enginex-tour-tooltip-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
    padding: 4px;
}

.enginex-tour-tooltip-close:hover {
    color: #f87171;
}

.enginex-tour-tooltip-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
}

.enginex-tour-tooltip-body {
    font-size: 13.5px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 20px;
}

.enginex-tour-tooltip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.enginex-tour-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.enginex-tour-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.enginex-tour-btn-primary {
    background: linear-gradient(135deg, var(--tour-theme-color, #a855f7), #9333ea);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--tour-theme-rgb, 168, 85, 247), 0.4);
}

.enginex-tour-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--tour-theme-rgb, 168, 85, 247), 0.6);
    filter: brightness(1.15);
}

.enginex-tour-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.enginex-tour-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.enginex-tour-btn-skip {
    background: none;
    color: #64748b;
    font-size: 12px;
    padding: 6px 10px;
}

.enginex-tour-btn-skip:hover {
    color: #cbd5e1;
}

.enginex-tour-btn:disabled,
.enginex-tour-btn.disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(0.6);
}

/* Indicadores de atajos de teclado */
.enginex-tour-keyboard-hints {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    color: #64748b;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.enginex-tour-keyboard-hints kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 10px;
    color: #cbd5e1;
}

/* Caja de advertencia de autenticación / registro requerido */
.enginex-tour-gate-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(15, 12, 30, 0.9) 100%);
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.enginex-tour-gate-box h4 {
    margin: 0 0 4px 0;
    color: #f87171;
    font-size: 13.5px;
    font-weight: 700;
}

.enginex-tour-gate-box p {
    margin: 0;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.45;
}

/* Badge de sesión verificada */
.enginex-tour-auth-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

/* Resplandor permanente de enfoque en destino durante todo el paso */
@keyframes pulseGlowHighlight {
    0%, 100% {
        outline: 3px solid var(--tour-theme-color, rgba(168, 85, 247, 0.9));
        outline-offset: 4px;
        box-shadow: 0 0 25px 4px rgba(var(--tour-theme-rgb, 168, 85, 247), 0.5), inset 0 0 15px rgba(var(--tour-theme-rgb, 168, 85, 247), 0.15);
    }
    50% {
        outline: 3px solid #00f2ff;
        outline-offset: 6px;
        box-shadow: 0 0 35px 8px rgba(0, 242, 255, 0.6), inset 0 0 20px rgba(0, 242, 255, 0.2);
    }
}

.enginex-pulse-highlight {
    animation: pulseGlowHighlight 2.2s ease-in-out infinite !important;
    border-radius: 14px;
    z-index: 99992 !important;
    transition: outline 0.25s ease, box-shadow 0.25s ease;
}

/* Botón disparador en Navbar / Footer */
.enginex-tour-trigger-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.enginex-tour-trigger-nav:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: #c084fc;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Responsive */
@media (max-width: 680px) {
    .enginex-tour-options {
        grid-template-columns: 1fr;
    }
    .enginex-tour-card.guided {
        grid-column: span 1;
    }
    .enginex-tour-modal {
        padding: 24px 20px 20px 20px;
    }
    .enginex-tour-modal-title {
        font-size: 22px;
    }
}
