/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background: #050505;
    font-family: 'Segoe UI', 'Poppins', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    color: #e0e0e0;
}

/* ===== LOGIN ===== */
.login-screen {
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('https://images.unsplash.com/photo-1519074063912-ad2fe3f51964?auto=format&fit=crop&q=80&w=1000');
    background-size: cover;
    position: fixed;
    z-index: 1000;
}

.login-box {
    background: rgba(20, 20, 20, 0.95);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid #e74c3c;
    text-align: center;
}

/* ===== ESTRUTURA DO JOGO (HUD) ===== */
.game-hud {
    display: grid;
    grid-template-areas: 
        "ml mc mr"
        "bot bot bot";
    grid-template-columns: 280px 1fr 280px;
    /* Trava a altura do meio para não empurrar a barra inferior */
    grid-template-rows: minmax(0, 1fr) auto; 
    gap: 15px;
    width: 100vw;
    height: 100vh;
    padding: 15px; /* Mantendo simetria conforme pedido */
    background: #0a0c10;
    box-sizing: border-box;
    overflow: hidden;
}

/* Áreas - Importante: min-height: 0 impede o estouro da grade */
.mid-left { grid-area: ml; height: 100%; min-height: 0; }
.mid-center { grid-area: mc; background: #000000; border: 2px solid #1e2430; border-radius: 20px; overflow: hidden; height: 100%; min-height: 0; }
.mid-right { grid-area: mr; height: 100%; min-height: 0; }
.bottom-nav { grid-area: bot; }

/* ===== PAINÉIS LATERAIS E CHAT ===== */
.side-panel {
    background: #0f1219;
    border: 2px solid #1e2430;
    border-radius: 20px;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Garante que o painel respeite o container */
}

.chat-messages { flex: 1; overflow-y: auto; }

.chat-input-area {
    display: flex;
    background: #050505;
    border: 1px solid #e74c3c;
    border-radius: 25px;
    padding: 5px 15px;
    margin-top: 10px;
    flex-shrink: 0; /* Impede a barra de diminuir */
}

.chat-input-area input { flex: 1; background: transparent; border: none; color: white; outline: none; padding: 8px 0; }

/* ===== CENTRO SOCIAL ===== */
.social-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #1e2430;
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 5px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: 0.3s;
}

.tab-btn.active {
    color: #e74c3c !important;
    border-bottom: 2px solid #e74c3c;
}

.friend-list {
    flex-grow: 1;
    overflow-y: auto;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid transparent;
    transition: 0.2s;
}

.friend-item:hover {
    background: rgba(255,255,255,0.07);
    border-left: 3px solid #e74c3c;
}

/* ===== BARRA INFERIOR E PERFIL ===== */
.bottom-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    flex-wrap: wrap;
    background: rgba(15, 18, 25, 0.9);
    border-radius: 15px;
    border: 1px solid #1e2430;
    margin-top: 5px;
}

.profile-mini {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 5px;
}

.profile-mini img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    object-fit: cover;
}

.stat-box {
    background: #1a1f2a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #2c3444;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.stat-box:hover { border-color: #e74c3c; background: #232a3a; transform: translateY(-2px); }

/* ===== TELAS DINÂMICAS ===== */
.dynamic-screen { width: 100%; height: 100%; padding: 20px; overflow-y: auto; }

/* Scrollbar Estilizada */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2430; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #e74c3c; }