/* style.css */
body {
    background-color: #0f0f1a; /* Fundo bem escuro, quase preto */
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background-color: #1b1b2f; /* Cartão levemente mais claro */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 400px; /* Tamanho bom para celular */
    text-align: center;
    border: 1px solid #333;
}

h1 {
    color: #ff4757; /* Vermelho meio neon */
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #333;
    background-color: #0f0f1a;
    color: white;
    box-sizing: border-box; /* Garante que o padding não estoure a largura */
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: #ff4757;
}

.btn {
    width: 100%;
    padding: 15px;
    background-color: #ff4757;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 10px;
    transition: 0.3s;
}

.btn:hover {
    background-color: #ff6b81;
}

.link {
    display: block;
    margin-top: 15px;
    color: #a4b0be;
    text-decoration: none;
    font-size: 14px;
}

.link:hover {
    color: white;
}

.erro {
    background-color: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ff4757;
}






/* Cabeçalho do Lobby */
.perfil-header {
    background: linear-gradient(45deg, #1b1b2f, #2c2c54);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #4b4b8f;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perfil-info h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.creditos {
    background-color: #00d2d3;
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 5px;
}

/* Botão de Batalha (Pulsante) */
.btn-batalha {
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, #ff4757, #ff6b81);
    color: white;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 0 15px #ff4757;
    text-transform: uppercase;
    animation: pulso 2s infinite;
    margin-bottom: 20px;
}

@keyframes pulso {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.menu-opcoes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-secundario {
    background-color: #2f3542;
    color: #ced6e0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #4b4b8f;
    transition: 0.3s;
}

.btn-secundario:hover {
    background-color: #4b4b8f;
    color: white;
}

/* Status da busca */
#status-busca {
    margin-top: 15px;
    color: #00d2d3;
    font-weight: bold;
    display: none; /* Começa escondido */
}







/* O Tabuleiro */
.arena-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 10px;
    box-sizing: border-box;
    justify-content: space-between;
}

/* Área do Oponente (Topo) */
.area-oponente {
    background-color: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    border-bottom: 2px solid #333;
}

/* O Campo de Batalha (Meio) */
.campo-batalha {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 20px;
}

.slot-carta {
    width: 120px;
    height: 180px;
    border: 2px dashed #4b4b8f;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.05);
    position: relative;
}

.slot-carta.ativa {
    border: 2px solid #ff4757;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.5);
}

/* Área do Jogador (Rodapé - Mão) */
.minha-mao {
    overflow-x: auto;
    display: flex;
    gap: 10px;
    padding: 10px 0;
    /* Esconder barra de rolagem mas permitir scroll */
    scrollbar-width: none; 
}
.minha-mao::-webkit-scrollbar { display: none; }

/* A Carta Visual */
.carta {
    min-width: 100px;
    height: 150px;
    background: linear-gradient(135deg, #2c3e50, #000);
    border: 2px solid #ffd700; /* Borda dourada */
    border-radius: 8px;
    padding: 5px;
    color: white;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.carta:hover {
    transform: translateY(-10px);
    z-index: 10;
}

.carta-nome {
    font-weight: bold;
    text-align: center;
    font-size: 0.7rem;
    background: rgba(0,0,0,0.5);
}

.carta-img {
    flex-grow: 1;
    background-color: #555; /* Lugar da imagem */
    margin: 2px 0;
    background-size: cover;
}

.atributos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    font-size: 0.65rem;
}

.attr {
    background: rgba(0,0,0,0.6);
    padding: 2px;
    border-radius: 2px;
}

/* Botão de Ação Central */
#btn-acao {
    position: absolute;
    z-index: 100;
    padding: 15px 30px;
    background: #ff4757;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    box-shadow: 0 0 20px #ff4757;
    display: none; /* Só aparece quando seleciona carta */
}








/* Fundo Escuro (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px); /* Efeito de vidro embaçado */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

/* A Caixa do Modal */
.modal-box {
    background: #1b1b2f;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    border: 1px solid #4b4b8f;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transform: translateY(50px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito elástico */
}

.modal-overlay.ativo .modal-box {
    transform: translateY(0);
}

.modal-titulo {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid de Botões de Atributo */
.grid-atributos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-atributo {
    background: #2f3542;
    border: 1px solid #4b4b8f;
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.btn-atributo:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: scale(1.05);
}

.btn-atributo i { font-size: 1.5rem; margin-bottom: 5px; }

/* Botão Fechar */
.btn-fechar {
    margin-top: 20px;
    background: transparent;
    border: none;
    color: #777;
    cursor: pointer;
    text-decoration: underline;
}