/* ============================================
   CAPA FLOTANTE DE ASISTENTE MÁGICO
   ============================================ */

.magic-guide-overlay {
    position: fixed;
    top: 100px;
    /* Posición superior fija (debajo del header aprox) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
}

.magic-guide-overlay.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    pointer-events: none;
    visibility: hidden;
}

.magic-guide-card {
    position: relative;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #ffc107 100%);
    border-radius: 50px;
    padding: 6px 20px;
    box-shadow:
        0 5px 20px rgba(255, 215, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.6);
    width: 95%;
    max-width: 900px;
    pointer-events: all;
    animation: floatAnimation 4s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 20px;
    /* Permitir que los elementos salgan del contenedor */
    overflow: visible;
}

@keyframes floatAnimation {

    0%,
    100% {
        transform: translateY(0px);
    }

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

/* Brillo dorado de fondo */
.magic-guide-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    animation: rotateGlow 10s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Contenido del mensaje */
.magic-guide-content {
    position: relative;
    z-index: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

/* Icono del paso */
.guide-step-icon {
    font-size: 24px;
    margin-bottom: 0;
    line-height: 1;
    animation: bounceIcon 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes bounceIcon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Contenedor de Textos */
.guide-text-container {
    display: flex;
    flex-direction: column;
}

/* Texto del mensaje */
.guide-message {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: #4a148c;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
    line-height: 1.1;
    animation: none;
    text-align: left;
}

/* Subtexto */
.guide-subtext {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    color: #6a1b9a;
    font-weight: 600;
    margin-top: 0;
    text-align: left;
    display: none;
}

@media (min-width: 640px) {
    .guide-subtext {
        display: block;
    }
}

/* Indicador de paso */
.guide-step-indicator {
    margin-top: 0;
    margin-left: auto;
    /* Empujar a la derecha */
    margin-right: 40px;
    /* Espacio para el botón cerrar */
    font-size: 14px;
    display: flex;
    gap: 6px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(74, 20, 140, 0.2);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: #4a148c;
    transform: scale(1.3);
    box-shadow: 0 0 5px rgba(74, 20, 140, 0.4);
}

/* Botón de cerrar */
.guide-close-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: #4a148c;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.guide-close-btn:hover {
    background: #4a148c;
    color: white;
    transform: translateY(-50%) rotate(90deg);
}

/* Efectos de partículas mágicas (Fondo tenue) */
.magic-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.magic-stars .star {
    position: absolute;
    font-size: 10px;
    opacity: 0;
    animation: particleFloat 3s ease-in-out infinite;
}

.magic-stars .star:nth-child(1) {
    left: 20%;
    top: 30%;
    animation-delay: 0s;
}

.magic-stars .star:nth-child(2) {
    left: 40%;
    top: 60%;
    animation-delay: 1.5s;
    font-size: 14px;
}

.magic-stars .star:nth-child(3) {
    left: 70%;
    top: 20%;
    animation-delay: 0.8s;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.5);
    }
}

/* =========================================
   ESTRELLAS SATÉLITE (5 Estrellas Flotando Alrededor)
   ========================================= */
.magic-satellites {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.star-sat {
    position: absolute;
    color: #ffd700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    animation: satelliteFloat 4s ease-in-out infinite;
}

/* 1. Arriba Izquierda (Grande) */
.star-sat:nth-child(1) {
    top: -15px;
    left: 10px;
    font-size: 24px;
    animation-delay: 0s;
}

/* 2. Abajo Derecha (Mediana) */
.star-sat:nth-child(2) {
    bottom: -15px;
    right: 40px;
    font-size: 18px;
    color: #fff;
    animation-delay: 1s;
}

/* 3. Arriba Derecha (Lejana) */
.star-sat:nth-child(3) {
    top: -25px;
    right: 0px;
    font-size: 20px;
    animation-delay: 2s;
}

/* 4. Abajo Izquierda (Pequeña) */
.star-sat:nth-child(4) {
    bottom: -10px;
    left: 30px;
    font-size: 14px;
    color: #ffed4e;
    animation-delay: 0.5s;
}

/* 5. Centro Superior (Sutil) */
.star-sat:nth-child(5) {
    top: -20px;
    left: 50%;
    font-size: 16px;
    animation-delay: 1.5s;
}


@keyframes satelliteFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(0, -10px) rotate(15deg) scale(1.15);
    }
}


/* Responsive */
@media (max-width: 640px) {
    .magic-guide-overlay {
        top: 80px;
    }

    .magic-guide-card {
        padding: 15px 20px;
        min-width: 200px;
        max-width: 85vw;
    }

    .guide-message {
        font-size: 16px;
    }

    /* Ajustes satélites móvil para no salirse */
    .star-sat:nth-child(1) {
        left: 0px;
    }

    .star-sat:nth-child(3) {
        right: -5px;
    }

    .guide-step-icon {
        font-size: 30px;
    }

    .guide-subtext {
        font-size: 12px;
    }

    .guide-step-indicator {
        margin-top: 10px;
        gap: 4px;
    }

    .step-dot {
        width: 8px;
        height: 8px;
    }
}