@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --cor-fundo-pagina: #6a7279;
    --cor-fundo-card: #2d3748;
    --cor-texto-principal: #edf2f7;
    --cor-texto-secundario: #1a202c;
    --cor-botao-fundo: #ff7a00;
    --cor-botao-texto: #1a202c;
    --cor-botao-hover: #ffc33c;
    --cor-borda-input: #6a7279;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--cor-fundo-pagina);
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* MUDANÇA AQUI: */
    justify-content: flex-start; /* Alinha tudo no topo ao invés do centro */
    padding-top: 80px;          /* Espaço de ~2.5cm para o futuro cabeçalho */
    
    min-height: 100vh;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

/* O Cartão do App */
.container {
    background-color: var(--cor-fundo-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    /* Removemos margens extras pois o body já controla o espaçamento */
}

.logo-area {
    margin-bottom: 20px;
}

/* Aplicamos estilo diretamente na imagem que tem a classe .app-logo */
.app-logo {
    /* 1. Responsividade de Segurança */
    max-width: 90%; /* Garante que a imagem NUNCA seja maior que a tela do celular */
    
    /* 2. Tamanho Desejado */
    width: 280px;    /* Tenta chegar a 280px se houver espaço */
    
    /* 3. Proporção */
    height: auto;    /* Mantém a proporção (não estica nem achata) */
    
    /* 4. Centralização */
    display: block;  /* Comporta-se como bloco para aceitar margens */
    margin: 0 auto;  /* Centraliza horizontalmente */
}

h1 {
    color: var(--cor-texto-principal);
    margin-bottom: 5px;
    font-weight: 600;
}

.subtitle {
    color: var(--cor-texto-principal);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* Input e DDI */
.input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--cor-borda-input);
    border-radius: 8px;
    padding: 5px 10px;
    margin-bottom: 20px;
    background: #fff;
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--cor-botao-fundo);
}

.country-code {
    font-weight: 600;
    color: var(--cor-fundo-card);
    padding-right: 10px;
    border-right: 1px solid #eee;
    margin-right: 10px;
}

input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1.1rem;
    padding: 10px 0;
    color: var(--cor-fundo-card);
    background: transparent;
}

/* Botões */
button {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    border: none;
}

#btnOpen {
    padding: 15px;
    background-color: var(--cor-botao-fundo);
    color: var(--cor-botao-texto);
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.2s;
    margin-bottom: 10px;
}

#btnOpen:hover {
    background-color: var(--cor-botao-hover);
}

#btnInstall {
    padding: 10px;
    background: transparent;
    color: var(--cor-botao-fundo);
    border: 1px solid var(--cor-botao-fundo);
    font-weight: 600;
    margin-top: 5px;
}

/* Utilitários */
.hidden {
    display: none !important;
}

/* Histórico */
#historySection {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-align: center;
}

#historySection h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

#historyList {
    list-style: none;
    padding: 0;
}

#historyList li {
    background: #f9f9f9;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-clear {
    background: none;
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 10px;
    text-decoration: underline;
}

/* Banner Container */
.banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e0e0e0;
    border-radius: 8px;
    min-height: 90px;
}