/* Reset e configurações de WebApp */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #3b1d15;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- TELA DE CARREGAMENTO (SPLASH) --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#splash-screen img {
    width: 180px;
    margin-bottom: 20px;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b1d15;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- CONTAINER DO APP --- */
#app-container {
    opacity: 0; /* O JS vai mudar para 1 */
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    align-items: center;
}

/* Cabeçalho */
header {
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start;
    background-color: #ffffff; 
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header img {
    max-width: 140px; 
    height: auto;
    display: block;
}

/* Conteúdo Principal */
main {
    width: 100%;
    max-width: 600px; 
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px; 
    margin-top: 10px;
}

/* Cards de Ação (Botões) */
.card-link {
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transition: transform 0.1s ease;
}

.card-link:active {
    transform: scale(0.96); 
}

.card-link img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Ajustes para telas maiores (Desktop/Tablets) */
@media (min-width: 768px) {
    header {
        padding: 20px 40px;
    }
    
    header img {
        max-width: 180px;
    }
    
    main {
        padding: 40px 20px;
        gap: 30px;
    }
    
    .card-link:hover {
        transform: translateY(-5px); 
    }
}