/* ===== [RESET E VARIAVEIS GLOBAIS] ===== */
:root {
    --azul-vivo: #0000FF; /* SEU AZUL VIVO ORIGINAL */
    --azul-neon-brilho: #3333FF; /* Azul mais claro para o brilho neon intenso */
    --azul-escuro-fundo: #000033;
    --preto-total: #000000;
    --branco-texto: #E0FFFF; 
    --cinza-claro-brilho: rgba(255, 255, 255, 0.7);
    --vermelho-erro: #FF6666;
    
    /* VARIÁVEL CHAVE: OPACIDADE DA MARCA D'ÁGUA DO FUNDO */
    --fundo-opacidade-visibilidade: 0.8; 
    /* AJUSTE AQUI: 1.0 (claro) até 0.5 (muito escuro) */
}

/* =======================================
   MUDANÇA 1: PERMITIR ROLAGEM
   ======================================= */
/* Reset básico e fontes */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    color: var(--branco-texto);
    background-color: var(--preto-total);
    
    /* CORREÇÃO: Permite rolagem vertical (para baixo) se o conteúdo for muito grande */
    overflow-y: auto;
    /* Trava a rolagem horizontal */
    overflow-x: hidden; 
}

/* =======================================
   MUDANÇA 2: AJUSTAR ALINHAMENTO
   ======================================= */
/* BODY DA PÁGINA DE LOGIN: AGORA VISÍVEL (MARCA D'ÁGUA) */
.medieval-nft-login-body {
    display: flex;
    justify-content: center;
    /* CORREÇÃO: Alinha ao topo (flex-start) em vez de ao centro. */
    align-items: flex-start;
    
    min-height: 100vh;
    position: relative;
    
    /* Adiciona um "respiro" no topo e no fundo */
    padding-top: 5vh;
    padding-bottom: 5vh;
    box-sizing: border-box; /* Garante que o padding não quebre o min-height */

    background-color: var(--preto-total);
    background-image: url('rpg-login-background.jpg');
    background-size: cover; 
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
    background-color: rgba(0, 0, 80, 0.7); 
    filter: brightness(var(--fundo-opacidade-visibilidade)) contrast(1.1); 
    animation: backgroundEntrance 2s ease-out;
}

@keyframes backgroundEntrance {
    from { opacity: 0; filter: brightness(0.5); }
    to { opacity: 1; filter: brightness(var(--fundo-opacidade-visibilidade)) contrast(1.1); }
}

/* =======================================
   DECORAÇÕES DE FUNDO ABSTRATAS (Partículas)
   ======================================= */
.background-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.glow-particle {
    position: absolute;
    background-color: var(--azul-neon-brilho);
    border-radius: 50%;
    opacity: 0.1;
    box-shadow: 0 0 10px var(--azul-neon-brilho);
    animation: particleFloat 20s infinite ease-in-out;
}

.particle-1 { width: 15px; height: 15px; top: 20%; left: 10%; animation-delay: 0s; }
.particle-2 { width: 10px; height: 10px; bottom: 15%; right: 12%; animation-delay: 5s; }

@keyframes particleFloat {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0.05; }
    50% { transform: translate(0, -60px) scale(0.9); opacity: 0.15; }
    100% { transform: translate(0, 0) scale(0.8); opacity: 0.05; }
}


/* =======================================
   WRAPPER E CARD DE LOGIN: AGORA TRANSPARENTE
   ======================================= */
.login-wrapper {
    position: relative;
    z-index: 10;
    padding: 20px;
    width: 100%;
    max-width: 550px; /* Tamanho fixo para PC */
    box-sizing: border-box;
}

.login-card {
    /* SUA OPACIDADE: Fundo com 20% de opacidade */
    background-color: rgba(0, 0, 0, 0.20); 
    
    /* Efeito de vidro fosco para legibilidade */
    backdrop-filter: blur(8px); 

    border: 2px solid var(--azul-vivo); 
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 0 30px var(--azul-vivo), 
                inset 0 0 15px rgba(0, 0, 255, 0.4); 
    text-align: center;
    position: relative;
    /* overflow: hidden; <- REMOVIDO PARA FLOR DE LIS APARECER */
    outline: 2px solid var(--azul-vivo); 
    outline-offset: -10px;
    animation: cardEntrance 0.8s ease-out;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Emblema NFT no topo do card */
.nft-emblem {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--preto-total);
    border: 3px solid var(--azul-vivo);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px var(--azul-vivo);
    z-index: 1;
}

.emblem-icon {
    font-size: 2.5em;
    /* CORREÇÃO: Cor Dourada FIXA para PC e Mobile */
    color: #FFD700; /* Cor de Ouro */
    
    /* CORREÇÃO: Sombra dourada para o brilho */
    text-shadow: 0 0 10px #FFD700, 0 0 15px #FFA500; /* Sombra laranja/ouro */
    
    animation: pulseEmblem 2s infinite alternate;
}

/* Animação do emblema também ajustada para Dourado */
@keyframes pulseEmblem {
    from { text-shadow: 0 0 5px #FFD700; }
    to { text-shadow: 0 0 15px #FFD700, 0 0 25px #FFA500; }
}

/* Título */
.login-card-title {
    color: var(--azul-vivo);
    font-size: 3.8em;
    font-weight: bold;
    text-shadow: 0 0 20px var(--azul-vivo), 0 0 8px var(--branco-texto);
    margin-top: 25px;
    margin-bottom: 5px;
    letter-spacing: 3px;
    line-height: 1.2; /* Adicionado para títulos com várias linhas */
}

/* Subtítulo */
.login-card-subtitle {
    color: var(--cinza-claro-brilho);
    font-size: 1.2em;
    margin-bottom: 35px;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* Mensagens de Erro */
.message.error-message {
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid var(--vermelho-erro);
    color: var(--vermelho-erro);
    padding: 10px 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
    animation: shakeError 0.5s;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Inputs (Campos de entrada) */
.login-form {
    margin-top: 20px;
}

.input-group {
    margin-bottom: 25px;
}

.animated-input {
    width: calc(100% - 30px);
    padding: 18px 15px;
    background-color: var(--preto-total) !important;
    color: var(--branco-texto) !important;
    border: 2px solid var(--azul-vivo) !important;
    border-radius: 8px;
    font-size: 1.15em;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(0, 0, 255, 0.3);
}

.animated-input:focus {
    outline: none;
    border-color: var(--branco-texto) !important;
    box-shadow: 0 0 15px var(--azul-vivo), 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1.01);
}

.animated-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Botões de Ação */
.action-btn {
    width: 100%;
    padding: 18px 25px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    letter-spacing: 1.5px;
    margin-top: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 255, 0.5);
}

/* Botão Primário (ENTRAR) */
.primary-action-btn {
    background-color: var(--azul-vivo) !important; 
    color: var(--preto-total) !important;
    border: 2px solid var(--azul-vivo) !important;
}

.primary-action-btn:hover {
    background-color: var(--azul-neon-brilho) !important; 
    box-shadow: 0 0 25px var(--azul-neon-brilho), 0 0 35px rgba(51, 51, 255, 0.7);
    transform: translateY(-5px) scale(1.02);
}

/* Linha Separadora */
.separator-line {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--azul-vivo), transparent); 
    margin: 35px 0;
    box-shadow: 0 0 10px var(--azul-vivo);
    opacity: 0.7;
}

/* Botão Secundário (CADASTRAR) */
.secondary-action-btn {
    background-color: transparent !important;
    color: var(--azul-vivo) !important;
    border: 2px solid var(--azul-vivo) !important;
}

.secondary-action-btn:hover {
    background-color: rgba(0, 0, 255, 0.15) !important; 
    color: var(--branco-texto) !important;
    border-color: var(--branco-texto) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Link Wrapper para o botão de cadastro */
.register-link {
    text-decoration: none;
    display: block;
}

/* Texto de Rodapé do Card */
.card-footer-text {
    margin-top: 30px;
    color: var(--cinza-claro-brilho);
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.8;
    letter-spacing: 0.3px;
}

/* =======================================
   MUDANÇA 3: OTIMIZAR O TAMANHO NO MOBILE
   ======================================= */
/* =======================================
   RESPONSIVIDADE (AJUSTES MOBILE)
   ======================================= */
@media (max-width: 900px) {
    /* No mobile, usamos a largura total do wrapper */
    .login-wrapper {
        max-width: 90%; 
    }
    
    /* CORREÇÃO: Remove o padding-top extra do wrapper se a tela for pequena */
    .medieval-nft-login-body {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .login-card {
        padding: 25px 20px; /* Padding ajustado (25px em cima/baixo, 20px nas laterais) */
        border-radius: 10px;
        box-shadow: 0 0 20px var(--azul-vivo);
        outline-offset: -5px;
        
        /* SUA OPACIDADE de 20% */
        background-color: rgba(0, 0, 0, 0.20); 
        backdrop-filter: blur(8px);
    }
    
    /* Ajustes para o novo título ("Ferro & Fogo Pelo Poder") */
    .login-card-title {
        font-size: 2.2em; /* Diminuído (era 2.5em) */
        letter-spacing: 1px;
        line-height: 1.2; /* Melhora o espaçamento entre as linhas do título */
    }
    .login-card-subtitle {
        font-size: 0.9em; /* Diminuído (era 1em) */
        margin-bottom: 20px; /* Diminuído (era 25px) */
    }
    .nft-emblem {
        width: 60px;
        height: 60px;
        top: -20px;
        border-width: 2px;
    }
    .emblem-icon {
        font-size: 1.8em;
    }

    /* Diminui os espaçamentos internos para o card caber */
    .input-group {
        margin-bottom: 15px; /* Diminuído (era 25px) */
    }
    
    .animated-input {
        padding: 12px 10px; /* Diminuído (era 14px) */
        font-size: 0.9em; /* Diminuído (era 1em) */
    }
    .action-btn {
        padding: 12px 15px; /* Diminuído (era 14px) */
        font-size: 1em; /* Diminuído (era 1.1em) */
        margin-top: 10px;
    }
    
    .separator-line {
        margin: 20px 0; /* Diminuído (era 35px) */
    }
    
    .card-footer-text {
        margin-top: 20px; /* Diminuído (era 30px) */
        font-size: 0.8em; /* Diminuído (era 0.9em) */
    }
}

/* =======================================
   ESTILOS EXISTENTES - COMPATIBILIDADE (Para outras páginas)
   ======================================= */
/* (O restante do seu código antigo é mantido aqui) */
.container, .container3, .container4, .container5, .container6,
.character-section, .character-selector, .character-info,
.info-card, .action-group, .messages-container, .modal-content {
    background-color: transparent !important;
}

/* Títulos e Textos Gerais */
.titulo, h1 { color: var(--azul-vivo); font-size: 45px; margin-bottom: 20px; font-weight: bold; word-wrap: break-word; text-align: center; }
.txtpadrao, .texto, .texto2 { font-size: 25px; max-width: 90%; margin: 0 auto; word-wrap: break-word; font-weight: bold; color: var(--branco-texto); }
.texto { font-size: 30px; padding: 10px; }
.texto2 { font-size: 25px; padding: 10px; }

/* Containers diversos */
.container { width: 80%; max-width: 400px; margin: auto; display: flex; flex-direction: column; }
.container3 { position: absolute; left: 20px; max-width: 60%; text-align: center; }
.container4 { position: absolute; left: 20px; max-width: 800px; }
.absolute-position { position: absolute; }

/* Mensagens de feedback padrão */
.error { color: red; }
.success { color: green; }
.mensagem { max-width: 400px; font-size: 16px; margin: 10px 0; padding: 10px; text-align: center; }
.mensagem.erro { color: red; font-weight: bold; }
.mensagem.sucesso { color: green; font-weight: bold; }

.bordabranca { border: 4px solid #fff; border-radius: 15px; padding: 10px; max-width: 90%; margin: 0 auto; word-wrap: break-word; }
.hr { border: 8px solid #fff; }
ul { list-style-type: none; padding: 0; }
li { margin-bottom: 20px; }

/* Saldo de carteira/cofre (depende do PHP, mantido o placeholder) */
.saldo-carteira { color: green; }
.saldo-cofre { color: yellow; }

.container5 { position: absolute; max-width: 50%; text-align: center; font-size: 30px; font-weight: bold; }
.container6 { text-align: center; }
.bn { display: none; } 

/* Botões gerais (para outras páginas) */
button { background-color: var(--preto-total); color: var(--azul-vivo); padding: 10px 20px; font-size: 30px; border: 4px solid var(--azul-vivo); border-radius: 15px; font-weight: bold; text-align: center; }
.btn { background-color: var(--preto-total); color: var(--azul-vivo); font-size: 30px; border: 4px solid var(--azul-vivo); border-radius: 15px; font-weight: bold; text-align: center; height: 100%; }

/* Inputs gerais (para outras páginas) */
input { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 5px; border: 1px solid var(--branco-texto) !important; border-radius: 7px; width: 500px; height: 30px; text-align: center; background: var(--preto-total) !important; color: var(--branco-texto) !important; font-family: 'Times New Roman', serif; }
input::placeholder { color: var(--branco-texto) !important; opacity: 1; font-family: 'Times New Roman', serif; }
input[type="number"] { width: 100%; padding: 10px; margin: 10px 0; border: 2px solid var(--branco-texto) !important; }

/* Selects */
select { width: 90% !important; padding: 10px; border: 2px solid var(--branco-texto) !important; border-radius: 6px; background-color: var(--preto-total) !important; color: var(--branco-texto) !important; font-size: 16px; text-align: center; text-align-last: center; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; }
select option { background-color: var(--preto-total); color: var(--branco-texto); text-align: center; }

/* Checkbox (se houver) */
input[type="checkbox"]:checked + .custom-checkbox::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; background-color: var(--azul-vivo); border-radius: 2px; transform: translate(-50%, -50%); }

/* DASHBOARDMED - Mantido para outras páginas */
.header { text-align: center; margin-bottom: 30px; position: relative; }
.banner { max-width: 100%; height: auto; border-bottom: 3px solid var(--azul-vivo); }
.welcome { font-size: 2rem; color: var(--azul-vivo); text-shadow: 0 0 10px var(--azul-vivo); margin: 10px 0; }
.btn-menu { background: var(--azul-escuro-fundo); color: var(--branco-texto); font-weight: bold; }
.character-section { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.character-selector { flex: 1; min-width: 300px; background: rgba(0, 0, 139, 0.3); padding: 20px; border-radius: 10px; border: 2px solid var(--azul-vivo); }
.character-info { flex: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.info-card { background: rgba(0, 0, 0, 0.7); padding: 15px; border-radius: 8px; border-left: 5px solid var(--azul-vivo); box-shadow: 0 0 10px rgba(0, 0, 255, 0.5); }
.info-card h3 { margin-top: 0; color: var(--azul-vivo); border-bottom: 1px dashed var(--azul-vivo); padding-bottom: 5px; }
.map-container { position: relative; left: -120px; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); width: 300px; margin: 0 auto; }
.map-square { height: 100px; border: 1px solid var(--azul-vivo); text-align: center; margin: 0; position: relative; cursor: pointer; transition: all 0.3s; }
.map-square:hover { transform: scale(1.05); z-index: 2; box-shadow: 0 0 15px var(--azul-vivo); }
.map-image { width: 80px; height: 80px; margin: 5px; z-index: -1; }
.map-name { position: absolute; top: -12%; left: 0; right: 0; text-align: center; z-index: 2; color: var(--azul-vivo); font-weight: bold; text-shadow: 1px 1px 2px var(--preto-total); }
.map-personagem { position: absolute; top: 30%; left: 0; right: 0; text-align: center; z-index: 2; }
.actions-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.action-group { background: rgba(0, 0, 0, 0.7); padding: 20px; border-radius: 10px; border: 2px solid var(--azul-vivo); box-shadow: 0 0 10px rgba(0, 0, 255, 0.5); }
.action-group h2 { color: var(--azul-vivo); margin-top: 0; border-bottom: 2px solid var(--azul-vivo); padding-bottom: 10px; }
.input-container { margin: 10px; }
.footer { text-align: center; margin-top: 40px; padding: 20px; border-top: 3px solid var(--azul-vivo); font-size: 1.5rem; color: var(--azul-vivo); }
.notification-badge { position: absolute; top: -10px; right: -10px; background: red; color: white; border-radius: 50%; width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.btn-notification { position: relative; }
.messages-container { background: rgba(0, 0, 0, 0.7); border: 2px solid var(--azul-vivo); border-radius: 10px; padding: 15px; margin: 20px 0; max-height: 200px; overflow-y: auto; }
.message { padding: 8px; border-bottom: 1px dashed var(--azul-vivo); color: var(--branco-texto); }
.message:last-child { border-bottom: none; }
.modal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); }
.modal-content { background-color: var(--preto-total); margin: 15% auto; padding: 20px; border: 3px solid var(--azul-vivo); width: 80%; max-width: 600px; color: var(--branco-texto); position: relative; }
.close-modal { color: var(--azul-vivo); float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-modal:hover { color: var(--azul-neon-brilho); }



.game-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px; /* Coluna Personagem | MAPA | Coluna Ações/Chat */
    gap: 20px;
    min-height: 80vh; /* Garante altura mínima, mas com scroll */
}