/* ESCENA 4: BLUE - La App Hermosa (MODO CLARO) */

/* Fondo y grid de la escena 4 */
#scene4 {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    /* Sky 50 -> Sky 100 */
}

.blue-grid {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(to right, rgba(14, 165, 233, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(14, 165, 233, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-100px);
    z-index: 1;
    pointer-events: none;
}

.scene.active .blue-grid {
    animation: gridDrift 20s linear infinite;
}

/* Mockup del teléfono (Modo Claro) */
.phone-mockup {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 360px;
    height: 75%;
    background: #ffffff;
    border-radius: 30px;
    border: 4px solid #e2e8f0;
    /* Slate 200 */
    box-shadow:
        0 20px 50px rgba(14, 165, 233, 0.15),
        /* Sombra azul suave */
        0 10px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    z-index: 20;
    opacity: 0;
}

.scene.active .phone-mockup {
    animation: phonePop 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.8s;
}

@keyframes phonePop {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.85) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

/* Header de la app (Modo Claro) */
.app-header {
    padding: 24px 20px 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    /* Slate 900 */
    margin-bottom: 4px;
}

.app-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    /* Slate 500 */
    font-weight: 500;
}

/* Scroll de productos con animación */
.products-scroll {
    padding: 16px;
    height: calc(100% - 100px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    /* Slate 50 */
}

.scene.active .products-scroll {
    animation: scrollProducts 8s linear infinite 2s;
}

@keyframes scrollProducts {
    0% {
        transform: translateY(0);
    }

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

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

/* Tarjetas de productos (Modo Claro) */
.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-image {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    /* Sky 100 -> Sky 200 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    /* Slate 700 */
    margin-bottom: 2px;
}

.product-sku {
    font-size: 0.65rem;
    color: #94a3b8;
    /* Slate 400 */
    font-family: 'Courier New', monospace;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: #0ea5e9;
    /* Sky 500 */
    flex-shrink: 0;
}

/* ALERT DE STOCK BAJO */
.low-stock-alert {
    position: absolute;
    top: 90px;
    right: 16px;
    width: auto;
    max-width: 220px;
    background: #ffffff;
    border-left: 4px solid #ef4444;
    /* Red 500 */
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    z-index: 30;
    pointer-events: none;
}

.scene.active .low-stock-alert {
    animation: alertSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 3.5s;
}

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

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

.alert-icon {
    font-size: 1.5rem;
}

.alert-content {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.alert-desc {
    font-size: 0.7rem;
    color: #64748b;
}

.alert-desc b {
    color: #ef4444;
}

/* TEXTO CON FONDO SEMITRANSPARENTE (Modo Claro) */
.scene#scene4 .impact-text {
    background: rgba(255, 255, 255, 0.75);
    /* Blanco semitransparente */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 24px;
    box-shadow:
        0 10px 30px rgba(14, 165, 233, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.05);
    bottom: 15%;
    width: 85%;
    max-width: 360px;
    opacity: 0;
}

/* Animación del contenedor de texto */
.scene.active .impact-text {
    animation: panelFadeIn 0.8s ease-out forwards 2.2s;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Título y subtítulo de escena 4 (Modo Claro) */
.scene4-title {
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1.3px;
    margin-bottom: 12px;
    opacity: 0;
    color: #0f172a;
    /* Slate 900 */
    text-shadow: none;
    /* Sin sombra pesada */
}

.scene.active .scene4-title {
    animation: titleZoom 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 2.2s;
}

@keyframes titleZoom {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
        filter: blur(8px);
    }

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

.scene4-subtitle {
    font-size: 0.95rem;
    color: #475569;
    /* Slate 600 */
    font-weight: 500;
    line-height: 1.5;
    opacity: 0;
}

.scene.active .scene4-subtitle {
    animation: subtitleSlide 1s ease-out forwards 2.8s;
}

@keyframes subtitleSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* Efecto glow azul (Modo Claro) */
.blue-glow {
    color: #0ea5e9;
    /* Sky 500 */
    text-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
    /* Sombra más sutil */
    animation: bluePulse 2.5s ease-in-out infinite;
}

@keyframes bluePulse {

    0%,
    100% {
        text-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
    }

    50% {
        text-shadow: 0 0 40px rgba(14, 165, 233, 0.6);
    }
}

/* Legacy container (si se usa) */
.scene4-text-container {
    display: none;
    /* Ocultar el viejo contenedor si existe */
}

/* NEW SIMPLIFIED SCENE 4 STYLES */
.scene4-phone {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dual-feature-container {
    display: flex;
    gap: 20px;
    padding: 40px 20px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.feature-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 20px;
    padding: 32px 20px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.15);
    border: 2px solid rgba(14, 165, 233, 0.2);
    opacity: 0;
    transform: scale(0.8);
}

.scene.active .feature-left {
    animation: featureBoxPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.2s;
}

.scene.active .feature-right {
    animation: featureBoxPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.5s;
}

@keyframes featureBoxPop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.feature-icon {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.2));
}

.feature-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.scene4-hand-icon {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.5rem;
    opacity: 0;
    filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.3));
    z-index: 25;
}

.scene.active .scene4-hand-icon {
    animation: handWave 1.5s ease-in-out forwards 2s;
}

@keyframes handWave {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) rotate(-10deg);
    }

    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) rotate(0deg);
    }

    50% {
        transform: translateX(-50%) rotate(-15deg);
    }

    70% {
        transform: translateX(-50%) rotate(15deg);
    }

    85% {
        transform: translateX(-50%) rotate(-10deg);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) rotate(0deg);
    }
}