/* Reset básico e fontes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha no topo */
    min-height: 100vh;
    padding: 20px 10px;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px 15px;
    max-width: 700px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 1.8rem;
}

/* Estilo para subtítulo abaixo do H1 */
.subtitle {
    font-size: 1rem;
    color: #555;
    margin-bottom: 25px;
    margin-top: -15px; /* Aproxima do H1 */
}


/* Cabeçalho e Seção Principal */
header { margin-bottom: 20px; }
main { width: 100%; }
.converter-section { margin-bottom: 30px; } /* Espaço após o conversor */

/* Estilos para as novas seções de conteúdo */
.content-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa; /* Cor de fundo levemente diferente */
    border-radius: 8px;
    text-align: left;
    border: 1px solid #e9ecef;
}

.content-section h2 {
    color: #343a40;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.4rem;
}

.content-section p {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #495057;
}

.content-section ul {
    list-style: none; /* Remove marcadores padrão */
    padding-left: 0;
    margin-bottom: 10px;
}

.content-section ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd; /* Linha separadora leve */
    color: #333;
}
.content-section ul li:last-child {
    border-bottom: none;
}

.disclaimer {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    margin-top: 15px;
    font-style: italic;
}


/* Estilos para a lista de FAQ */
.faq-list {
    margin-top: 15px;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item h3 {
    color: #0056b3; /* Azul um pouco mais escuro para perguntas */
    margin-bottom: 8px;
    font-size: 1.1rem;
}

/* Linha divisória entre seções */
.section-divider {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin: 40px auto; /* Aumenta espaçamento */
    width: 80%;
}

/* Grupo de Inputs e Selects */
.converter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Espaçamento entre elementos */
}

.input-group, .select-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinha labels à esquerda */
    width: 100%;
}

.input-group label, .select-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="number"], select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff;
    appearance: none; /* Remove estilo padrão do select */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'); /* Adiciona seta customizada */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px auto;
    cursor: pointer;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Grupo de seleção de moedas (De/Para) */
.currency-group {
    display: flex;
    align-items: center; /* Alinha verticalmente os selects e o botão swap */
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.currency-group .select-group {
    flex: 1; /* Faz os selects ocuparem espaço disponível */
}

#swapButton {
    padding: 8px 12px;
    font-size: 1.2rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 50%; /* Botão redondo */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    height: 40px; /* Altura similar aos inputs/selects */
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px; /* Alinha com os inputs */
}

#swapButton:hover {
    background-color: #5a6268;
    transform: rotate(180deg);
}

/* Botão Converter */
#convertButton {
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%; /* Ocupa largura total */
    margin-top: 10px; /* Espaço acima */
}

#convertButton:hover {
    background-color: #0056b3;
}

/* Área de Resultado */
.result-area {
    margin-top: 30px;
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 5px;
    text-align: left;
}

.result-area h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #343a40;
}

#conversionResult {
    font-size: 1.4rem;
    font-weight: bold;
    color: #28a745; /* Verde para sucesso/resultado */
    margin-bottom: 10px;
    word-wrap: break-word; /* Quebra palavras longas */
}

#exchangeRateInfo, #lastUpdated {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Indicador de Loading */
.loading-indicator {
    margin-top: 15px;
    color: #007bff;
    font-style: italic;
}


/* Rodapé */
footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #888;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 640px) {
    .container {
        padding: 15px 10px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .subtitle { 
        font-size: 0.9rem; 
    }
    
    .content-section h2 { 
        font-size: 1.3rem; 
    }
    
    .faq-item h3 { 
        font-size: 1rem; 
    }

    .currency-group {
        flex-direction: column; /* Empilha os selects e o botão */
        align-items: stretch; /* Faz os elementos ocuparem largura total */
    }

    #swapButton {
        margin-top: 0; /* Remove margem superior quando empilhado */
        margin-bottom: 15px; /* Adiciona espaço abaixo */
        width: 50px; /* Ajusta largura */
        align-self: center; /* Centraliza o botão */
        transform: rotate(90deg); /* Rotaciona para indicar troca vertical */
    }

     #swapButton:hover {
        transform: rotate(270deg); /* Ajusta rotação no hover */
    }

    #convertButton {
        font-size: 1rem;
    }

    #conversionResult {
        font-size: 1.2rem;
    }
}

/* Adicione estilos para o container de anúncios se usar blocos manuais */
.adsense-unit {
    /* Estilos para o container do anúncio, ex: min-height para evitar colapso */
    min-height: 90px; /* Ajuste conforme necessário */
    margin: 20px 0; /* Espaçamento */
}