/* -------------------- */
/* ESTILOS GENERALES    */
/* -------------------- */

body {
    margin: 0;
    font-family: 'Fredoka One', sans-serif;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #3a2f00;
    text-shadow: 1px 1px 2px #fff;
}

/* -------------------- */
/* HEADER ANIMADO       */
/* -------------------- */

.header-animado {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 0, 0.7);
    border-bottom: 5px solid #ffcc00;
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.titulo-brillante {
    font-size: 4rem;
    margin: 0;
    animation: brillo 2s infinite alternate;
}

@keyframes brillo {
    from { text-shadow: 0 0 5px #fff; }
    to { text-shadow: 0 0 20px #ff0; }
}

.subtitulo {
    animation: fadeIn 2s ease-in;
}

/* -------------------- */
/* HISTORIA DE LAS BANANAS */
/* -------------------- */

.historia-banana {
    background: rgba(255, 255, 255, 0.85);
    margin: 40px auto;
    padding: 30px;
    width: 80%;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 15px #0003;
    animation: fadeIn 1.5s ease-in;
}

.historia-banana h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #d4a200;
    text-shadow: 0 0 5px #fff;
}

.historia-banana p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.banana-historia-img {
    width: 180px;
    margin-top: 20px;
    animation: flotar 3s infinite ease-in-out;
}

/* -------------------- */
/* ANIMACIONES GENERALES */
/* -------------------- */

.fade-in {
    animation: fadeIn 1.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Banana flotante */
.banana-flotante {
    width: 200px;
    margin-top: 20px;
    animation: flotar 3s infinite ease-in-out;
}

@keyframes flotar {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* -------------------- */
/* SECCIÓN INTRO        */
/* -------------------- */

.intro {
    background: rgba(255, 255, 255, 0.8);
    margin: 40px auto;
    padding: 30px;
    width: 80%;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 15px #0004;
}

/* -------------------- */
/* RADIOBUTTONS + IMAGEN */
/* -------------------- */

.banana-selector {
    background: rgba(255, 255, 255, 0.85);
    width: 70%;
    margin: 40px auto;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 15px #0003;
}

.banana-radio-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.banana-bailarin {
    width: 180px;
    height: auto;
    animation: bailar 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 10px #ff0);
}

@keyframes bailar {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.banana-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.banana-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    margin: 15px 0;
    cursor: pointer;
    justify-content: center;
}

.banana-radio input[type="radio"] {
    display: none;
}

.custom-radio {
    width: 22px;
    height: 22px;
    border: 3px solid #ffcc00;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: transform 0.3s ease;
    background: #fff7c2;
}

.banana-radio input[type="radio"]:checked + .custom-radio::after {
    content: "";
    width: 12px;
    height: 12px;
    background: #ffeb3b;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: translate(-50%, -50%) scale(0); }
    80% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.banana-radio:hover .custom-radio {
    transform: scale(1.2);
}

/* ----------------------------- */
/* REACCIONES DE LA BANANA       */
/* ----------------------------- */

#banana-dulce:checked ~ .banana-bailarin,
.banana-radio-row:has(#banana-dulce:checked) .banana-bailarin {
    animation: salto 0.6s ease-in-out;
}

@keyframes salto {
    0% { transform: translateY(0); }
    40% { transform: translateY(-40px); }
    100% { transform: translateY(0); }
}

#banana-verde:checked ~ .banana-bailarin,
.banana-radio-row:has(#banana-verde:checked) .banana-bailarin {
    animation: temblor 0.4s ease-in-out infinite;
}

@keyframes temblor {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

#banana-madura:checked ~ .banana-bailarin,
.banana-radio-row:has(#banana-madura:checked) .banana-bailarin {
    animation: giro 1s ease-in-out;
}

@keyframes giro {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* -------------------- */
/* GALERÍA + RECETAS    */
/* -------------------- */

.gallery {
    text-align: center;
    padding: 40px 0;
}

.images {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Contenedor uniforme */
.img-recipe {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 15px;
}

/* Imagen ajustada */
.img-recipe img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s, box-shadow 0.4s;
}

/* Efecto zoom */
.img-recipe img:hover {
    transform: scale(1.15) rotate(2deg);
    box-shadow: 0 0 25px #ff0;
}

/* Overlay receta */
.recipe {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.img-recipe:hover .recipe {
    opacity: 1;
}

.recipe h3 {
    margin: 0 0 10px;
    font-size: 1.6rem;
    color: #ffeb3b;
}

.recipe p {
    font-size: 1.2rem;
}

/* -------------------- */
/* FOOTER               */
/* -------------------- */

.footer-brillante {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 0, 0.7);
    border-top: 5px solid #ffcc00;
    animation: brilloFooter 3s infinite alternate;
}

@keyframes brilloFooter {
    from { box-shadow: 0 0 5px #ff0; }
    to { box-shadow: 0 0 25px #ffd700; }
}

/* -------------------- */
/* BANANA RAIN (CSS)    */
/* -------------------- */

.banana-rain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.banana-drop {
    position: absolute;
    top: -120px;
    width: 80px;
    opacity: 0.9;
    animation: caer 4s linear infinite, girar 2s ease-in-out infinite;
}

@keyframes caer {
    0% { transform: translateY(-120px); }
    100% { transform: translateY(110vh); }
}

@keyframes girar {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(20deg); }
    100% { transform: rotate(-20deg); }
}
body {
    font-family: 'Fredoka One', sans-serif;
    background: #fff7c2;
    margin: 0;
    padding: 0;
    color: #333;
}



.banana-icon {
    font-size: 30px;
}

.contador-texto strong {
    color: #b88600;
    text-shadow: 1px 1px 2px #fff;
}

@keyframes aparecer {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
