:root {
    /* Cores */
    --primary-green: #2ecc71; /* Um verde um pouco mais vibrante */
    --dark-green: #27ae60;
    --light-gray-bg: #f0f2f5; /* Fundo mais claro e suave (será quase branco no mobile) */
    --medium-gray-text: #5e6b7d; /* Texto mais escuro e profissional */
    --dark-text: #2c3e50; /* Títulos mais impactantes */
    --white: #ffffff;
    --light-border: #e0e6ed; /* Bordas e separadores suaves */

    /* Sombras */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08); /* Sombra suave para elementos */
    --shadow-container: 0 15px 40px rgba(0, 0, 0, 0.1); /* Sombra mais pronunciada para o container */
}

body {
    font-family: 'Poppins', sans-serif; /* Fonte mais moderna e legível */
    background: var(--light-gray-bg); /* Fundo padrão para desktop */
    margin: 0;
    padding: 0;
    color: var(--medium-gray-text);
    display: flex; /* Centraliza o container */
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ocupa a altura total da tela */
}
.container {
    max-width: 500px;
    width: 90%; /* Ajuste para melhor responsividade em telas menores */
    margin: auto; /* Mantido para centralização horizontal */
    background: var(--white);
    padding: 40px 30px; /* Mais padding para melhor respiro */
    border-radius: 25px; /* Bordas mais arredondadas */
    box-shadow: var(--shadow-container); /* Sombra mais bonita */
    position: relative;
    overflow: hidden;
    min-height: 420px; /* Aumentado para acomodar conteúdo e transição */
    display: flex; /* Para centralizar o conteúdo de cada step */
    flex-direction: column;
    justify-content: flex-start; /* Alinha ao topo, pois o step ativo já cuida da centralização do conteúdo */
    align-items: center; /* Centraliza itens filhos horizontalmente */
    padding-top: 80px; /* Adiciona espaço para a barra de progresso */
}
h1, h2, p {
    text-align: center;
    margin-bottom: 20px; /* Espaçamento padrão */
}
h1 {
    font-size: 28px; /* Título maior e mais impactante */
    color: var(--dark-text);
    font-weight: 700; /* Mais peso para o título principal */
}
h2 {
    font-size: 22px; /* Título de pergunta um pouco maior */
    color: var(--dark-text);
    font-weight: 600;
    margin-top: 20px; /* Adiciona um pouco de espaço acima dos títulos das perguntas */
}
p {
    font-size: 17px; /* Texto um pouco maior e mais confortável para leitura */
    color: var(--medium-gray-text);
    line-height: 1.6; /* Espaçamento entre linhas para melhor legibilidade */
}
button {
    width: 100%;
    margin: 12px 0;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 15px;
    background: linear-gradient(45deg, var(--primary-green), var(--dark-green));
    color: var(--white);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Sombra mais visível, mas ainda suave, fora do botão */
}
button:hover {
    background: linear-gradient(45deg, var(--dark-green), #27ae60);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Um pouco mais de projeção e opacidade no hover */
    transform: translateY(-2px); /* Mantém o efeito de "levantar" */
}

/* Progress Bar Styles */
.progress-container {
    width: calc(100% - 60px); /* Ajustado para o novo padding do container */
    height: 14px; /* Barra um pouco mais alta */
    background-color: var(--light-border);
    border-radius: 7px;
    margin: 0 auto 30px auto; /* Mais espaço abaixo da barra */
    position: absolute; /* Fixa a barra no topo do container */
    top: 30px; /* Posição da barra de progresso */
    left: 50%;
    transform: translateX(-50%);
}
.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-green);
    border-radius: 7px;
    transition: width 0.4s ease-in-out; /* Transição ligeiramente mais suave */
}
#progress-text {
    position: absolute;
    top: -30px; /* Posicionado um pouco mais acima */
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px; /* Texto maior */
    color: var(--medium-gray-text);
    font-weight: 600;
    white-space: nowrap; /* Evita que o texto quebre a linha */
}

/* Transition Effects for Steps */
.step-wrapper {
    position: relative;
    width: 100%;
    flex-grow: 1; /* Faz com que o wrapper ocupe o espaço restante */
    display: flex; 
    justify-content: center; /* Centraliza o step ativo dentro do wrapper */
    align-items: center;
    overflow: hidden;
}

.step {
    position: absolute; /* Para a transição de slide */
    width: 100%; 
    height: 100%; /* GARANTE QUE CADA STEP OCUPE 100% DA ALTURA DO SEU PAI (.step-wrapper) */
    padding: 0 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, visibility 0.6s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center; /* CENTRALIZA VERTICALMENTE O CONTEÚDO DENTRO DO STEP */
    align-items: center; /* CENTRALIZA HORIZONTALMENTE O CONTEÚDO DENTRO DO STEP */
    text-align: center;
    box-sizing: border-box; /* Inclui padding na largura total */
}
.step.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative; /* Volta ao fluxo para ocupar espaço no wrapper */
    height: 100%; /* ESSENCIAL PARA CENTRALIZAÇÃO VERTICAL */
}
.step.leaving {
    transform: translateX(-100%);
}

/* Estilos para as opções de idade (Step 2) */
.age-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Cria 2 colunas de igual largura */
    gap: 15px; /* Espaçamento entre as opções */
    margin-top: 20px;
    width: 100%; /* Ocupa a largura total disponível */
}

.age-option {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.age-option:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.age-option img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--light-border);
    object-fit: cover;
    aspect-ratio: 16/9;
}

.age-label {
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
    padding: 15px 0;
    font-weight: 600;
    width: 100%;
    font-size: 1.1em;
}

/* Estilos para o Step de "Problema" (stepBonus) */
.problem-title {
    color: var(--primary-green);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}
.problem-text {
    color: var(--dark-text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
}
.problem-small-text {
    color: var(--medium-gray-text);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
}


/* ========================================================= */
/* RESPONSIVIDADE - MELHORIAS SIGNIFICATIVAS PARA CELULAR   */
/* ========================================================= */
@media (max-width: 600px) {
    body {
        min-height: 100vh; /* Mantém 100vh para a centralização */
        padding: 0;
        background: var(--white); /* Fundo branco no mobile */
        overflow: hidden; /* Evita rolagem indesejada */
    }

    .container {
        width: 100%;
        height: 100vh; /* Faz o container ocupar 100% da altura da tela */
        margin: 0;
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
        padding-top: 20px; /* Ajusta padding superior para barra */
        justify-content: center; /* Centraliza conteúdo do container (steps) */
        align-items: center;
    }
    
    /* REMOVER O NUMERADOR DE PÁGINAS */
    #progress-text {
        display: none !important; /* Força a remoção do texto de progresso */
    }

    /* Ajustar a barra de progresso */
    .progress-container {
        width: calc(100% - 40px); 
        height: 8px;
        top: 15px;
        z-index: 10; /* Garante que a barra esteja acima de outros elementos */
    }

    h1 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    h2 {
        font-size: 18px;
        margin-top: 15px;
        margin-bottom: 12px;
    }
    p {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    button {
        padding: 12px 15px;
        font-size: 15px;
        margin: 8px 0;
        border-radius: 10px;
    }

    /* CENTRALIZAR O CONTEÚDO DE CADA STEP */
    .step-wrapper {
        flex-grow: 1;
        width: 100%;
        height: 100%; /* Garante que o wrapper ocupa o espaço restante */
    }
    .step {
        width: 100%;
        height: 100%; /* Faz o step preencher o .step-wrapper e permite centralização */
        padding: 0 15px; /* Padding lateral */
        /* justify-content: center e align-items: center já estão definidos acima para .step */
    }

    /* Opções de Idade em Mobile */
    .age-options {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 10px;
    }
    .age-option img {
        /* height: auto; */
    }
    .age-label {
        padding: 10px 0;
        font-size: 0.95em;
    }

    /* Estilos para o Step de "Problema" (stepBonus) em Mobile */
    .problem-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .problem-text {
        font-size: 15px;
        margin-bottom: 15px;
    }
    .problem-small-text {
        font-size: 13px;
        margin-bottom: 20px;
    }
}