/* style.css */
/* Importar fonte pixelada do Google Fonts (opcional, mas recomendado para o visual) */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Reset básico para garantir consistência entre navegadores */
* {
	font-family: 'Press Start 2P', arial, monospace;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilo geral do corpo da página */
body {
    font-family: 'Press Start 2P', arial, monospace; /* Fonte pixelada, fallback para monospace */
    background-color: #222; /* Fundo escuro, como um arcade */
    color: #eee; /* Texto claro */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh; /* Ocupa a altura total da viewport */
    padding: 20px;
    text-align: center;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect width="10" height="10" fill="%23222"/><rect x="0" y="0" width="1" height="1" fill="%23333"/><rect x="5" y="5" width="1" height="1" fill="%23333"/></svg>'); /* Padrão de fundo sutil */
}


/* Cabeçalho */
header {
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: #00ff00; /* Verde neon */
    /*text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; /* Efeito neon */
    margin-bottom: 10px;
}

/* Main content area */
main {
    background-color: #333; /* Fundo mais claro para a área principal */
    border: 5px solid #00ff00; /* Borda neon */
    box-shadow: 0 0 15px #00ff00, 0 0 30px #00ff00;
    padding: 30px;
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
    margin-bottom: 30px;
}

/* Seções de autenticação e jogo */
section {
    margin-bottom: 20px;
}

section h2 {
    font-size: 1.8em;
    color: #ff00ff; /* Magenta neon */
    margin-bottom: 20px;
    text-shadow: 0 0 8px #ff00ff;
}

/* Formulários de autenticação */
.auth-forms {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Para telas menores */
    gap: 20px;
}

.form-container {
    background-color: #444;
    border: 2px solid #00ffff; /* Ciano neon */
    padding: 20px;
    border-radius: 8px;
    flex: 1;
    min-width: 280px; /* Garante que não fiquem muito pequenos */
}

.form-container h3 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.3em;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form label {
    text-align: left;
    font-size: 0.9em;
    color: #ccc;
}

form input[type="email"],
form input[type="password"] {
    padding: 10px;
    border: 2px solid #555;
    background-color: #222;
    color: #eee;
    font-family: 'Press Start 2P', cursive, monospace;
    font-size: 0.8em;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

form input[type="email"]:focus,
form input[type="password"]:focus {
    border-color: #00ff00;
    box-shadow: 0 0 5px #00ff00;
}

form button {
    background-color: #00ff00;
    color: #222;
    border: none;
    padding: 12px 20px;
    font-family: 'Press Start 2P', cursive, monospace;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 15px;
    transition: background-color 0.3s, transform 0.1s;
}

form button:hover {
    background-color: #00cc00;
    transform: translateY(-2px);
}

form button:active {
    transform: translateY(0);
}

.message {
    margin-top: 10px;
    font-size: 0.8em;
    color: #ff0000; /* Mensagens de erro em vermelho */
}

/* Canvas do jogo */
#gameCanvas {
    background-color: #000; /* Fundo preto para o jogo */
    border: 4px solid #fff; /* Borda branca para destacar */
    margin-top: 20px;
    image-rendering: pixelated; /* Garante que os pixels não sejam suavizados */
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Informações do jogo e botão de logout */
.game-info {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.1em;
}

.game-info p {
    color: #00ffff;
}

#logout-button {
    background-color: #ff0000; /* Botão de sair em vermelho */
    color: #eee;
    border: none;
    padding: 8px 15px;
    font-family: 'Press Start 2P', cursive, monospace;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#logout-button:hover {
    background-color: #cc0000;
}

/* Rodapé */
footer {
    margin-top: auto; /* Empurra o rodapé para baixo */
    font-size: 0.8em;
    color: #888;
}

/* Responsividade básica */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    section h2 {
        font-size: 1.4em;
    }
    .auth-forms {
        flex-direction: column;
        align-items: center;
    }
    .form-container {
        width: 90%;
        min-width: unset;
    }
    #gameCanvas {
        width: 100%; /* Ajusta o canvas para caber na tela */
        height: auto;
    }
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
}


/* Estilos para o botão e seção de instruções */
.instructions-button-container {
    text-align: center;
    margin-bottom: 20px;
}

.instructions-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.instructions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#instructions-section {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.instructions-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
    text-align: left;
}

.controls-section, .game-info-section, .scoring-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.controls-section h3, .game-info-section h3, .scoring-section h3 {
    color: #667eea;
    margin-top: 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.instructions-content ul {
    list-style: none;
    padding: 0;
}

.instructions-content li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.instructions-content li:last-child {
    border-bottom: none;
}

.instructions-content strong {
    color: #ffd700;
}

#close-instructions-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#close-instructions-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Responsividade */
@media (max-width: 768px) {
    .instructions-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #instructions-section {
        margin: 10px;
        padding: 20px;
    }
}