/* RESET E CONFIGURAÇÃO DE TELA */
* { box-sizing: border-box; }
body, html {
    margin: 0; padding: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
    font-family: 'Eagle Lake', serif;
    background-color: #1a1a1a;
    color: #e0d2b4;
}

h1 { font-family: 'Caesar Dressing', cursive; margin: 0; }

/* O MAPA DO MUNDO */
.game-world {
    position: relative;
    width: 100%; height: 100%;
    /* Fundo de grama rústica */
    background: #2e3b23 url('https://www.transparenttextures.com/patterns/grass.png');
    z-index: 1;
}

/* OBJETOS DO MUNDO (CONSTRUÇÕES) */
.world-object {
    position: absolute;
    background-size: contain; /* GARANTE QUE A IMAGEM APAREÇA INTEIRA */
    background-repeat: no-repeat;
    background-position: bottom center;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    z-index: 10;
}

.world-object:hover {
    transform: scale(1.08);
    filter: brightness(1.2);
    z-index: 50; /* Fica por cima de outros no hover */
}

/* DECORAÇÃO (PORCOS) */
.decoration {
    position: absolute;
    width: 45px; height: 45px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 15;
    pointer-events: none; /* Não atrapalha cliques nos prédios */
}

/* ETIQUETAS E BOTÕES */
.bldg-label {
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7em;
    border: 1px solid #d4af37;
    margin-bottom: 5px;
    white-space: nowrap;
}

.btn-collect-overlay {
    background: #d4af37;
    border: 2px solid #5c4033;
    color: #fff;
    padding: 5px 12px;
    font-family: 'Eagle Lake';
    font-size: 0.7em;
    cursor: pointer;
    border-radius: 4px;
    display: none;
    margin-bottom: 5px;
    box-shadow: 0 4px #8a6d29;
}

.world-object:hover .btn-collect-overlay {
    display: block;
}

/* HUD SUPERIOR */
.hud-top {
    position: absolute;
    top: 0; left: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    z-index: 100;
}

.player-info { display: flex; align-items: center; gap: 12px; }
.avatar-frame {
    width: 55px; height: 55px;
    border: 2px solid #d4af37;
    border-radius: 50%;
    background: #3d2b1f;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.8em;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.player-stats strong { display: block; font-size: 1.1em; color: #fff; }
.player-stats span { font-size: 0.75em; color: #d4af37; }

.resource-container { display: flex; gap: 10px; }
.res-box {
    background: rgba(26, 26, 26, 0.85);
    padding: 6px 14px;
    border: 1px solid #5c4033;
    border-radius: 5px;
    font-size: 0.9em;
    display: flex; align-items: center; gap: 5px;
}

.res-box.gems { border-color: #ff4444; color: #fff; font-weight: bold; }

/* FEEDBACK */
.action-alert {
    position: absolute;
    top: 90px; left: 50%;
    transform: translateX(-50%);
    background: #d4af37;
    color: #000;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 200;
    border: 2px solid #5c4033;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

/* BANNER CENTRAL */
.welcome-banner {
    position: absolute;
    bottom: 115px; left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    pointer-events: none;
    text-align: center;
    width: 100%;
}
.welcome-banner h1 { font-size: 2.8em; text-shadow: 3px 3px 0 #000; }

/* MENU LATERAL */
.side-menu {
    position: absolute;
    right: 25px; bottom: 110px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 100;
}

.menu-btn {
    width: 180px; padding: 12px;
    background: #3d2b1f url('https://www.transparenttextures.com/patterns/dark-wood.png');
    border: 2px solid #5c4033;
    color: #e0d2b4;
    font-family: 'Eagle Lake';
    font-size: 0.85em;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 0 #1a1a1a;
}
.menu-btn:hover { border-color: #d4af37; transform: translateX(-5px); }
.menu-btn.clan { font-family: 'Caesar Dressing'; font-size: 1.2em; color: #d4af37; }

/* FOOTER NAV */
.hud-bottom {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: #000;
    padding: 20px;
    display: flex; justify-content: center; gap: 40px;
    border-top: 3px solid #5c4033;
    z-index: 100;
}

.hud-bottom button {
    background: none; border: none;
    color: #b5a48b; font-family: 'Eagle Lake';
    font-size: 1em; cursor: pointer;
}
.hud-bottom button.active { color: #d4af37; text-decoration: underline; }
.hud-bottom button.logout { color: #ff4444; }