@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

h1, h2 {
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px #ffcc00;
    margin: 20px 0;
}

#loginSection,
#container {
    position: relative; /* Adicionado para garantir o posicionamento absoluto dos elementos filhos */
    background-color: #111;
    padding: 20px;
    border: 4px solid #ffcc00;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin: 20px 0;
}

input[type="email"],
input[type="password"],
input[type="text"],
#hostCodeInput {
    padding: 10px;
    border: 2px solid #ffcc00;
    border-radius: 4px;
    width: calc(100% - 24px); /* Ajustado para considerar padding e border */
    box-sizing: border-box;
    background-color: #222;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 10px; /* Espaçamento entre os campos de texto */
}

button {
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    font-family: 'Press Start 2P', cursive;
    width: calc(100% - 22px); /* Ajustado para considerar padding e border */
    margin: 10px 0; /* Espaçamento acima e abaixo do botão */
    box-sizing: border-box;
}

button:hover {
    background-color: #ffaa00;
}

.message {
    font-weight: bold;
    margin-top: 10px;
    color: red;
    text-align: center;
}

.hidden {
    display: none;
}

#treasureModal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    justify-content: center; 
    align-items: center; 
}

.modal-content { 
    background: #fff; 
    padding: 20px; 
    border-radius: 5px; 
    position: relative; 
    width: 80%; 
    max-width: 500px; 
}

.close { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    font-size: 20px; 
    cursor: pointer; 
    color: #000;
}

/* Additional styles for pixel art theme */
.pixel-border {
    border: 4px solid #ffcc00;
    box-shadow: 0 0 0 4px #111, 0 0 20px rgba(255, 255, 0, 0.5);
}

.pixel-input {
    border: 2px solid #ffcc00;
    box-shadow: 0 0 0 2px #222;
}

.pixel-button {
    border: none;
    box-shadow: 0 0 0 2px #ffaa00, 0 0 20px rgba(255, 255, 0, 0.5);
}

.pixel-button:hover {
    box-shadow: 0 0 0 2px #ffaa00, 0 0 20px rgba(255, 170, 0, 0.5);
}

/* Key Counter */
.key-counter {
    position: fixed; /* Fixar no canto superior direito da tela */
    top: 10px;
    right: 10px;
    background-color: #222;
    color: #ffcc00;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    z-index: 1000; /* Garante que o contador fique sobre outros elementos */
}

 /* Estilo do modal */
 .modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    width: 80%;
    max-width: 600px;
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #000;
}

.celebration-image {
    width: 80%;
    max-width: 300px;
    margin: 20px 0;
}

.modal-footer button {
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.modal-footer button:hover {
    background-color: #ffaa00;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}