@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --fundo: #09070d;
    --fundo-secundario: #100c17;
    --card: #15101d;
    --card-hover: #1c1527;

    --texto: #ffffff;
    --texto-secundario: #aba3b6;
    --texto-suave: #81788c;

    --borda: #30253c;

    --primaria: #925cff;
    --primaria-2: #c45cff;
    --primaria-suave: rgba(146, 92, 255, 0.12);

    --correta: #4bdd8b;
    --correta-fundo: rgba(75, 221, 139, 0.11);

    --errada: #ff6680;
    --errada-fundo: rgba(255, 102, 128, 0.11);

    --sombra: rgba(0, 0, 0, 0.28);
}

body.light {
    --fundo: #f7fbff;
    --fundo-secundario: #eef7ff;
    --card: #ffffff;
    --card-hover: #f6fbff;

    --texto: #263445;
    --texto-secundario: #647487;
    --texto-suave: #8795a5;

    --borda: #d9e9f6;

    --primaria: #8abde8;
    --primaria-2: #a7d6f5;
    --primaria-suave: rgba(138, 189, 232, 0.15);

    --correta: #65c99a;
    --correta-fundo: rgba(101, 201, 154, 0.13);

    --errada: #ee8297;
    --errada-fundo: rgba(238, 130, 151, 0.12);

    --sombra: rgba(102, 146, 180, 0.12);
}

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

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Roboto", sans-serif;
    background: var(--fundo);
    color: var(--texto);
    overflow-x: hidden;
    transition:
        background 0.35s ease,
        color 0.35s ease;
}

body::before {
    content: "";
    position: fixed;
    width: 450px;
    height: 450px;
    top: -180px;
    left: -150px;

    background: var(--primaria);
    opacity: 0.09;

    border-radius: 50%;
    filter: blur(100px);

    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    right: -150px;
    bottom: -180px;

    background: var(--primaria-2);
    opacity: 0.07;

    border-radius: 50%;
    filter: blur(100px);

    pointer-events: none;
}

button,
a {
    font-family: inherit;
}

.pagina {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 1000px;

    margin: 0 auto;
    padding: 28px 20px 70px;
}

.cabecalho {
    position: relative;
    margin-bottom: 35px;
}

.voltar {
    display: inline-block;

    color: var(--primaria);

    text-decoration: none;
    font-size: 15px;
    font-weight: 500;

    margin-bottom: 32px;

    transition: 0.2s ease;
}

.voltar:hover {
    transform: translateX(-4px);
    opacity: 0.8;
}

.botao-tema {
    position: absolute;
    top: 0;
    right: 0;

    width: 46px;
    height: 46px;

    border: 1px solid var(--borda);
    border-radius: 14px;

    background: var(--card);
    color: var(--texto);

    font-size: 20px;

    cursor: pointer;

    box-shadow: 0 8px 25px var(--sombra);

    transition:
        transform 0.2s ease,
        background 0.35s ease,
        border 0.35s ease;
}

.botao-tema:hover {
    transform: translateY(-2px) rotate(5deg);
}

.titulo {
    text-align: center;
}

.emoji-quiz {
    font-size: 52px;
    margin-bottom: 12px;

    animation: flutuar 2.5s ease-in-out infinite;
}

.categoria {
    display: inline-block;

    color: var(--primaria);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 10px;
}

.titulo h1 {
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.1;

    margin-bottom: 12px;
}

.titulo p {
    color: var(--texto-secundario);

    font-size: 16px;
    line-height: 1.5;
}

.aviso {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    margin-bottom: 28px;
    padding: 18px 20px;

    border: 1px solid var(--borda);
    border-radius: 18px;

    background: var(--card);

    box-shadow: 0 12px 30px var(--sombra);

    transition:
        background 0.35s ease,
        border 0.35s ease;
}

.aviso-icone {
    flex-shrink: 0;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--primaria-suave);

    font-size: 21px;
}

.aviso strong {
    display: block;

    color: var(--texto);

    font-size: 15px;

    margin-bottom: 5px;
}

.aviso p {
    color: var(--texto-secundario);

    font-size: 14px;
    line-height: 1.55;
}

.quiz-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 12px;

    color: var(--texto-secundario);

    font-size: 14px;
    font-weight: 500;
}

.barra {
    width: 100%;
    height: 8px;

    margin-bottom: 25px;

    background: var(--borda);

    border-radius: 999px;

    overflow: hidden;
}

#progresso {
    width: 10%;
    height: 100%;

    border-radius: 999px;

    background: linear-gradient(
        90deg,
        var(--primaria),
        var(--primaria-2)
    );

    transition: width 0.4s ease;
}

.questao-card {
    padding: clamp(25px, 5vw, 45px);

    border: 1px solid var(--borda);
    border-radius: 22px;

    background: var(--card);

    box-shadow: 0 20px 60px var(--sombra);

    transition:
        background 0.35s ease,
        border 0.35s ease;
}

.questao-card h2 {
    font-size: clamp(21px, 3vw, 29px);
    line-height: 1.45;

    margin-bottom: 30px;
}

.alternativas {
    display: grid;
    gap: 14px;
}

.alternativa {
    width: 100%;
    min-height: 65px;

    display: flex;
    align-items: center;

    padding: 17px 20px;

    border: 1px solid var(--borda);
    border-radius: 14px;

    background: var(--fundo-secundario);
    color: var(--texto);

    text-align: left;

    cursor: pointer;

    font-size: 16px;
    line-height: 1.45;

    transition:
        transform 0.2s ease,
        background 0.3s ease,
        border 0.3s ease;
}

.alternativa:hover:not(:disabled) {
    transform: translateY(-2px);

    border-color: var(--primaria);

    background: var(--card-hover);
}

.alternativa .letra {
    flex-shrink: 0;

    width: 32px;
    height: 32px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-right: 12px;

    border-radius: 50%;

    background: var(--primaria-suave);
    color: var(--primaria);

    font-weight: 800;
}

.alternativa.correta {
    border-color: var(--correta);
    background: var(--correta-fundo);
}

.alternativa.correta .letra {
    background: var(--correta);
    color: white;
}

.alternativa.errada {
    border-color: var(--errada);
    background: var(--errada-fundo);
}

.alternativa.errada .letra {
    background: var(--errada);
    color: white;
}

.alternativa:disabled {
    cursor: default;
}

.explicacao {
    display: none;

    margin-top: 20px;
    padding: 17px 18px;

    border-left: 4px solid var(--primaria);
    border-radius: 9px;

    background: var(--primaria-suave);

    color: var(--texto-secundario);

    font-size: 15px;
    line-height: 1.6;

    animation: aparecer 0.3s ease;
}

.explicacao.visivel {
    display: block;
}

.btn-proxima {
    display: block;

    margin: 25px 0 0 auto;
    padding: 15px 25px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(
        135deg,
        var(--primaria),
        var(--primaria-2)
    );

    color: white;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s ease;

    box-shadow: 0 10px 25px var(--sombra);
}

.btn-proxima:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-proxima:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.resultado {
    position: relative;

    overflow: hidden;

    text-align: center;

    padding: 60px 25px;

    border: 1px solid var(--borda);
    border-radius: 25px;

    background: var(--card);

    box-shadow: 0 20px 60px var(--sombra);
}

.resultado-icone {
    font-size: 65px;

    margin-bottom: 15px;

    animation: flutuar 2s ease-in-out infinite;
}

.resultado-label {
    color: var(--primaria);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 2px;
}

.resultado h2 {
    font-size: clamp(28px, 5vw, 44px);

    margin: 13px 0;
}

.porcentagem {
    font-size: clamp(55px, 10vw, 90px);

    font-weight: 900;
    line-height: 1;

    margin: 20px 0;

    background: linear-gradient(
        90deg,
        var(--primaria),
        var(--primaria-2)
    );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.resultado-texto {
    color: var(--texto-secundario);

    font-size: 17px;
}

.resultado-estatisticas {
    display: flex;
    justify-content: center;

    gap: 18px;

    margin: 35px 0;

    flex-wrap: wrap;
}

.resultado-estatisticas div {
    min-width: 120px;

    padding: 18px 20px;

    border: 1px solid var(--borda);
    border-radius: 15px;

    background: var(--fundo-secundario);
}

.resultado-estatisticas strong {
    display: block;

    font-size: 28px;

    margin-bottom: 5px;
}

.resultado-estatisticas span {
    color: var(--texto-suave);

    font-size: 13px;
}

.resultado-botoes {
    display: flex;
    justify-content: center;

    gap: 12px;

    flex-wrap: wrap;
}

.btn-refazer,
.btn-secundario {
    border-radius: 12px;

    padding: 15px 22px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s ease;
}

.btn-refazer {
    border: none;

    background: linear-gradient(
        135deg,
        var(--primaria),
        var(--primaria-2)
    );

    color: white;

    box-shadow: 0 10px 25px var(--sombra);
}

.btn-secundario {
    border: 1px solid var(--borda);

    background: var(--fundo-secundario);
    color: var(--texto);
}

.btn-refazer:hover,
.btn-secundario:hover {
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

.confete {
    position: absolute;

    width: 10px;
    height: 18px;

    top: -30px;

    opacity: 0.9;

    animation: cair linear forwards;
}

@keyframes cair {
    from {
        transform: translateY(-20px) rotate(0deg);
    }

    to {
        transform: translateY(800px) rotate(720deg);
    }
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flutuar {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 600px) {

    .pagina {
        padding: 20px 14px 50px;
    }

    .cabecalho {
        margin-bottom: 28px;
    }

    .botao-tema {
        width: 42px;
        height: 42px;

        border-radius: 12px;

        font-size: 18px;
    }

    .emoji-quiz {
        font-size: 44px;
    }

    .aviso {
        padding: 15px;
    }

    .questao-card {
        padding: 22px 17px;

        border-radius: 18px;
    }

    .alternativa {
        font-size: 15px;

        padding: 15px;
    }

    .btn-proxima {
        width: 100%;
    }

    .resultado {
        padding: 45px 18px;
    }

    .resultado-estatisticas {
        gap: 8px;
    }

    .resultado-estatisticas div {
        min-width: 90px;

        padding: 15px 10px;
    }
}