/* ==========================================
   GENERADOR QR - Coopecafenor
   Paleta: Marrón café + Verde cooperativa
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;

    /* ===== FONDO CON IMAGEN ===== */
    background-image: url('../imagenes/FondoQR.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Capa oscura sobre la imagen para legibilidad */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(75, 45, 43, 0.7);
    z-index: 0;
}

.qr-container {
    position: relative;
    z-index: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 420px;
    max-width: 90%;
    border-top: 4px solid #2E7D32;
}

h2 {
    color: #4B2D2B;
    margin-bottom: 10px;
    font-size: 22px;
}

.subtitulo {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #D4C5B9;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border 0.3s;
}

input[type="text"]:focus {
    border-color: #2E7D32;
}

.btn-generar {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn-generar:hover {
    background: linear-gradient(135deg, #1B5E20, #0d3d11);
    transform: scale(1.02);
}

#qrcode {
    display: inline-block;
    margin: 25px 0 15px 0;
}

.btn-descargar {
    padding: 12px 25px;
    background: linear-gradient(135deg, #4B2D2B, #3A2120);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: none;
    margin: 0 auto;
    transition: background 0.3s, transform 0.2s;
}

.btn-descargar:hover {
    background: linear-gradient(135deg, #3A2120, #2a1615);
    transform: scale(1.02);
}

.btn-limpiar {
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: none;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-limpiar:hover {
    background-color: #b02a37;
}

.mensaje {
    color: #dc3545;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
    .qr-container {
        padding: 25px;
        width: 95%;
    }

    h2 {
        font-size: 19px;
    }
}