/* ============ RELOJES DEL ÁRBOL (arbol-relojes.css) ============ */

/* 1. ZONA DE RELOJES (Contenedor flexible que se adapta) */
.zona-relojes {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-ui);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    transition: var(--transicion-liquida);
}

.fila-donate-reloj {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap; /* Si no caben, pasan a la siguiente línea */
}

/* 2. BOTÓN DONAR (Tamaño fluido) */
.btn-donate {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(180deg, #2e7d32, #1b5e20);
    color: #ffd700;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    letter-spacing: 1px;
    text-decoration: none;
    border: 2px solid #ffd700;
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra-base);
    white-space: nowrap;
    transition: var(--transicion-liquida);
}

.btn-donate:active {
    transform: scale(0.93);
}

/* 3. RELOJ (Contenedor adaptable) */
.reloj {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ffd700;
    border-radius: var(--radio-borde);
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--sombra-base);
    transition: var(--transicion-liquida);
}

.reloj-etiqueta {
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    color: #ffd700;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.reloj-numero {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #ffd700;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    min-width: 3em; /* Relativo al tamaño de fuente, no fijo */
    text-align: center;
    transition: color 0.3s ease;
}

/* 4. ESTADO URGENTE (Cuando quedan menos de 20 segundos) */
.reloj.urgente {
    border-color: #ff3333;
    background: rgba(80, 0, 0, 0.85);
    animation: latido 0.8s ease-in-out infinite;
}

.reloj.urgente .reloj-numero {
    color: #ff4444;
    animation: parpadeo 0.8s ease-in-out infinite;
}

.reloj.urgente .reloj-etiqueta {
    color: #ff4444;
}

@keyframes latido {
    0%, 100% { transform: scale(1); box-shadow: var(--sombra-base); }
    50% { transform: scale(1.05); box-shadow: 0 0 18px rgba(255, 51, 51, 0.7); }
}

@keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 5. ESTADO AGOTADO (Cuando se acabó el tiempo) */
.reloj.agotado {
    border-color: #666;
    background: rgba(40, 40, 40, 0.8);
    animation: none;
}

.reloj.agotado .reloj-numero {
    color: #999;
    animation: none;
}
