/* =====================================================================
   LAYOUT CSS - CIELO INTERACTIVO, CANVAS, CABECERA Y NAVEGACIÓN
   ===================================================================== */

/* Cielo interactivo de fondo */
#sky-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.interactive-sky-item {
    pointer-events: auto;
    cursor: pointer;
    position: absolute;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.interactive-sky-item:active {
    transform: scale(1.22);
}

#bg-sun {
    top: 8px;
    right: 85px;
    width: 80px;
    height: 80px;
}

.cloud-1 {
    top: 16px;
    left: -140px;
    width: 120px;
    height: 70px;
    animation: cloudDrift 42s linear infinite;
}

.cloud-2 {
    top: 68px;
    left: -140px;
    width: 100px;
    height: 60px;
    opacity: 0.88;
    animation: cloudDrift 56s linear infinite -22s;
}

.butterfly-sky {
    top: 96px;
    right: -75px;
    width: 54px;
    height: 54px;
    animation: butterflyFlight 22s linear infinite;
}

.hills-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 130px;
}

/* Canvas de partículas */
#magic-canvas {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Manita indicadora para bebés */
#idle-hand-hint {
    position: fixed;
    z-index: 35;
    pointer-events: none;
    width: 74px;
    height: 74px;
    transition: left 0.3s ease, top 0.3s ease;
}

/* Cabecera superior */
header {
    position: relative;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 2px 10px;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

#mascot-container {
    width: 74px;
    height: 74px;
    cursor: pointer;
    flex-shrink: 0;
    animation: floatSlow 3.2s infinite ease-in-out;
}

#visual-thought-bubble {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.96);
    border: 4px solid #FFFFFF;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease;
}
#visual-thought-bubble:active {
    transform: scale(0.93);
}

.speaker-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EC4899;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#voice-wave-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 26px;
    padding: 0 3px;
}
.wave-bar {
    width: 5px;
    border-radius: 99px;
}
.wave-1 { height: 18px; background: #EC4899; animation: soundWavePulse 0.28s infinite ease-in-out 0s; }
.wave-2 { height: 25px; background: #F59E0B; animation: soundWavePulse 0.28s infinite ease-in-out 0.09s; }
.wave-3 { height: 20px; background: #10B981; animation: soundWavePulse 0.28s infinite ease-in-out 0.18s; }
.wave-4 { height: 24px; background: #3B82F6; animation: soundWavePulse 0.28s infinite ease-in-out 0.24s; }

.header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botón de Estudio de Voz (para Papá / Mamá) */
#voice-engine-pill {
    background: rgba(255, 255, 255, 0.96);
    border: 3px solid #FFFFFF;
    box-shadow: 0 5px 0 rgba(0,0,0,0.16);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.14s ease;
}
#voice-engine-pill:active {
    transform: translateY(3px);
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 8px #22C55E;
    flex-shrink: 0;
}

/* Barra de navegación inferior */
nav {
    position: relative;
    z-index: 25;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 4px 6px 12px 6px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
}

.nav-tab {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 3.5px solid #FFFFFF;
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

@media (min-width: 600px) {
    .nav-tab {
        width: 62px;
        height: 62px;
        border-radius: 22px;
        border-width: 4px;
    }
    #mascot-container {
        width: 88px;
        height: 88px;
    }
}

.nav-tab-active {
    transform: translateY(-8px) scale(1.13);
    box-shadow: 0 11px 0 rgba(0, 0, 0, 0.24), 0 0 0 5px #FEF08A;
    z-index: 10;
}
