:root {
    /* ===== CONTROLE DA LOGO (tamanho único para todos os dispositivos) ===== */
    --logo-max-width: 320px;      /* largura máxima - altere aqui se desejar */
    --logo-max-height: 160px;     /* altura máxima - altere aqui se desejar */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(145deg, #f3f5fc 0%, #e8ecf5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 40px;
}

/* Cabeçalho fixo com logo e barra */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-radius: 0 0 32px 32px;
    padding: 12px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.logo-img {
    width: auto;
    height: auto;
    max-width: var(--logo-max-width);
    max-height: var(--logo-max-height);
    object-fit: contain;
    border-radius: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8a2be2, #c084fc);
    border-radius: 20px;
    transition: width 0.3s ease;
}

/* Container das perguntas e diagnóstico - ambos com largura responsiva */
main, #final-diagnosis {
    width: 100%;
    max-width: 680px;
    background: white;
    border-radius: 36px;
    padding: 32px 28px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: all 0.2s;
}

.question-container h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 28px;
    line-height: 1.3;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.options-container button {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 14px 20px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    width: 100%;
    word-break: break-word;
}

.options-container button:hover {
    background: #8a2be2;
    border-color: #8a2be2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(138, 43, 226, 0.2);
}

/* Estilos do diagnóstico final */
#final-diagnosis h2 {
    color: #8a2be2;
    font-size: 1.9rem;
    margin-bottom: 20px;
    border-left: 5px solid #8a2be2;
    padding-left: 18px;
    text-align: left;
    word-break: break-word;
}

.stats {
    background: #f8fafc;
    padding: 20px;
    border-radius: 28px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.stats p {
    margin: 0;
    font-weight: 600;
    background: white;
    padding: 8px 18px;
    border-radius: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex: 1;
    min-width: fit-content;
    text-align: center;
}

.diagnostic-box {
    background: #f1f5fe;
    padding: 20px;
    border-radius: 28px;
    margin: 20px 0;
    text-align: left;
    line-height: 1.5;
    word-break: break-word;
}

/* Botão dinâmico */
.button-group {
    display: flex;
    justify-content: center;
    margin-top: 28px;
    width: 100%;
}

.btn-pdf, .btn-whatsapp {
    border: none;
    padding: 16px 24px;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    display: inline-block;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
}

.btn-pdf {
    background: linear-gradient(135deg, #8a2be2, #a855f7);
    color: white;
    box-shadow: 0 8px 18px rgba(138, 43, 226, 0.3);
}

.btn-pdf:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(138, 43, 226, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.4);
}

.hidden {
    display: none;
}

/* ========== RESPONSIVIDADE ESPECÍFICA PARA MOBILE ========== */
@media (max-width: 768px) {
    body {
        padding: 0 12px 32px;
    }

    main, #final-diagnosis {
        padding: 24px 18px;
        border-radius: 28px;
    }

    .question-container h2 {
        font-size: 1.4rem;
    }

    .options-container button {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    /* Diagnóstico final no mobile */
    #final-diagnosis h2 {
        font-size: 1.5rem;
        padding-left: 12px;
        border-left-width: 4px;
    }

    .stats {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 10px;
    }

    .stats p {
        text-align: center;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .diagnostic-box {
        padding: 16px;
        font-size: 0.95rem;
    }

    .btn-pdf, .btn-whatsapp {
        font-size: 1rem;
        padding: 14px 20px;
        max-width: 100%;
    }
}

/* Ajuste para telas muito pequenas (até 480px) */
@media (max-width: 480px) {
    main, #final-diagnosis {
        padding: 20px 14px;
    }

    .question-container h2 {
        font-size: 1.2rem;
    }

    #final-diagnosis h2 {
        font-size: 1.3rem;
    }

    .stats p {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .diagnostic-box {
        padding: 14px;
        font-size: 0.9rem;
    }

    .btn-pdf, .btn-whatsapp {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}

/* Opcional: reduzir a logo em telas muito pequenas (descomente se desejar) */
/* @media (max-width: 480px) {
    .logo-img {
        max-width: 260px;
        max-height: 100px;
    }
} */