@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;800&family=Poppins:wght@400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top, #f0e6d2 0%, #e6d8b8 100%);
    color: #222;
    text-align: center;
    padding: 1.5rem;
    margin: 0;
}

/* Caixas principais */
#senha-section, #certificado-section {
    max-width: 600px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

input, button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

button {
    background: linear-gradient(90deg, #c19a46, #a67c00);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    letter-spacing: 0.5px;
}

button:hover {
    background: linear-gradient(90deg, #a67c00, #c19a46);
}

/* Certificado retrô */
.certificado {
    position: relative;
    background: #fffdf5 url('/assets/img/plufow-le-studio-2ltG_DVxIaU-unsplash.jpg') center center no-repeat;
    background-size: cover;
    border: 12px solid transparent;
    border-image: linear-gradient(45deg, #d4af37, #f7e98e, #c9a43f, #f1d27c);
    border-image-slice: 1;
    border-radius: 20px;
    padding: 2rem 1rem;
    margin-top: 2rem;
    text-align: center;
    color: #3b2f1b;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
    box-sizing: border-box;
}

/* Moldura interna */
.certificado::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid #81672f;
    border-radius: 12px;
    pointer-events: none;
}

.certificado .logo {
    width: 150px;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
    max-width: 40vw;
}

/* Títulos */
.certificado-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #a67c00;
    margin-bottom: 0.5rem;
}

.certificado-content p {
    font-size: 1rem;
    color: #3b2f1b;
    margin: 0.3rem 0;
}

.certificado-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #111;
    margin: 0.8rem 0;
}

.certificado-content h3 {
    font-size: 1.3rem;
    color: #a67c00;
    font-weight: 600;
    margin-top: 0.8rem;
}

/* Foto circular */
#certFoto {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin-top: 1.2rem;
    object-fit: cover;
    border: 5px double #a67c00;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
    max-width: 60vw;
}

/* Botão de baixar */
#baixarCertificado {
    background: linear-gradient(90deg, #b68c2d, #e0c15c);
    color: #fff;
    margin-top: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#baixarCertificado:hover {
    background: linear-gradient(90deg, #e0c15c, #b68c2d);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    #senha-section, #certificado-section {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .certificado {
        padding: 1.5rem 0.5rem;
        border-width: 8px;
    }

    .certificado-content h1 {
        font-size: 1.6rem;
    }

    .certificado-content h2 {
        font-size: 1.3rem;
    }

    .certificado-content h3 {
        font-size: 1.1rem;
    }

    .certificado-content p {
        font-size: 0.9rem;
    }

    #certFoto {
        width: 130px;
        height: 130px;
    }

    .certificado .logo {
        width: 120px;
    }

    button, input {
        font-size: 0.95rem;
        padding: 0.7rem;
    }
}
