html, body {
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;   /* ✅ PERMITE BAJAR */
}

body {
    min-height: 100vh;
    margin: 0;
    background: #222; /* followers: color de fondo principal */
    background-size: initial;
    animation: none;
    overflow-x: hidden;
}

body.lamp-on {
    background: #444; /* followers: color de fondo cuando la lámpara está encendida */
}

body.light-on {
    background: linear-gradient(270deg, #fffbe6, #ffe0b2, #fffbe6, #fffde7, #fffbe6); /* followers: gradiente de fondo con la luz encendida */
    background-size: 400% 400%;
    animation: gradientMoveBodyDesktop 8s ease infinite;
    transition: background 0.7s;
}

body.lamp-on::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 120px, rgba(255,255,255,0) 0%, rgba(34,34,34,0.85) 70%); /* followers: gradiente de sombra alrededor de la lámpara */
    z-index: 1;
    transition: background 0.5s;
}

.center-desktop {
    display: flex;
    justify-content: center;
    align-items: center;
    
}

#desktop-btn {
    width: 120px;
    height: 56px;
    border: 2px solid #e52e71; /* followers: color del borde del botón */
    border-radius: 28px;
    background: #ccc; /* followers: color de fondo del botón */
    position: relative;
    color: #fff; /* followers: color del texto del botón */
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow:
        0 4px 24px rgba(229, 46, 113, 0.18),
        0 2px 8px rgba(0,0,0,0.18),
        0 12px 0 #b85d1c;
    transition:
        background 0.3s,
        border 0.3s,
        box-shadow 0.3s,
        filter 0.2s;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

#desktop-btn::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    width: 40px;
    height: 40px;
    background: linear-gradient(270deg, #ff8a00, #e52e71, #ff8a00);
    background-size: 400% 400%;
    animation: gradientMoveDesktop 6s ease infinite;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(229, 46, 113, 0.25), 0 1px 3px rgba(0,0,0,0.12);
    transition: left 0.3s, box-shadow 0.3s;
    z-index: 1;
    filter: brightness(1.15) saturate(1.2);
}

#desktop-btn.on {
    background: #4caf50;
    border: 2px solid #43cea2;
    color: #fff;
    box-shadow:
        0 6px 32px rgba(67, 206, 162, 0.18),
        0 2px 8px rgba(0,0,0,0.18),
        0 12px 0 #2e7d32;
}

#desktop-btn.on::before {
    left: 72px;
    box-shadow: 0 2px 12px rgba(67, 206, 162, 0.25), 0 1px 3px rgba(0,0,0,0.12);
    filter: brightness(1.2) saturate(1.3);
}

#desktop-btn span {
    position: relative;
    z-index: 2;
    transition: color 0.3s;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.12);
    /* followers: aquí puedes cambiar el estilo del texto del botón */
}

#desktop-btn.on span {
    color: #fff;
}

#desktop-btn:active {
    filter: brightness(0.97);
    box-shadow:
        0 2px 8px rgba(229, 46, 113, 0.15),
        0 1px 3px rgba(0,0,0,0.10),
        0 6px 0 #b85d1c;
}

@keyframes gradientMoveDesktop {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientMoveBodyDesktop {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.center-mobile { 
    display: none; 
}

@media (max-width: 600px) {
    .center-desktop { 
        display: none; 
    }
    
    .center-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    #mobile-btn {
        width: 100px;
        height: 48px;
        border: 2px solid #e52e71;
        border-radius: 24px;
        background: #ccc;
        position: relative;
        color: #fff;
        font-size: 1.1rem;
        font-weight: bold;
        box-shadow:
            0 4px 24px rgba(229, 46, 113, 0.18),
            0 2px 8px rgba(0,0,0,0.18),
            0 12px 0 #b85d1c;
        transition:
            background 0.3s,
            border 0.3s,
            box-shadow 0.3s,
            filter 0.2s;
        cursor: pointer;
        padding: 0;
        overflow: hidden;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    #mobile-btn::before {
        content: "";
        position: absolute;
        left: 6px;
        top: 6px;
        width: 32px;
        height: 32px;
        background: linear-gradient(270deg, #ff8a00, #e52e71, #ff8a00);
        background-size: 400% 400%;
        animation: gradientMoveMobile 6s ease infinite;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(229, 46, 113, 0.25), 0 1px 3px rgba(0,0,0,0.12);
        transition: left 0.3s, box-shadow 0.3s;
        z-index: 1;
        filter: brightness(1.15) saturate(1.2);
    }
    
    #mobile-btn.on {
        background: #4caf50;
        border: 2px solid #43cea2;
        color: #fff;
        box-shadow:
            0 6px 32px rgba(67, 206, 162, 0.18),
            0 2px 8px rgba(0,0,0,0.18),
            0 12px 0 #2e7d32;
    }
    
    #mobile-btn.on::before {
        left: 54px;
        box-shadow: 0 2px 12px rgba(67, 206, 162, 0.25), 0 1px 3px rgba(0,0,0,0.12);
        filter: brightness(1.2) saturate(1.3);
    }
    
    #mobile-btn span {
        position: relative;
        z-index: 2;
        transition: color 0.3s;
        letter-spacing: 1px;
        text-shadow: 0 1px 2px rgba(0,0,0,0.12);
        pointer-events: none;
    }
    
    #mobile-btn.on span {
        color: #fff;
    }
    
    #mobile-btn:active {
        filter: brightness(0.97);
        box-shadow:
            0 2px 8px rgba(229, 46, 113, 0.15),
            0 1px 3px rgba(0,0,0,0.10),
            0 6px 0 #b85d1c;
        transform: translateY(2px);
    }
    
    #lamp-container {
        width: 120px;
        height: 140px;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        transition: opacity 1s cubic-bezier(.4,2,.3,1), transform 5s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    #lamp-container.lamp-down {
        opacity: 1;
        transform: translateX(-50%) translateY(60px) scale(1);
        transition: opacity 1s cubic-bezier(.4,2,.3,1), transform 5s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .lamp-cable {
        width: 3px;
        height: 28px;
        margin-bottom: -6px;
    }
    
    #svg-lamp {
        width: 100px;
        height: 120px;
    }
    
    #svg-lamp svg {
        width: 100px;
        height: 120px;
    }
    
    #love-message {
        font-size: 1.2em; /* followers: tamaño del mensaje mobile */
        top: 180px;
        padding: 0 15px;
        word-break: break-word;
        line-height: 1.4;
    }
    
    body.lamp-on::before {
        background: radial-gradient(ellipse at 50% 80px, rgba(255,255,255,0) 0%, rgba(34,34,34,0.85) 70%);
    }
    
    @keyframes gradientMoveMobile {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }
    
    #lamp-glow {
        opacity: 0;
        transition: opacity 4.5s cubic-bezier(0.22, 1, 0.36, 1);
        filter: blur(24px);
    }
    
    .lamp-on #lamp-glow {
        opacity: 1;
        animation: lamp-glow-pulse 1.2s 4.5s infinite alternate;
    }
}

.lamp-switch-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lamp-icon {
    font-size: 48px;
    color: #bbb;
    transition: color 0.3s, filter 0.3s, text-shadow 0.3s;
    filter: brightness(0.7);
    text-shadow: none;
}

.lamp-icon.on {
    color: #ffe066;
    filter: brightness(1.5) drop-shadow(0 0 16px #fffbe6);
    text-shadow: 0 0 24px #fffbe6, 0 0 8px #ffe066;
}

#lamp-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(-40px) scale(0.9);
    transition: opacity 1s cubic-bezier(.4,2,.3,1), transform 3.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.lamp-on #lamp-container {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.lamp-cable {
    width: 4px;
    height: 40px;
    background: #444;
    margin-bottom: -8px;
    border-radius: 2px;
}

#svg-lamp {
    width: 180px;
    height: 210px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: visible;
}

#svg-lamp svg {
    display: block;
    width: 180px;
    height: 210px;
    overflow: visible;
}

#lamp-shape {
    fill: #888;
    transition: fill 0.4s;
}

.lamp-on #lamp-shape {
    fill: #ffe066;
    filter: drop-shadow(0 8px 24px #fffbe6);
}

#lamp-glow {
    opacity: 0;
    transition: opacity 4.5s cubic-bezier(0.22, 1, 0.36, 1);
    filter: blur(24px);
}

.lamp-on #lamp-glow {
    opacity: 1;
    animation: lamp-glow-pulse 1.2s 4.5s infinite alternate;
}

#lamp-bulb {
    opacity: 0;
    transition: opacity 0.4s;
}

.lamp-on #lamp-bulb {
    opacity: 1;
    animation: lamp-bulb-flicker 1.5s infinite alternate;
}

@keyframes lamp-glow-pulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

@keyframes lamp-bulb-flicker {
    0% { opacity: 0.85; }
    20% { opacity: 1; }
    40% { opacity: 0.9; }
    60% { opacity: 1; }
    80% { opacity: 0.95; }
    100% { opacity: 1; }
}

.center-desktop,
.center-mobile {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}


body.lamp-on .center-desktop,
body.lamp-on .center-mobile {
    margin-top: 280px;
}

#love-message {
    display: block;
    position: relative;
    left: 5vw;
    right: 5vw;
    margin: 260px auto 60px auto;
    top: 240px;
    font-size: 2.5em; /* followers: tamaño del mensaje */
    color: #ffffff; /* followers: color del mensaje */
    text-shadow: 0 2px 16px #fffbe7, 0 1px 2px #000;
    z-index: 20;
    text-align: center;
    font-family: 'Segoe Script', cursive, sans-serif;
    transition: opacity 0.7s;
    opacity: 0;
    white-space: pre-line;
    border-right: 2px solid #e52e71; /* followers: color del borde animado del mensaje */
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
    width: auto;
    max-width: 900px;
    line-height: 1.3;
}

body.lamp-on #love-message {
    display: block;
    opacity: 1;
    animation: fadeInMsg 1.2s 0.5s both;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}

.photo {
    position: absolute;
    opacity: 0;
    transform: scale(0.5);
    transition: all 1.5s ease;
}

.photo img {
    width: 160px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* Posiciones */
.photo1 { top: 15%; left: 10%; }
.photo2 { top: 30%; right: 8%; }
.photo3 { bottom: 25%; left: 15%; }
.photo4 { bottom: 15%; right: 10%; }
.photo5 { top: 60%; left: 40%; }

/* Cuando la lámpara está encendida */
.lamp-on .photo {
    opacity: 1;
    transform: scale(1);
}

/* Contenedor central fijo */
.love-container {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: auto;
    padding: 40px;
    text-align: center;
    color: white;
}

/* Evita que el texto se mueva */
.love-container h1,
.love-container p {
    margin: 20px 0;
}

/* Fotos en capa inferior */
.photo {
    position: fixed; /* 🔥 CAMBIO CLAVE */
    z-index: 1;
    opacity: 0;
    transform: scale(1);
    transition: all 1.5s ease;
}

.photo img {
    width: 160px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* Mostrar fotos */
.lamp-on .photo {
    opacity: 1;
    transform: scale(1);
}

/* Contenedor de fotos */
.photo {
    position: fixed;   /* IMPORTANTE: que no empuje el texto */
    z-index: 1;
}

/* Imagen estilo romántico */
.foto-corazon {
    width: 160px;
    opacity: 0.6;
    border-radius: 50% 50% 60% 40% / 40% 60% 40% 60%; /* forma nube */
    box-shadow: 0 0 25px rgba(255,255,255,0.4);
    transition: 0.4s ease;
}

.foto-corazon:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* POSICIONES (ajustadas para que no tapen texto) */
.photo1 { top: 60px; left: 40px; }

.photo2 { top: 180px; right: 40px; }

.photo3 { bottom: 200px; left: 60px; }

.photo4 { bottom: 120px; right: 60px; }

.photo5 { top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.3; }

/* Asegura que el mensaje esté encima */
.love-message {
    position: relative;
    z-index: 10;
}

@media (max-width: 600px) {

    .love-message {
        font-size: 20px;
        line-height: 1.8;
        padding: 20px;
        text-shadow: 
            0 0 8px rgba(255,255,255,0.9),
            0 0 15px rgba(255,255,255,0.6);
    }

    .foto-corazon {
        width: 120px;
        opacity: 0.4; /* menos invasivas */
    }

}
