/* Classe utilitária para esconder elementos via JavaScript */
.hidden {
    display: none !important;
}


/* Reset básico e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    overflow: hidden; /* Esconde qualquer conteúdo que transborde, essencial para o efeito de fundo */
}

/* --- EFEITO DE FUNDO MATRIX (VERDE) --- */
#matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Coloca o fundo atrás de todo o conteúdo */
    overflow: hidden;
    background-color: #0d0d0d; /* Um preto um pouco mais escuro para o fundo */
}

.matrix-text {
    position: absolute;
    bottom: -50px; /* Começa a animação abaixo da tela */
    color: #003a00; /* Verde escuro, clássico do Matrix */
    font-family: 'Roboto Mono', monospace;
    user-select: none; /* O texto não pode ser selecionado pelo usuário */
    white-space: nowrap; /* Impede que o texto quebre em várias linhas */
    animation: scroll-up 20s linear forwards; /* Animação para subir */
}

@keyframes scroll-up {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-110vh); /* Move o texto até sair completamente por cima */
    }
}

/* --- EFEITO DE FUNDO MATRIX (VERMELHO) --- */
.matrix-text-red {
    position: absolute;
    top: -50px; /* Começa a animação acima da tela */
    color: #ff0000; /* Vermelho bem escuro e ameaçador */
    font-family: 'Roboto Mono', monospace;
    user-select: none;
    white-space: nowrap;
    animation: scroll-down 35s linear forwards; /* Usa a nova animação 'scroll-down' */
}

@keyframes scroll-down {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(110vh); /* Move o texto até sair completamente por baixo */
    }
}


/* --- ESTADO INICIAL (TELA DE BOAS-VINDAS) --- */
#initial-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

#initial-input-container .prompt-input {
    width: 60vw;
    font-size: 1.5rem;
    text-align: center;
}

/* --- ESTADO DE RESULTADOS (APÓS A BUSCA) --- */
#results-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#results-container header {
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.8); /* Fundo semi-transparente para o header */
    backdrop-filter: blur(5px); /* Efeito de desfoque no fundo do header */
    position: relative;
    z-index: 10;
}

#results-container header form {
    width: 100%;
    display: flex;
    justify-content: center;
}

#results-container .prompt-input {
    font-size: 1rem;
    text-align: left;
    max-width: 800px;
}

#results-container main {
    flex-grow: 1;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto; /* Permite rolar o conteúdo da resposta se for longo */
    line-height: 1.6;
}

/* Estilo compartilhado para os campos de input */
.prompt-input {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #444;
    color: #e0e0e0;
    padding: 10px;
    width: 100%;
    outline: none;
    transition: border-color 0.3s ease;
}

.prompt-input:focus {
    border-bottom-color: #00aaff; /* Azul futurista ao focar */
}

/* Estilos para o conteúdo da resposta da IA */
#response-content h3 {
    color: #00aaff;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

#response-content strong {
    color: #00ffcc; /* Ciano para dar destaque ao texto em negrito */
    font-weight: normal; /* A fonte já é monoespaçada, o peso normal fica bom */
}

.error {
    color: #ff5555; /* Vermelho para mensagens de erro */
    font-weight: bold;
}
