:root {
    --primary: #d42426;
    --gold: #ffc107;
    --dark-overlay: rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: sans-serif; }

/* 1. FONDO GENERAL (Cielo) para toda la web */
body {
    background: url('../assets/sky_bn.jpg') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    overflow: hidden;
    color: #333;
}

/* 2. CAPA DEL ÁRBOL (Se superpone al cielo solo en la pantalla de campaña) */
#tree-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Aquí va la imagen del árbol */
    background: url('../assets/tree_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    z-index: 1; 
}

/* Bolas en el árbol */
.bola {
    position: absolute;
    width: 45px; height: 45px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2; 
    pointer-events: auto; 
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: transform 0.2s;
}
.bola:hover { transform: scale(1.2); z-index: 100 !important; }

/* Texto dentro de la bola */
.bola .amount {
    color: white; font-size: 11px; font-weight: 800; text-shadow: 1px 1px 2px black; pointer-events: none;
}
/* Nombre debajo */
.bola .name-label {
    position: absolute; top: 42px; left: 50%; transform: translateX(-50%);
    background-color: rgba(0,0,0,0.7); color: white; padding: 2px 6px;
    border-radius: 10px; font-size: 10px; white-space: nowrap; z-index: 3;
}

/* Botón flotante */
.floating-btn-container {
    position: fixed; bottom: 30px; width: 100%; text-align: center; z-index: 100; padding: 0 20px;
}
#donate-btn {
    background-color: var(--primary); color: white; border: 2px solid white;
    padding: 12px 30px; border-radius: 50px; font-size: 1.1rem; font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); cursor: pointer; text-transform: uppercase;
}

/* 3. PANTALLA DE PAGO (MODAL COMPLETA) */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Usamos el fondo de cielo también aquí para tapar el árbol */
    background: url('../assets/sky_bn.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.hidden { display: none !important; }

/* Tarjeta blanca del formulario */
.modal-content {
    background: rgba(255, 255, 255, 0.95); /* Blanco casi opaco */
    padding: 25px; border-radius: 20px; width: 90%; max-width: 400px;
    text-align: center; position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-height: 90vh; overflow-y: auto; /* Por si el móvil es pequeño */
}

/* CARRUSEL DE BOLAS (RANGOS) */
.ball-carousel {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto; /* Permite deslizar si no caben */
    padding-bottom: 10px;
}

.ball-option {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; opacity: 0.5; transition: 0.3s;
    min-width: 70px; /* Para asegurar tamaño en móvil */
}

.ball-option img { width: 50px; height: 50px; margin-bottom: 5px; }
.ball-option span { font-size: 0.75rem; font-weight: bold; color: #555; }

.ball-option.selected {
    opacity: 1; transform: scale(1.1);
}
.ball-option.selected span { color: var(--primary); }

/* Inputs y Botones */
input { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ccc; border-radius: 8px; font-size: 16px; }
.btn-pay { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; margin-top: 10px; font-size: 1rem; }
.btn-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #555; }
