* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #f6f3ff,
            #e9f8ff
        );

    color: #222;
}


/* =========================
   CABEÇALHO
========================= */

header {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 20px;

    padding: 30px 20px;

    background:
        linear-gradient(
            135deg,
            #6c3cff,
            #00a8ff
        );

    color: white;

    text-align: center;
}


header h1 {

    margin: 0;

    font-size: 38px;
}


header p {

    margin: 6px 0 0;

    opacity: 0.9;
}


.logo {

    font-size: 55px;
}


/* =========================
   CONTEÚDO
========================= */

main {

    width: 92%;

    max-width: 1200px;

    margin: auto;
}


/* =========================
   PERGUNTA
========================= */

.pergunta {

    background: white;

    margin-top: 30px;

    padding: 30px;

    border-radius: 20px;

    text-align: center;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.08);
}


.pergunta h2 {

    font-size: 28px;

    margin-bottom: 5px;
}


.etiqueta {

    display: inline-block;

    background: #ffcc00;

    padding: 8px 16px;

    border-radius: 30px;

    font-weight: bold;

    font-size: 14px;
}


/* =========================
   FORMULÁRIO
========================= */

.formulario {

    max-width: 700px;

    margin: 30px auto;

    padding: 30px;

    background: white;

    border-radius: 20px;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.08);
}


.formulario h2 {

    margin-top: 0;

    text-align: center;
}


.campo {

    margin-bottom: 18px;
}


label {

    display: block;

    margin-bottom: 7px;

    font-weight: bold;
}


input,
select,
textarea {

    width: 100%;

    padding: 14px;

    border: 2px solid #ddd;

    border-radius: 12px;

    font-size: 16px;

    outline: none;

    transition: 0.2s;
}


input:focus,
select:focus,
textarea:focus {

    border-color: #6c3cff;
}


textarea {

    height: 110px;

    resize: vertical;
}


#contador {

    margin-top: 5px;

    text-align: right;

    color: #777;

    font-size: 13px;
}


button {

    width: 100%;

    padding: 16px;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #6c3cff,
            #00a8ff
        );

    color: white;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}


button:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 18px
        rgba(108, 60, 255, 0.25);
}


button:disabled {

    opacity: 0.6;

    cursor: wait;
}


#aviso {

    text-align: center;

    margin-top: 15px;

    font-weight: bold;
}


/* =========================
   TÍTULO DO MURAL
========================= */

.titulo-mural {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-top: 50px;

    margin-bottom: 20px;
}


.titulo-mural h2 {

    margin: 0;

    font-size: 28px;
}


.titulo-mural p {

    color: #666;

    margin-top: 5px;
}


.contador-respostas {

    min-width: 100px;

    padding: 12px 18px;

    background: #222;

    color: white;

    border-radius: 16px;

    text-align: center;
}


.contador-respostas span {

    display: block;

    font-size: 28px;

    font-weight: bold;
}


.contador-respostas small {

    font-size: 11px;
}


/* =========================
   MURAL
========================= */

.mural {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 20px;

    padding-bottom: 50px;
}


/* =========================
   CARDS
========================= */

.card {

    position: relative;

    min-height: 180px;

    padding: 25px;

    border-radius: 18px;

    box-shadow:
        0 8px 18px
        rgba(0, 0, 0, 0.08);

    transition: 0.3s;

    animation:
        aparecer
        0.5s ease;
}


.card:hover {

    transform:
        translateY(-5px)
        rotate(-1deg);
}


.card:nth-child(6n + 1) {

    background: #ffe66d;
}


.card:nth-child(6n + 2) {

    background: #ff9ff3;
}


.card:nth-child(6n + 3) {

    background: #7bed9f;
}


.card:nth-child(6n + 4) {

    background: #70a1ff;

    color: white;
}


.card:nth-child(6n + 5) {

    background: #ff9f43;
}


.card:nth-child(6n + 6) {

    background: #a29bfe;
}


.card-nome {

    font-weight: bold;

    font-size: 18px;

    margin-bottom: 14px;
}


.card-mensagem {

    font-size: 17px;

    line-height: 1.5;

    overflow-wrap: anywhere;
}


.card-hora {

    position: absolute;

    bottom: 14px;

    right: 18px;

    font-size: 12px;

    opacity: 0.7;
}


/* =========================
   NOVA RESPOSTA
========================= */

.card.novo {

    animation:
        novaResposta
        1.3s ease;
}


@keyframes aparecer {

    from {

        opacity: 0;

        transform:
            translateY(20px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes novaResposta {

    0% {

        transform:
            scale(0.5);

        opacity: 0;
    }

    50% {

        transform:
            scale(1.08);
    }

    100% {

        transform:
            scale(1);
    }
}


/* =========================
   CARREGAMENTO
========================= */

.carregando {

    grid-column: 1 / -1;

    padding: 40px;

    text-align: center;

    color: #777;
}


/* =========================
   RODAPÉ
========================= */

footer {

    padding: 25px;

    background: #222;

    color: white;

    text-align: center;
}


/* =========================
   CELULAR
========================= */

@media (max-width: 600px) {

    header {

        flex-direction: column;

        gap: 5px;
    }


    header h1 {

        font-size: 30px;
    }


    .logo {

        font-size: 45px;
    }


    .pergunta h2 {

        font-size: 22px;
    }


    .formulario {

        padding: 22px;
    }


    .titulo-mural {

        align-items: flex-start;

        flex-direction: column;
    }


    .contador-respostas {

        width: 100%;
    }

}