/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
}

/* Container principal */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #000 0%, #111 100%);
    padding: 20px;
}

/* Container do jogo */
.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Login/Cadastro */
.login-container {
    background: #111;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    border: 1px solid #39ff14;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    color: #fff;
}

.logo span {
    color: #39ff14;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: #39ff14;
    border-bottom: 2px solid #39ff14;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #39ff14;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* Botões */
.btn-primary,
.btn-play {
    background: #39ff14;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background: #2ee000;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.btn-play {
    padding: 15px 30px;
    font-size: 1.2rem;
    margin-top: 20px;
}

.btn-play:hover {
    background: #2ee000;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.7);
}

.btn-play:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-logout {
    padding: 8px 15px;
    background: #ff3333;
    color: #fff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ff0000;
}

/* Header do jogo */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #111;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance {
    font-size: 1.2rem;
    font-weight: bold;
    color: #39ff14;
}

/* Área principal do jogo */
.game-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.scratch-card-container {
    text-align: center;
    padding: 30px;
    background: #111;
    border-radius: 15px;
    border: 1px solid #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

#scratchCard {
    background: #333;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.scratch-info {
    margin-bottom: 20px;
}

.scratch-info p {
    margin-bottom: 10px;
    color: #ccc;
}

/* Histórico */
.game-history {
    padding: 20px;
    background: #111;
    border-radius: 15px;
    border: 1px solid #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #222;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #39ff14;
    border-radius: 3px;
}

.history-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #222;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.history-item:hover {
    background: #2a2a2a;
    transform: translateX(5px);
}

.history-item.ganhou {
    border-left: 4px solid #39ff14;
}

.history-item.perdeu {
    border-left: 4px solid #ff3333;
}

.history-item:last-child {
    margin-bottom: 0;
}

/* Indicador de carregamento */
.loading {
    text-align: center;
    color: #39ff14;
    padding: 20px;
}

/* Mensagens */
.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background: rgba(57, 255, 20, 0.2);
    border: 1px solid #39ff14;
}

.message.error {
    background: rgba(255, 51, 51, 0.2);
    border: 1px solid #ff3333;
}

/* Responsividade */
@media (max-width: 768px) {
    .game-main {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    #scratchCard {
        width: 100%;
        height: auto;
    }
}
