@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-down {
    animation: slideDown 0.4s ease-out;
}

.animate-pulse-custom {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Opções de Resposta */
.opcao-resposta {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: white;
    overflow: hidden;
}

.opcao-resposta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: all 0.3s ease;
}

.opcao-resposta:hover {
    transform: translateX(4px);
    border-color: #259995;
    box-shadow: 0 4px 12px rgba(37, 153, 149, 0.15);
}

.opcao-resposta:hover::before {
    background: #259995;
}

.opcao-resposta.selecionada {
    border-color: #FFA500;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.25);
}

.opcao-resposta.selecionada::before {
    background: #FFA500;
    width: 6px;
}

.opcao-resposta .opcao-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.opcao-resposta.selecionada .opcao-numero {
    background: #FFA500;
    color: white;
    transform: scale(1.1);
}

.opcao-resposta .opcao-texto {
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

.opcao-resposta.selecionada .opcao-texto {
    color: #1f2937;
    font-weight: 600;
}

/* Indicadores de Pergunta */
.indicador-pergunta {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .indicador-pergunta {
        width: 12px;
        height: 12px;
    }
}

.indicador-pergunta.respondida {
    background: #259995;
    transform: scale(1.2);
}

.indicador-pergunta.atual {
    background: #FFA500;
    transform: scale(1.5);
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.6);
}

.indicador-pergunta:hover {
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(37, 153, 149, 0.4);
}

/* Botões */
.btn-primary-custom {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7F00 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.3);
}

.btn-secondary-custom {
    background: linear-gradient(135deg, #259995 0%, #147976 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: linear-gradient(135deg, #147976 0%, #259995 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 153, 149, 0.3);
}

/* Mobile First - Ajustes */
@media (max-width: 640px) {
    .opcao-resposta {
        padding: 14px;
    }
    
    .opcao-resposta .opcao-texto {
        font-size: 14px;
    }
    
    #pergunta-texto {
        font-size: 18px !important;
    }
}

/* Desktop - Melhorias */
@media (min-width: 1024px) {
    .opcao-resposta {
        padding: 20px 24px;
        border-radius: 16px;
    }
    
    .opcao-resposta .opcao-numero {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .opcao-resposta .opcao-texto {
        font-size: 17px;
    }
    
    .opcao-resposta:hover {
        transform: translateX(8px);
    }
    
    #pergunta-card {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    
    #topico-indicador {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1280px) {
    main {
        max-width: 1200px;
    }
    
    .opcao-resposta {
        padding: 24px 28px;
    }
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #259995;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efeito de transição entre perguntas */
.pergunta-entrada {
    animation: fadeIn 0.4s ease-out;
}

.pergunta-saida {
    animation: fadeOut 0.3s ease-in;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Acessibilidade */
.opcao-resposta:focus {
    outline: 2px solid #259995;
    outline-offset: 2px;
}

/* Melhorias de performance */
.opcao-resposta,
.btn-primary-custom,
.btn-secondary-custom {
    will-change: transform;
}

/* Animação de Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFA500;
    top: -10px;
    animation: confetti-fall 3s ease-in forwards;
}

.confetti-1 {
    left: 10%;
    background: #FFA500;
    animation-delay: 0s;
}

.confetti-2 {
    left: 20%;
    background: #259995;
    animation-delay: 0.2s;
}

.confetti-3 {
    left: 30%;
    background: #FFA500;
    animation-delay: 0.4s;
}

.confetti-4 {
    left: 40%;
    background: #259995;
    animation-delay: 0.6s;
}

.confetti-5 {
    left: 50%;
    background: #FFA500;
    animation-delay: 0.8s;
}

.confetti-6 {
    left: 60%;
    background: #259995;
    animation-delay: 1s;
}

.confetti-7 {
    left: 70%;
    background: #FFA500;
    animation-delay: 1.2s;
}

.confetti-8 {
    left: 80%;
    background: #259995;
    animation-delay: 1.4s;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Mensagem de Cache - Layout Responsivo */
.mensagem-cache-container {
    background: #f0f9ff;
    border-left: 4px solid #259995;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 12px;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.mensagem-cache-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.mensagem-cache-icon {
    flex-shrink: 0;
    color: #259995;
    font-size: 20px;
    line-height: 1.2;
    margin-top: 2px;
}

.mensagem-cache-texto {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.mensagem-cache-titulo {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.mensagem-cache-descricao {
    font-size: 13px;
    color: #4b5563;
    margin: 0 0 12px 0;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mensagem-cache-descricao strong {
    color: #259995;
    font-weight: 600;
}

.mensagem-cache-botoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.btn-continuar-cache,
.btn-comecar-novo {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-continuar-cache {
    background: #259995;
    color: white;
}

.btn-continuar-cache:hover {
    background: #147976;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 153, 149, 0.3);
}

.btn-comecar-novo {
    background: #e5e7eb;
    color: #374151;
}

.btn-comecar-novo:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

/* Desktop - Botões lado a lado */
@media (min-width: 640px) {
    .mensagem-cache-container {
        padding: 20px;
    }
    
    .mensagem-cache-icon {
        font-size: 24px;
    }
    
    .mensagem-cache-titulo {
        font-size: 16px;
    }
    
    .mensagem-cache-descricao {
        font-size: 14px;
    }
    
    .mensagem-cache-botoes {
        flex-direction: row;
        gap: 12px;
    }
    
    .btn-continuar-cache,
    .btn-comecar-novo {
        width: auto;
        flex: 1;
        min-width: 120px;
    }
}

@media (min-width: 768px) {
    .mensagem-cache-container {
        padding: 24px;
    }
}

/* ========== Resultado Pontuação - Card interativo ========== */
.resultado-pontuacao-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(255, 165, 0, 0.15);
    border-left: 6px solid #FFA500;
    animation: resultadoCardEntrada 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.resultado-pontuacao-card.faixa-1 { border-left-color: #e67e22; box-shadow: 0 10px 40px rgba(0,0,0,0.08), 0 0 0 4px rgba(230, 126, 34, 0.2); }
.resultado-pontuacao-card.faixa-2 { border-left-color: #FFA500; box-shadow: 0 10px 40px rgba(0,0,0,0.08), 0 0 0 4px rgba(255, 165, 0, 0.2); }
.resultado-pontuacao-card.faixa-3 { border-left-color: #259995; box-shadow: 0 10px 40px rgba(0,0,0,0.08), 0 0 0 4px rgba(37, 153, 149, 0.2); }
.resultado-pontuacao-card.faixa-4 { border-left-color: #147976; box-shadow: 0 10px 40px rgba(0,0,0,0.08), 0 0 0 4px rgba(20, 121, 118, 0.25); }

@keyframes resultadoCardEntrada {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.resultado-pontuacao-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem 2rem;
    margin-bottom: 1.75rem;
}

.resultado-score-circle {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.resultado-score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.resultado-score-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.resultado-score-ring {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.4s ease;
}

.resultado-pontuacao-card.faixa-1 .resultado-score-ring { stroke: #e67e22; }
.resultado-pontuacao-card.faixa-2 .resultado-score-ring { stroke: #FFA500; }
.resultado-pontuacao-card.faixa-3 .resultado-score-ring { stroke: #259995; }
.resultado-pontuacao-card.faixa-4 .resultado-score-ring { stroke: #147976; }

.resultado-score-numero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.resultado-pontos-valor {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #1f2937;
    display: inline-block;
    min-width: 2ch;
}

.resultado-pontos-max {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    display: block;
}

.resultado-perfil-titulo {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    text-align: center;
    width: 100%;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .resultado-perfil-titulo {
        font-size: 1.25rem;
    }
}

.resultado-faixa-wrapper {
    text-align: center;
}

.resultado-faixa-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    animation: resultadoBadgeEntrada 0.5s 0.3s ease-out backwards;
}

.resultado-pontuacao-card.faixa-1 .resultado-faixa-badge { background: linear-gradient(135deg, #e67e22, #d35400); }
.resultado-pontuacao-card.faixa-2 .resultado-faixa-badge { background: linear-gradient(135deg, #FFA500, #f59e0b); }
.resultado-pontuacao-card.faixa-3 .resultado-faixa-badge { background: linear-gradient(135deg, #259995, #0d9488); }
.resultado-pontuacao-card.faixa-4 .resultado-faixa-badge { background: linear-gradient(135deg, #147976, #0f766e); }

.resultado-faixa-label {
    margin: 0.35rem 0 0 0;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

@keyframes resultadoBadgeEntrada {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.resultado-barra-escala {
    margin-bottom: 1.75rem;
}

.resultado-barra-bg {
    height: 10px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.resultado-barra-fill {
    height: 100%;
    border-radius: 9999px;
    width: 0%;
    transition: width 1s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.resultado-pontuacao-card.faixa-1 .resultado-barra-fill { background: linear-gradient(90deg, #e67e22, #f39c12); }
.resultado-pontuacao-card.faixa-2 .resultado-barra-fill { background: linear-gradient(90deg, #FFA500, #fbbf24); }
.resultado-pontuacao-card.faixa-3 .resultado-barra-fill { background: linear-gradient(90deg, #259995, #2dd4bf); }
.resultado-pontuacao-card.faixa-4 .resultado-barra-fill { background: linear-gradient(90deg, #147976, #14b8a6); }

.resultado-barra-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
}

.resultado-mensagem-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resultado-mensagem-list p {
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
    opacity: 0;
    animation: resultadoParagrafoEntrada 0.5s ease-out forwards;
}

.resultado-mensagem-list p:nth-child(1) { animation-delay: 0.5s; }
.resultado-mensagem-list p:nth-child(2) { animation-delay: 0.65s; }
.resultado-mensagem-list p:nth-child(3) { animation-delay: 0.8s; }
.resultado-mensagem-list p:nth-child(4) { animation-delay: 0.95s; }
.resultado-mensagem-list p:nth-child(5) { animation-delay: 1.1s; }
.resultado-mensagem-list p:nth-child(6) { animation-delay: 1.25s; }
.resultado-mensagem-list p:nth-child(7) { animation-delay: 1.4s; }

@keyframes resultadoParagrafoEntrada {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (min-width: 640px) {
    .resultado-pontuacao-card {
        padding: 2.5rem 2rem;
    }
    .resultado-score-circle {
        width: 140px;
        height: 140px;
    }
    .resultado-score-bg {
        stroke-dasharray: 339.292;
    }
    .resultado-pontos-valor {
        font-size: 2.5rem;
    }
}

/* ========== Botão Flutuante WhatsApp ========== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    color: white;
    font-size: 32px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #128C7E, #25D366);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-float i {
    display: block;
    line-height: 1;
}

/* Link de WhatsApp em texto (sem azul padrão) */
.link-whatsapp-text {
    color: #259995;
    text-decoration: none;
    font-weight: 600;
}

.link-whatsapp-text:hover {
    color: #147976;
    text-decoration: underline;
}

/* Animação de pulso */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

.whatsapp-float {
    animation: whatsappPulse 2s ease-in-out infinite;
}

/* Mobile - ajuste de tamanho e posição */
@media (max-width: 640px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
    }
}

