@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cormorant+Garamond:wght@400;600&family=Roboto:wght@400;700&display=swap');

body, html {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    background: #000;
    /* Fonte principal do jogo - Estilo Medieval */
    font-family: 'Cinzel', serif; 
    user-select: none; /* Evita seleção de texto indesejada */
}

.currency-icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  vertical-align: middle;
  margin-right: 4px;
}

/* =========================================
   TELA INICIAL
   ======================================== */
#start-screen {
    position: relative;
    width: 100%; height: 100%;
    background: #000;
    z-index: 10;
}

.start-top-right {
    position: absolute;
    top: 16px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 6;
}

.start-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(212,175,55,0.65);
    background: rgba(10, 8, 6, 0.75);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    color: #f1d79b;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    pointer-events: auto;
    text-decoration: none;
    padding: 0;
    appearance: none;
}

.start-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.start-icon:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 214, 120, 0.85);
    box-shadow: 0 8px 22px rgba(0,0,0,0.6);
}

.start-icon:active {
    transform: translateY(0);
}

.sky-background {
    position: absolute;
    width: 3136px; height: 100%;
    background: url('assets/animation/fundo-tras.png') repeat-x;
    background-size: contain;
    animation: moveClouds 120s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes moveClouds {
    from { transform: translateX(0); }
    to { transform: translateX(-1568px); }
}

.forest-background {
    background-repeat: no-repeat;
    background-position: center center;

    position: absolute;
    width: 100%; height: 100%;
    background: url('assets/animation/fundo-frente.png') no-repeat center center;
    background-size: 100% auto;
    z-index: 2;
    pointer-events: none;
}

#game-title {
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;

    text-align: center;
    line-height: 0.92;
    color: #f5f0e6;
    /* efeito medieval (ouro envelhecido) */
    text-shadow:
        0 2px 0 rgba(0,0,0,0.9),
        0 6px 18px rgba(0,0,0,0.85),
        0 0 22px rgba(212,175,55,0.18);
    animation: floatTitle 4s ease-in-out infinite;
}

#game-title .title-main{
    display:block;
    font-size: 86px;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #fff2c2 0%, #d4af37 40%, #6e4b1e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 rgba(0,0,0,0.9));
}

#game-title .title-sub{
    display:block;
    margin-top: 10px;
    font-size: 48px; /* um pouco maior */
    letter-spacing: 8px;
    opacity: 0.98;
    color: #e8dcc7;
    text-shadow:
        0 2px 0 rgba(0,0,0,0.95),
        0 0 16px rgba(0,0,0,0.75);
}

@media (max-width: 768px){
    #game-title .title-main{ font-size: 54px; }
    #game-title .title-sub{ font-size: 28px; letter-spacing: 6px; }
}

#win-market {
    display: flex;
    flex-direction: column;
    z-index: 1000; /* Garante que fique acima do cenário */
    position: absolute;
    top: 150px;
    left: calc(50% - 160px); /* Centralizado inicialmente */
    width: 320px;
    height: 420px;
    max-width: 90vw;
    max-height: 90vh;
    resize: both;
    overflow: hidden;
}

#win-npc-shop {
    display: flex;
    flex-direction: column;
    z-index: 1000;
    position: absolute;
    top: 140px;
    left: calc(50% - 180px);
    width: 360px;
    height: 460px;
    max-width: 92vw;
    max-height: 92vh;
    resize: both;
    overflow: hidden;
}

#npc-shop-buy-list::-webkit-scrollbar,
#npc-shop-sell-list::-webkit-scrollbar {
    width: 6px;
}

#npc-shop-buy-list::-webkit-scrollbar-thumb,
#npc-shop-sell-list::-webkit-scrollbar-thumb {
    background: #5a4a35;
    border-radius: 3px;
}

.npc-shop-info {
    color: #f5d76e;
    text-align: center;
    font-size: 12px;
    padding: 8px;
    background: rgba(0,0,0,0.4);
    margin: 6px;
    font-family: 'Cinzel', serif;
    border: 1px solid #5a4a35;
}

.npc-shop-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0 6px 6px 6px;
    background: rgba(0,0,0,0.35);
    border: 1px solid #5a4a35;
    min-height: 0;
}

.npc-shop-title {
    text-align: center;
    color: #e0d0b0;
    font-size: 11px;
    padding: 6px;
    border-bottom: 1px solid #5a4a35;
    letter-spacing: 1px;
}

.npc-shop-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    min-height: 0;
}

#market-buy-list::-webkit-scrollbar {
    width: 6px;
}

#market-buy-list::-webkit-scrollbar-thumb {
    background: #5a4a35;
    border-radius: 3px;
}
@keyframes floatTitle {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, -55%); }
}

#bottom-menu-bar {
    position: absolute;
    bottom: 0; width: 100%; height: 60px;
    background: rgba(50, 50, 50, 0.9);
    border-top: 2px solid #444;
    z-index: 50;
    display: flex; align-items: center;
}

#btn-entrar-trigger {
    background: #27ae60; color: white;
    border: none; padding: 10px 40px;
    margin-left: 20px; border-radius: 4px;
    font-weight: bold; cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s, background 0.2s;
    pointer-events: auto;
    position: relative;
    z-index: 1001;
}

#btn-entrar-trigger:hover {
    transform: scale(1.05);
    background: #2ecc71;
}

#ping-label {
    position: fixed;
    top: 10px;
    right: 12px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.2);
    color: #e8f8ff;
    font-size: 11px;
    font-family: 'Cinzel', serif;
    border-radius: 6px;
    z-index: 1100;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

#day-night-overlay {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    z-index: 1400;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.85);
    background: rgba(0,0,0,0.75);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 18px rgba(0,0,0,0.6);
    transition: opacity 0.2s ease;
}

#day-night-overlay.day {
    color: #ffe9b0;
    border-color: rgba(255,220,130,0.4);
}

#day-night-overlay.night {
    color: #ffb0b0;
    border-color: rgba(255,80,80,0.5);
    box-shadow: 0 0 18px rgba(255, 60, 60, 0.35);
}

.editor-eraser-info {
    color: #e0d0b0;
    font-size: 12px;
    text-align: center;
    padding: 4px 0;
    letter-spacing: 0.5px;
}

.editor-eraser-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.editor-eraser-btn {
    min-width: 28px;
    height: 24px;
    background: rgba(0,0,0,0.45);
    border: 1px solid #5a4a35;
    color: #e0d0b0;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
}

.editor-eraser-btn:hover {
    background: rgba(255,255,255,0.08);
}

#admin-editor::-webkit-scrollbar,
#tileset-container::-webkit-scrollbar {
    width: 8px;
}

#admin-editor::-webkit-scrollbar-thumb,
#tileset-container::-webkit-scrollbar-thumb {
    background: #5a4a35;
    border-radius: 6px;
}

#admin-editor::-webkit-scrollbar-track,
#tileset-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.4);
}

.gm-tag {
    color: #ff3b3b;
    font-weight: 700;
    margin-right: 4px;
    text-shadow: 0 0 6px rgba(255, 50, 50, 0.8);
}

.gm-name {
    color: #ffaaaa;
    text-shadow: 0 0 6px rgba(255, 50, 50, 0.6);
}

#btn-entrar-trigger:active {
    transform: scale(0.95);
}

/* --- MODAL LOGIN --- */
#auth-modal {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    background: rgba(0,0,0,0.6); 
    z-index: 1000;
}

.glass-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 40px; border-radius: 15px;
    width: 300px; text-align: center; color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    pointer-events: auto;
}

.glass-box h2 { margin-top: 0; font-family: 'Cinzel', serif; }

.glass-box input {
    width: 100%; padding: 10px; margin: 10px 0;
    background: rgba(0, 0, 0, 0.5); border: 1px solid #555;
    color: white; border-radius: 5px; box-sizing: border-box;
}

.auth-buttons button {
    margin: 5px; padding: 8px 15px;
    cursor: pointer; border: none; border-radius: 3px;
    font-weight: bold;
    pointer-events: auto;
}

#btn-login { background: #2980b9; color: white; }
#btn-register { background: #8e44ad; color: white; }

/* =========================================
   INTERFACE DO JOGO (ESTILO MEDIEVAL)
   ======================================== */

:root {
  --window-opacity: 0.85;
}

#gameCanvas { 
    display: block; 
    width: 100%; height: 100%; 
    background: #111;
    image-rendering: pixelated;
    pointer-events: auto;
    cursor: default;
    touch-action: none;
}

.hidden { display: none !important; }

/* --- JANELAS FLUTUANTES --- */
.game-window {
    position: absolute;
    background: rgba(20, 15, 10, 0.95); 
    opacity: var(--window-opacity, 0.85);
    border: 3px double #d4af37;
    color: #e0d0b0;
    padding: 8px;
    z-index: 200;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    border-radius: 4px;
    resize: both; 
    overflow: hidden;
    touch-action: none;
    min-width: 60px; /* Diminua de 150px para 60px */
    min-height: 60px;
    display: flex;
    flex-direction: column;
}
#win-inventory { overflow: hidden; }

.win-header {
    background: linear-gradient(to bottom, #461111, #2c0b0b);
    color: #f1c40f;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: -8px -8px 8px -8px;
    padding: 6px;
    border-bottom: 2px solid #d4af37;
    text-shadow: 1px 1px 0 #000;
    cursor: grab; 
    user-select: none;
    position: relative;
    touch-action: none;
}

.window-adjust-panel {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    top: 100%;
    margin-top: 8px;
    width: min(260px, 90vw);
    background: rgba(0,0,0,0.85);
    border: 1px solid rgba(212,175,55,0.5);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 500;
    box-shadow: 0 12px 28px rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.window-adjust-panel.active {
    opacity: 1;
    pointer-events: auto;
}

.window-adjust-panel label {
    font-size: 10px;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.4px;
}

.window-adjust-panel .panel-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.window-adjust-panel input[type="range"] {
    width: 100%;
}

.window-adjust-panel .panel-row-close {
    margin-top: 6px;
}

.window-adjust-panel .panel-close-btn {
    width: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 8px;
    padding: 6px 0;
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
}

.window-adjust-panel .panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.win-header:active { cursor: grabbing; }

.lock-btn {
    position: absolute;
    right: 8px;
    top: 4px;
    cursor: pointer;
    font-size: 14px;
    filter: grayscale(1);
    transition: transform 0.2s;
}
.lock-btn:hover { transform: scale(1.2); filter: grayscale(0); }
.win-locked .win-header { cursor: default !important; }

/* Posições Iniciais */
#win-inventory { top: 100px; right: 20px; width: 196px; height: 300px; }
#win-skills { top: 100px; left: 20px; width: 220px; }
#win-menubar { bottom: 40px; left: 50%; transform: translateX(-50%); width: auto; height: auto; }
#win-hotbar { bottom: 100px; left: 50%; transform: translateX(-50%); width: auto; }

/* --- INVENTÁRIO GRID --- */
#inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    grid-auto-rows: 42px; 
    gap: 4px; padding: 5px;
    width: 100%; height: calc(100% - 35px);
    overflow-y: auto; overflow-x: hidden; box-sizing: border-box;
}

.inv-slot {
    width: 40px; height: 40px;
    background: #1a1510; border: 1px solid #5a4a35;
    box-shadow: inset 0 0 10px #000;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
    transition: border-color 0.2s, background-color 0.2s;
}
.inv-slot:hover { border-color: #f1c40f; background-color: #2a2520; }
.inv-slot img { width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5)); }
.item-tooltip {
    position: absolute;
    right: 44px;
    left: auto;
    top: -4px;
    min-width: 140px;
    max-width: 240px;
    background: rgba(15, 12, 8, 0.95);
    border: 1px solid #6b5a40;
    box-shadow: 0 6px 12px rgba(0,0,0,0.7);
    padding: 6px 8px;
    border-radius: 4px;
    z-index: 999;
    display: none;
    pointer-events: none;
    white-space: pre-line;
}
.item-tooltip.floating {
    position: fixed;
    right: auto;
    left: 0;
    top: 0;
    display: block;
}
.inv-slot:hover .item-tooltip { display: block; }
.item-tooltip-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #e6d8b5;
}
.item-tooltip-title.warrior { color: #4da3ff; }
.item-tooltip-title.mage { color: #b26bff; }
.item-tooltip-title.ranger { color: #f1c40f; }
.item-tooltip-body {
    color: #d6c7a6;
    font-size: 11px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.item-stat {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.stat-label {
    color: #d9c7a1;
}
.stat-value {
    font-weight: bold;
}
.stat-positive {
    color: #55d67a;
}
.stat-negative {
    color: #ff6b6b;
}

/* Scrollbars */
.game-window {
    scrollbar-width: thin;
    scrollbar-color: #5a4a35 rgba(15, 12, 8, 0.6);
}
.game-window ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.game-window ::-webkit-scrollbar-track {
    background: rgba(15, 12, 8, 0.6);
}
.game-window ::-webkit-scrollbar-thumb {
    background: #5a4a35;
    border-radius: 4px;
    border: 1px solid #2a1f14;
}
.game-window ::-webkit-scrollbar-thumb:hover {
    background: #7a6649;
}

/* =========================================
   EQUIPAMENTOS (VERSÃO GHOST/FANTASMA)
   ========================================= */

#win-equipment {
    width: 175px;
    height: 300px; /* Aumente um pouco a altura para acomodar a 5ª linha */
    bottom: 120px; 
    right: 20px;
}

.eq-grid {
    display: grid;
    grid-template-columns: repeat(3, 44px); /* 3 colunas */
    grid-template-rows: repeat(5, 44px);    /* Aumentamos para 5 linhas para caber a bota embaixo */
    gap: 10px;
    padding: 12px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}
/* Fileira 1 */
#eq-head { 
    grid-row: 1; grid-column: 2; /* Centro */
}

/* Fileira 2 */
#eq-ring1 { 
    grid-row: 2; grid-column: 1; /* Esquerda */
}
#eq-necklace { 
    grid-row: 2; grid-column: 2; /* Centro (Abaixo do Capacete) */
}
#eq-ring2 { 
    grid-row: 2; grid-column: 3; /* Direita */
}

/* Fileira 3 */
#eq-weapon { 
    grid-row: 3; grid-column: 1; 
}
#eq-armor { 
    grid-row: 3; grid-column: 2; 
}
#eq-shield { 
    grid-row: 3; grid-column: 3; 
}

/* Fileira 4 */
#eq-gloves { 
    grid-row: 4; grid-column: 1; 
}
#eq-legs { 
    grid-row: 4; grid-column: 2; /* Calça no centro */
}

/* Fileira 5 */
#eq-boots { 
    grid-row: 5; grid-column: 2; /* Bota no centro, embaixo da calça */
}



.eq-slot {
    width: 42px;
    height: 42px;
    background-color: #1a1510;
    border: 1px solid #5a4a35;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Necessário para o ::before funcionar */
    cursor: pointer;
    box-shadow: inset 0 0 10px #000;
    transition: border-color 0.2s, background-color 0.2s;
}

.eq-slot:hover { border-color: #f1c40f; background-color: #2a2520; }

/* --- ÍCONES FANTASMAS (::before) --- */
.eq-slot::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    
    /* EFEITO FANTASMA */
    opacity: 0.2;            /* Transparência */
    filter: grayscale(100%); /* Preto e branco */
    pointer-events: none;    /* Clique atravessa */
    z-index: 0;
}

/* Definição das imagens (use nomes minúsculos nos arquivos) */
#eq-ring1::before, #eq-ring2::before { background-image: url('assets/hub-icons/anel.png'); }
#eq-head::before     { background-image: url('assets/hub-icons/capacete.png'); }
#eq-weapon::before   { background-image: url('assets/hub-icons/sword.png'); }
#eq-armor::before    { background-image: url('assets/hub-icons/armadura.png'); }
#eq-shield::before   { background-image: url('assets/hub-icons/shield.png'); }
#eq-gloves::before   { background-image: url('assets/hub-icons/luvas.png'); }
#eq-legs::before     { background-image: url('assets/hub-icons/calcas.png'); }
#eq-necklace::before { background-image: url('assets/hub-icons/colar.png'); }
#eq-boots::before    { background-image: url('assets/hub-icons/botas.png'); }

/* Se houver item equipado (<img>), remove o ícone fantasma */
.eq-slot:has(img)::before {
    display: none !important;
}

/* Estilo do item real */
.eq-slot img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    z-index: 2; /* Fica por cima do fundo */
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

/* =========================================
   SKILLS & HUD
   ======================================== */

.skill-row {
    margin: 10px 0;
    display: flex; flex-direction: column;
    font-family: 'Roboto', sans-serif; color: #ccc;
}

.skill-info {
    display: flex; justify-content: space-between;
    width: 100%; margin-bottom: 3px;
    font-size: 11px; text-transform: uppercase;
    font-weight: bold; color: #e0d0b0;
}

.skill-bar {
    width: 100%; height: 6px;
    background: #000;
    border: 1px solid #5a4a35;
    border-radius: 2px;
    position: relative; overflow: hidden;
}

.skill-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    width: 0%; 
    box-shadow: 0 0 5px #27ae60;
    transition: width 0.3s ease-out;
}

/* --- CHAT --- */
#chat-container {
    position: absolute; bottom: 90px; left: 20px;
    width: 350px; height: 200px;
    background: rgba(20, 15, 10, 0.85);
    border: 2px solid #5a4a35; border-radius: 6px;
    display: flex; flex-direction: column;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    resize: both; overflow: hidden;
    min-width: 200px; min-height: 100px;
    z-index: 150;
}

#chat-history {
    flex: 1; overflow-y: auto; color: #e0d0b0;
    padding: 10px; font-size: 13px; font-family: 'Roboto', sans-serif;
    text-shadow: 1px 1px 0 #000;
}
#chat-history strong { color: #f1c40f; }
#chat-input {
    background: rgba(0,0,0,0.5); border: none;
    border-top: 1px solid #5a4a35; color: #fff;
    padding: 10px; font-family: 'Roboto', sans-serif;
}

.chat-tabs {
    display: flex;
    border-bottom: 1px solid #5a4a35;
    background: rgba(0,0,0,0.3);
}

.chat-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #5a4a35;
    color: #999;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s;
}

.chat-tab.active {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    border-bottom: 2px solid #f1c40f;
}

.chat-tab:hover {
    background: rgba(241, 196, 15, 0.05);
    color: #d4af37;
}

.chat-input-container {
    display: flex;
    align-items: center;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid #5a4a35;
    gap: 8px;
}

#active-channel-label {
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

#chat-input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid #5a4a35;
    color: #fff;
    padding: 6px;
    border-radius: 3px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
}

#chat-input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.3);
}

/* --- HOTBAR --- */
#hotbar-grid {
    display: grid;
    grid-auto-flow: row;
    grid-auto-rows: 44px;
    grid-auto-columns: 44px;
    gap: 4px; 
    padding: 8px;
    width: 100%;
    height: auto;
    overflow: auto;
    flex: 1 1 auto;
    box-sizing: border-box;
}
#win-hotbar {
    min-width: 120px;
    min-height: 56px;
    width: 220px;
    height: auto;
}

.hotkey-slot {
    position: relative;
    width: 40px;
    height: 40px;
    background: #1a1510;
    border: 1px solid #5a4a35;
    box-shadow: inset 0 0 10px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hotkey-slot:hover {
    border-color: #f1c40f;
    background-color: #2a2520;
}

.key-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 9px;
    color: #f1c40f;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    z-index: 1;
}

.hotkey-slot img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

/* --- MENU ICON --- */
.menu-content {
    display: flex;
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.icon-btn {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border: 1px solid #5a4a35;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 3px;
}

.icon-btn:hover {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.3);
}

.icon-btn img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

/* --- EDITOR DE MAPA --- */
.editor-header {
    font-weight: bold;
    text-align: center;
    color: #f1c40f;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: move;
    user-select: none;
}

.editor-section {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.editor-section label {
    display: block;
    font-size: 12px;
    color: #d4af37;
    margin-bottom: 6px;
    font-weight: bold;
}

.layer-buttons, .tileset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.layer-buttons button, .tileset-buttons button {
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #555;
    color: #ccc;
    cursor: pointer;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.2s;
    font-size: 12px;
}

.layer-buttons button:hover, .tileset-buttons button:hover {
    border-color: #d4af37;
    color: #f1c40f;
}

.layer-buttons button.active, .tileset-buttons button.active {
    background: #2a5a3a;
    border-color: #27ae60;
    color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

#btn-colisao,
#btn-bucket {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #555;
    color: #ccc;
    cursor: pointer;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.2s;
    font-size: 12px;
}

#btn-colisao:hover,
#btn-bucket:hover {
    border-color: #d4af37;
    color: #f1c40f;
}

#btn-colisao.active,
#btn-bucket.active { 
    background: #5a2a2a;
    border-color: #ff4757; 
    color: #ff4757;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.5);
}

#admin-editor {
    position: fixed; top: 10px; right: 10px;
    width: 320px; max-height: 90vh;
    background: rgba(15, 15, 15, 0.98);
    color: white; padding: 15px;
    border: 2px solid #555;
    z-index: 9999;
    display: flex; flex-direction: column;
    font-family: sans-serif;
    box-shadow: 0 0 20px black;
    overflow-y: auto;
}

#tileset-container {
    flex-shrink: 0; height: 300px; width: 100%;
    overflow: auto; background: #000;
    border: 1px solid #444; position: relative;
    margin: 10px 0; image-rendering: pixelated;
}

#tileset-img {
    display: block; max-width: none !important;
    cursor: crosshair; user-select: none;
    -webkit-user-drag: none;
}

#selector {
    position: absolute;
    border: 2px solid #00faff;
    background: rgba(0, 250, 255, 0.3);
    pointer-events: none; z-index: 5;
    box-sizing: border-box;
}

.save-btn { 
    width: 100%; 
    padding: 12px; 
    background: #2980b9; 
    color: white; 
    border: none; 
    cursor: pointer; 
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.2s;
    margin-top: 10px;
}

.save-btn:hover {
    background: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.save-btn:active {
    transform: scale(0.98);
}

/* Slot Count e Drag */
.slot-count {
    position: absolute; bottom: 2px; right: 2px;
    font-family: 'Roboto', sans-serif; font-size: 10px;
    color: #fff; text-shadow: 1px 1px 1px #000;
    pointer-events: none;
}

.drag-icon {
    position: fixed; width: 32px; height: 32px;
    pointer-events: none; z-index: 1000;
    image-rendering: pixelated;
}

/* --- GLOBAL XP BAR --- */
#global-xp-container {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 30px;
    background: rgba(0,0,0,0.7);
    border-top: 2px solid #d4af37;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    font-family: 'Roboto', sans-serif;
}

#global-xp-bar {
    flex: 1;
    height: 20px;
    background: #000;
    border: 1px solid #5a4a35;
    margin-right: 10px;
    position: relative;
    overflow: hidden;
}

#global-xp-bar::after {
    content: '';
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    width: var(--xp-width, 0%);
    box-shadow: 0 0 5px #27ae60;
    transition: width 0.3s ease;
}

#global-xp-text {
    color: #f1c40f;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

#xp-tooltip {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 15, 10, 0.95);
    border: 2px solid #d4af37;
    padding: 10px;
    border-radius: 4px;
    color: #e0d0b0;
    font-size: 12px;
    z-index: 101;
    min-width: 200px;
}

.tooltip-title {
    color: #f1c40f;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
}

.tooltip-percentage {
    text-align: center;
    margin-top: 5px;
    color: #2ecc71;
    font-weight: bold;
}

/* --- CONTEXT MENU --- */
.context-menu {
    position: fixed;
    background: rgba(20, 15, 10, 0.95);
    border: 2px solid #d4af37;
    border-radius: 4px;
    padding: 5px 0;
    z-index: 10000; /* Tem que ser bem alto */
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    pointer-events: auto; /* <--- MUITO IMPORTANTE: Permite clicar */
}

.context-menu button {
    width: 100%;
    padding: 8px 15px;
    background: none;
    border: none;
    color: #e0d0b0;
    text-align: left;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    transition: all 0.2s;
	pointer-events: auto;
	position: relative;
	z-index: 10001;
}

.context-menu button:hover {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.context-menu button:disabled {
    color: #666;
    cursor: not-allowed;
}

/* --- PARTY INVITE MODAL --- */
.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
}

.rankings-box {
    width: 520px;
    max-width: 92vw;
    max-height: 86vh;
    padding: 18px 18px 14px;
    overflow: hidden;
}

.rankings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rankings-title {
    font-size: 18px;
    color: #f3e2b2;
    letter-spacing: 1px;
}

.rankings-close {
    border: none;
    background: rgba(0,0,0,0.5);
    color: #f1d79b;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.rankings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.rankings-tab {
    flex: 1;
    border: 1px solid rgba(212,175,55,0.35);
    background: rgba(0,0,0,0.35);
    color: #e6d7b2;
    padding: 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
}

.rankings-tab.active {
    border-color: rgba(255, 214, 120, 0.85);
    color: #f9e7b9;
    box-shadow: inset 0 0 12px rgba(255, 214, 120, 0.12);
}

.rankings-panel {
    display: none;
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 4px;
}

.rankings-panel.active {
    display: block;
}

.rank-list {
    display: grid;
    gap: 8px;
}

.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 8px;
    font-size: 12px;
}

.rank-row strong {
    color: #f1d79b;
}

.top-skill-grid {
    display: grid;
    gap: 10px;
}

.top-skill-card {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(212,175,55,0.28);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.top-skill-card .skill-name {
    color: #f1d79b;
}

.top-skill-card .skill-player {
    color: #fff;
}

.top-skill-card .skill-level {
    color: #c9b07a;
}

.rank-search {
    position: relative;
    margin-bottom: 10px;
}

.rank-search input {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    padding: 8px 10px 8px 34px;
    color: #fff;
    font-size: 12px;
}

.rank-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    fill: #d4af37;
    opacity: 0.8;
    pointer-events: none;
}

.rank-level-list {
    display: grid;
    gap: 8px;
}

.rank-level-row {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 8px;
    font-size: 12px;
}

.rank-level-row .pos {
    color: #f1d79b;
    font-weight: bold;
}

.rank-level-row .nick {
    color: #fff;
}

.rank-level-row .lvl {
    color: #c9b07a;
}

/* =========================================
   MOBILE CONTROLS
   ======================================== */
.mobile-controls {
    display: none;
}

.mobile-esc-btn {
    display: none;
}

@media (max-width: 900px) {
    .mobile-controls {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 10px clamp(12px, 4vw, 26px) calc(12px + env(safe-area-inset-bottom, 8px));
        gap: 22px;
        min-height: 150px;
        max-height: 58vh;
        justify-content: space-between;
        align-items: flex-end;
        pointer-events: none;
        touch-action: none;
        z-index: 12000;
    }

    .joystick {
        position: absolute;
        left: clamp(10px, 4vw, 22px);
        bottom: clamp(12px, 4vw, 30px);
        width: 140px;
        height: 140px;
        pointer-events: auto;
        touch-action: none;
    }

    .joystick-base {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 30%, rgba(255, 220, 160, 0.18), rgba(0,0,0,0.55));
        border: 1px solid rgba(212,175,55,0.35);
        box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
    }

    .joystick-stick {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 64px;
        height: 64px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        background: rgba(20, 16, 10, 0.85);
        border: 1px solid rgba(212,175,55,0.7);
        box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    }

    .mobile-actions {
        position: absolute;
        right: clamp(12px, 4vw, 28px);
        bottom: clamp(12px, 4vw, 30px);
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
        pointer-events: auto;
    }

    .mobile-hotkeys {
        display: grid;
        grid-template-columns: repeat(2, 54px);
        gap: 8px;
    }

    .mobile-hotkey.assigned {
        border-color: rgba(255, 255, 255, 0.9);
    }

    .mobile-btn {
        width: 54px;
        height: 54px;
        border-radius: 12px;
        border: 1px solid rgba(212,175,55,0.6);
        background: rgba(10, 8, 6, 0.8);
        color: #f2d99c;
        font-size: 12px;
        font-family: 'Cinzel', serif;
        cursor: pointer;
    }

    #btn-mobile-loot {
        width: 118px;
        height: 48px;
        border-radius: 14px;
        font-size: 13px;
    }

    .mobile-esc-btn {
        position: fixed;
        top: 10px;
        right: 10px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: 2px solid rgba(212,175,55,0.75);
        background: rgba(15, 11, 6, 0.85);
        color: #f2d99c;
        font-family: 'Cinzel', serif;
        font-size: 16px;
        cursor: pointer;
        z-index: 13000;
        pointer-events: auto;
        box-shadow: 0 8px 20px rgba(0,0,0,0.7);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-inventory-menu {
        position: fixed;
        z-index: 36050;
        width: 140px;
        background: rgba(5, 5, 5, 0.95);
        border: 1px solid rgba(212, 175, 55, 0.5);
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.7);
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px;
        pointer-events: none;
    }

    .mobile-inventory-menu button {
        border: none;
        background: rgba(212, 175, 55, 0.15);
        color: #f1d79b;
        border-radius: 8px;
        padding: 8px;
        font-family: 'Cinzel', serif;
        font-size: 12px;
        cursor: pointer;
        pointer-events: auto;
    }

    .mobile-inventory-menu.hidden {
        display: none;
    }
    
    @media (orientation: landscape) {
        .mobile-controls {
            max-height: 52vh;
            min-height: 130px;
        }
        .mobile-actions {
            gap: 8px;
        }
    }

    @media (max-width: 640px) {
        .joystick {
            width: 120px;
            height: 120px;
        }
        .joystick-stick {
            width: 56px;
            height: 56px;
        }
        .mobile-hotkeys {
            grid-template-columns: repeat(2, 48px);
            gap: 6px;
        }
        .mobile-btn {
            width: 48px;
            height: 48px;
        }
        #btn-mobile-loot {
            width: 108px;
        }
    }
}

.force-mobile-controls .mobile-controls {
    display: block;
}
.force-mobile-controls .mobile-esc-btn {
    display: inline-flex;
}
.force-mobile-controls .mobile-inventory-menu {
    display: flex;
    z-index: 36060;
}

.force-mobile-controls #game-ui .mobile-controls,
.force-mobile-controls #game-ui .mobile-esc-btn,
.force-mobile-controls #game-ui .mobile-inventory-menu {
    display: block !important;
    pointer-events: auto;
}

.window-hold-loader {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #f1d79b;
    transform: translateY(-50%);
    opacity: 0;
    animation: windowHoldPulse 0.8s linear infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.window-hold-loader.active {
    opacity: 1;
}

@keyframes windowHoldPulse {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

:fullscreen .mobile-controls,
:-webkit-full-screen .mobile-controls {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    min-height: 140px;
    max-height: 58vh;
    padding: 10px clamp(12px, 4vw, 26px) calc(12px + env(safe-area-inset-bottom, 8px));
    pointer-events: none !important;
    touch-action: none;
}

:fullscreen .mobile-esc-btn,
:-webkit-full-screen .mobile-esc-btn {
    display: inline-flex !important;
    pointer-events: auto !important;
}

:fullscreen .mobile-inventory-menu,
:-webkit-full-screen .mobile-inventory-menu {
    display: flex !important;
    z-index: 36060 !important;
    pointer-events: auto !important;
}

.btn-green {
    background: #27ae60 !important;
}

.btn-green:hover {
    background: #2ecc71 !important;
}

.btn-red {
    background: #c0392b !important;
}

.btn-red:hover {
    background: #e74c3c !important;
}

/* --- PARTY WINDOW --- */
#win-party {
    top: 100px; right: 30px; left: auto;
    width: 250px;
    height: auto;
    max-height: 400px;
    overflow-y: auto;
    --party-scale: 1;
    font-size: calc(12px * var(--party-scale));
}

#party-list-content {
    padding: 10px;
    color: #e0d0b0;
}

#win-party #party-list-content {
    padding: calc(10px * var(--party-scale));
}

#win-party .save-btn {
    font-size: calc(11px * var(--party-scale)) !important;
    padding: calc(8px * var(--party-scale)) calc(12px * var(--party-scale)) !important;
}

#win-party .party-member-row {
    margin-bottom: calc(8px * var(--party-scale)) !important;
    padding: calc(5px * var(--party-scale)) !important;
}

#win-party .party-member-row span {
    font-size: calc(12px * var(--party-scale)) !important;
}

#win-party .party-bar-small {
    height: calc(8px * var(--party-scale)) !important;
}

#win-party .party-bar-small + .party-bar-small {
    height: calc(4px * var(--party-scale)) !important;
}

#win-party .party-btn {
    font-size: calc(12px * var(--party-scale)) !important;
    padding: 0 calc(4px * var(--party-scale)) !important;
}

/* --- MAPA GRANDE --- */
#map-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

#map-canvas {
    border: 3px solid #d4af37;
    background: #000;
    image-rendering: pixelated;
}

/* --- ZONE DISPLAY --- */
.zone-text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    font-family: 'Cinzel', serif;
    font-size: 0px;
    color: #ffd700;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    
    text-shadow: 
        0 4px 4px rgba(0,0,0,0.8),
        0 0 10px rgba(184, 134, 11, 0.5),
        2px 2px 0px #3e2723;
}

.zone-animate {
    animation: zoneReveal 5s ease-out forwards;
}

@keyframes zoneReveal {
    0% {
        font-size: 60px;
        opacity: 0;
        transform: translate(-50%, 0px) scale(0.8);
        filter: blur(10px);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1.1);
        filter: blur(0px);
    }
    25% {
        transform: translate(-50%, -20px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -20px);
    }
    100% {
        font-size: 60px;
        opacity: 0;
        transform: translate(-50%, -80px);
        filter: blur(5px);
    }
}

/* --- NOTIFICAÇÕES --- */
.notification-container {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    pointer-events: auto;
}

.notification {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 15px 20px;
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease-out;
    backdrop-filter: blur(5px);
}

.notification.success {
    border-color: #27ae60;
    background: linear-gradient(135deg, #1e5631 0%, #2d7a3a 100%);
}

.notification.error {
    border-color: #c0392b;
    background: linear-gradient(135deg, #5a1a1a 0%, #7a2a2a 100%);
}

.notification.warning {
    border-color: #f39c12;
    background: linear-gradient(135deg, #5a3d1a 0%, #7a5a2a 100%);
}

.notification.info {
    border-color: #3498db;
    background: linear-gradient(135deg, #1a3a5a 0%, #2a5a7a 100%);
}

.notification-icon {
    font-size: 18px;
    flex-shrink: 0;
    min-width: 24px;
    text-align: center;
}

.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-title {
    font-weight: bold;
    color: #d4af37;
    font-size: 14px;
}

.notification-message {
    color: #ecf0f1;
    font-size: 12px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #d4af37;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s;
}

.notification-close:hover {
    color: #f39c12;
    transform: scale(1.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(-400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.fade-out {
    animation: slideOutRight 0.4s ease-out forwards;
}

.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4af37 0%, transparent 100%);
    border-radius: 0 0 6px 0;
    animation: dismissBar 4s linear forwards;
}

@keyframes dismissBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* --- HUD --- */
#game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.hud-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}


/* --- HUD PLAYER (Retrato + HP/MP) --- */
.hud-player{
    display:flex;
    align-items:center;
    gap:10px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 14px;
    box-shadow: 0 10px 18px rgba(0,0,0,0.45);
    pointer-events: auto;
}

.hud-portrait{
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), rgba(0,0,0,0.25));
    border: 2px solid rgba(212,175,55,0.95);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.70), 0 0 14px rgba(212,175,55,0.22);
}

.hud-portrait::before{
    content:'';
    position:absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px dashed rgba(212,175,55,0.55);
    pointer-events:none;
}

.hud-portrait::after{
    content:'';
    position:absolute;
    inset:-6px;
    border-radius: 50%;
    background: conic-gradient(from 90deg, rgba(212,175,55,0.0), rgba(212,175,55,0.45), rgba(212,175,55,0.0));
    filter: blur(10px);
    opacity: 0.35;
    pointer-events:none;
}

#hud-portrait-img{
    width:100%;
    height:100%;
    object-fit: cover;
    image-rendering: pixelated;
    transform: scale(1.05);
}

.hud-bars{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width: 220px;
}

.hud-bar{
    position: relative;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(212,175,55,0.25);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.65);
}

.hud-bar-fill{
    position:absolute;
    top:0;
    left:0;
    height:100%;
    width: 100%;
    border-radius: 999px;
    transition: width 0.15s ease-out;
}

.hud-hp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(231,76,60,0.95), rgba(192,57,43,0.95));
    box-shadow: 0 0 10px rgba(231,76,60,0.22);
}

.hud-mp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(52,152,219,0.95), rgba(41,128,185,0.95));
    box-shadow: 0 0 10px rgba(52,152,219,0.22);
}

.hud-bar-text{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,231,166,0.95);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.9);
    letter-spacing: 0.5px;
    pointer-events:none;
}

.action-icon-btn {
    width: 42px;
    height: 42px;
    background: linear-gradient(180deg, #3e2723 0%, #1a100e 100%);
    border: 2px solid #b8860b;
    border-radius: 4px;
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5), inset 0 0 5px rgba(0,0,0,0.8);
    text-shadow: 1px 1px 0 #000;
    transition: all 0.2s;
    margin-left: 0;
display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon-btn:hover {
    border-color: #ffd700;
    box-shadow: 0 0 10px #ffd700;
    transform: translateY(-2px);
}

.action-icon-btn:active {
    transform: translateY(1px);
    background: #1a100e;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    #admin-editor {
        width: 280px;
        top: 5px;
        right: 5px;
    }
    
    #tileset-container {
        height: 200px;
    }
    
    .notification-container {
        max-width: 280px;
        left: 10px;
    }
}
.party-member-row {
    margin-bottom: 8px;
    padding: 5px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

.party-member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.party-bar-small {
    width: 100%;
    height: 6px;
    background: #000;
    border: 1px solid #444;
    margin-top: 2px;
    border-radius: 2px;
    overflow: hidden;
}

.party-hp-fill {
    height: 100%;
    background: #c0392b;
    transition: width 0.3s;
}

.party-mp-fill {
    height: 100%;
    background: #2980b9;
    transition: width 0.3s;
}

.party-btn {
    background: none;
    border: none;
    color: #d4af37;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
}

.party-btn:hover {
    color: #fff;
}
/* Cores por Canal de Chat */
.msg-local { color: #ffffff; }
.msg-global { color: #f1c40f; text-shadow: 0 0 2px rgba(241, 196, 15, 0.5); }
.msg-trade { color: #e67e22; }
.msg-guild { color: #2ecc71; }
.msg-party { color: #3498db; font-weight: bold; } /* Mensagens da Party em azul */
.msg-system { color: #00faff; font-style: italic; border-left: 2px solid #00faff; padding-left: 5px; margin: 2px 0; }

/* Destaque para o nome de quem fala */
#chat-history div {
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
}
/* Botões dentro da lista de Party */
.party-btn.party-crown {
    color: #f1c40f; /* Dourado para o líder */
    font-size: 14px;
}

.party-btn.party-remove {
    color: #e74c3c; /* Vermelho para remover */
    font-size: 14px;
    font-weight: bold;
}

.party-member-row.is-me {
    border-left: 3px solid #2ecc71; /* Destaque para você na lista */
    background: rgba(46, 204, 113, 0.1);
}

/* ========================================= 
   BOTÃO SAIR DO GRUPO
   ========================================= */
.party-leave-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    width: 100% !important;
    border: 1px solid #a93226 !important;
    border-radius: 4px !important;
    color: #fff !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'Cinzel', serif !important;
}

.party-leave-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    transform: scale(1.02) !important;
    box-shadow: 0 6px 12px rgba(199, 43, 39, 0.4) !important;
}

.party-leave-btn:active {
    transform: scale(0.98) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Garantir que o modal de convite fique no topo absoluto */
#party-invite-modal {
    z-index: 10001; 
}

#party-invite-modal .glass-box {
    border: 2px solid #3498db; /* Borda azul para diferenciar de login */
    min-width: 250px;
}

#party-invite-modal p {
    font-family: 'Roboto', sans-serif;
    margin: 15px 0;
    font-size: 14px;
}
/* =========================================
   REPAGINADA (THEME OVERRIDES) - STONE/GOLD
   * Mantém IDs/classes -> não quebra JS
   * Só "skin": cores, sombras, bordas, fontes
   ========================================= */

:root{
  --ui-bg: rgba(12, 13, 16, 0.86);
  --ui-panel: rgba(20, 22, 28, 0.86);
  --ui-panel-strong: rgba(14, 16, 20, 0.92);
  --ui-border: rgba(212, 175, 55, 0.35);        /* dourado */
  --ui-border-strong: rgba(212, 175, 55, 0.55);
  --ui-text: #e8e8ea;
  --ui-muted: rgba(232,232,234,0.72);

  --accent: #d4af37;      /* ouro */
  --accent-2: #b21d1d;    /* vermelho escuro */
  --accent-3: #2ecc71;    /* verde */
  --info: #3fa9f5;        /* azul info */

  --shadow: 0 14px 28px rgba(0,0,0,0.60);
  --shadow-soft: 0 10px 18px rgba(0,0,0,0.38);
  --inner: inset 0 0 16px rgba(0,0,0,0.65);

  --radius: 10px;
}

html, body{
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(212, 175, 55, 0.08), transparent 60%),
    radial-gradient(900px 520px at 80% 0%, rgba(63, 169, 245, 0.06), transparent 55%),
    linear-gradient(180deg, #07080a 0%, #0b0d12 45%, #07080a 100%) !important;
  color: var(--ui-text);
}

/* Mantém vibe medieval, mas com leitura melhor */
body, html{
  font-family: 'Cinzel', serif;
}

/* Título */
#game-title{
  color: #fff !important;
  text-shadow:
    0 14px 28px rgba(0,0,0,0.85),
    0 0 18px rgba(212,175,55,0.22) !important;
  letter-spacing: 2px;
}

/* Barra inferior */
#bottom-menu-bar{
  background: linear-gradient(180deg, rgba(24, 26, 32, 0.94) 0%, rgba(14, 16, 20, 0.94) 100%) !important;
  border-top: 1px solid rgba(212,175,55,0.30) !important;
  box-shadow: 0 -10px 26px rgba(0,0,0,0.55);
}

/* Botão Entrar (ouro) */
#btn-entrar-trigger{
  background: linear-gradient(135deg, rgba(212,175,55,0.96) 0%, rgba(255,215,120,0.92) 100%) !important;
  color: #1a1206 !important;
  border: 1px solid rgba(0,0,0,0.25) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow-soft) !important;
}
#btn-entrar-trigger:hover{
  filter: brightness(1.06);
  transform: translateY(-1px) scale(1.03) !important;
}
#btn-entrar-trigger:active{
  transform: translateY(0px) scale(0.98) !important;
}

/* Modal */
#auth-modal{
  background: rgba(0,0,0,0.72) !important;
  backdrop-filter: blur(4px);
}
.glass-box{
  background: linear-gradient(180deg, rgba(26, 28, 34, 0.82) 0%, rgba(16, 18, 22, 0.82) 100%) !important;
  border: 1px solid rgba(212,175,55,0.30) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65) !important;
}
.glass-box input{
  background: rgba(0,0,0,0.45) !important;
  border: 1px solid rgba(212,175,55,0.28) !important;
  border-radius: 10px !important;
}
.glass-box input:focus{
  outline: none !important;
  border-color: rgba(212,175,55,0.72) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12) !important;
}

/* Abas de login/registro */
.auth-tabs{
  display: flex;
  gap: 8px;
  margin: 8px 0 12px 0;
}
.auth-tab-btn{
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(212,175,55,0.35);
  background: rgba(0,0,0,0.35);
  color: #e0d0b0;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  cursor: pointer;
}
.auth-tab-btn.active{
  background: linear-gradient(135deg, rgba(212,175,55,0.9) 0%, rgba(255,215,120,0.9) 100%);
  color: #1a1206;
  border-color: rgba(212,175,55,0.7);
}
.auth-tab-panel{
  display: block;
}

/* Botões auth */
#btn-login{
  background: linear-gradient(135deg, rgba(63,169,245,0.92) 0%, rgba(95,190,255,0.88) 100%) !important;
  color: #071018 !important;
  border-radius: 10px !important;
}
#btn-register{
  background: linear-gradient(135deg, rgba(178,29,29,0.92) 0%, rgba(140,20,20,0.88) 100%) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
}
.auth-buttons button:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Janelas */
.game-window{
  background: var(--ui-bg) !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(6px);
  color: rgba(232,232,234,0.92) !important;
}
.win-header{
  background: linear-gradient(180deg, rgba(52, 38, 18, 0.92) 0%, rgba(28, 20, 10, 0.92) 100%) !important;
  color: #ffe7a6 !important;
  border-bottom: 1px solid rgba(212,175,55,0.35) !important;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.9) !important;
}

/* Slots */
.inv-slot,
.hotkey-slot,
.eq-slot{
  background: rgba(0,0,0,0.42) !important;
  border: 1px solid rgba(212,175,55,0.26) !important;
  border-radius: 10px !important;
  box-shadow: var(--inner) !important;
}
.inv-slot:hover,
.hotkey-slot:hover,
.eq-slot:hover{
  border-color: rgba(255,215,120,0.78) !important;
  background: rgba(0,0,0,0.56) !important;
  box-shadow: var(--inner), 0 0 0 3px rgba(212,175,55,0.10) !important;
}
.key-number{
  color: #ffe7a6 !important;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.9) !important;
}

/* Skills */
.skill-row{ font-family: 'Roboto', sans-serif !important; }
.skill-info{ color: rgba(255,231,166,0.92) !important; }
.skill-bar{
  background: rgba(0,0,0,0.60) !important;
  border: 1px solid rgba(212,175,55,0.22) !important;
  border-radius: 999px !important;
}
.skill-bar .fill{
  background: linear-gradient(90deg, rgba(212,175,55,0.95) 0%, rgba(46,204,113,0.90) 100%) !important;
  box-shadow: 0 0 10px rgba(212,175,55,0.20) !important;
}

/* Chat */
#chat-container{
  background: var(--ui-panel) !important;
  border: 1px solid rgba(212,175,55,0.30) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow) !important;
}
.chat-tabs{
  background: rgba(0,0,0,0.22) !important;
  border-bottom: 1px solid rgba(212,175,55,0.18) !important;
}
.chat-tab{
  color: rgba(232,232,234,0.55) !important;
  border-right: 1px solid rgba(212,175,55,0.14) !important;
}
.chat-tab.active{
  background: rgba(212,175,55,0.10) !important;
  color: #ffe7a6 !important;
  border-bottom: 2px solid rgba(212,175,55,0.85) !important;
}
.chat-tab:hover{
  background: rgba(212,175,55,0.06) !important;
  color: rgba(232,232,234,0.90) !important;
}
#chat-input{
  background: rgba(0,0,0,0.45) !important;
  border: 1px solid rgba(212,175,55,0.22) !important;
  border-radius: 10px !important;
}
#chat-input:focus{
  border-color: rgba(255,215,120,0.70) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.10) !important;
}

/* Layout da hub e chat */
#win-menubar{
  position: absolute !important;
  left: 20px !important;
  top: 108px !important;
  transform: none !important;
  width: auto !important;
  display: flex !important;
  gap: 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
#chat-container{
  left: 20px;
  bottom: 20px;
  top: auto;
  right: auto;
}

#status-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 2500;
  padding: 12px;
  pointer-events: none;
}
#status-panel {
  min-width: 210px;
  max-width: 260px;
  max-height: 60vh;
  overflow: auto;
  pointer-events: auto;
}

/* Outfit hub */
.hub-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3200;
}
.hub-overlay.hidden { display: none; }
#outfit-hub {
  width: min(420px, 90vw);
  padding: 0;
}
.outfit-body {
  padding: 12px;
  display: grid;
  gap: 12px;
}
.outfit-preview {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 12px;
  padding: 8px;
}
#outfit-canvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.05), rgba(0,0,0,0.6));
  border-radius: 10px;
  border: 1px solid rgba(212,175,55,0.15);
}
.outfit-arrow-btn {
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(212,175,55,0.35);
  color: #ffe7a6;
  font-size: 16px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.outfit-arrow-btn:hover {
  border-color: rgba(255,215,120,0.8);
  transform: translateY(-1px);
}
.outfit-name {
  text-align: center;
  font-weight: bold;
  color: #ffe7a6;
  letter-spacing: 1px;
}
.outfit-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.outfit-vip-tag {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  color: #0d1b2a;
  background: linear-gradient(135deg, #5bc0ff, #2d7cff);
  border: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 0 10px rgba(62,150,255,0.4);
}
.outfit-vip-tag.vip2 {
  color: #1b0d2a;
  background: linear-gradient(135deg, #c084ff, #7a2bff);
  box-shadow: 0 0 12px rgba(146,80,255,0.45);
}
.outfit-vip-tag.hidden { display: none; }
.outfit-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(232,232,234,0.7);
}
.nick-color-panel {
  position: fixed;
  left: 16px;
  top: 120px;
  z-index: 3200;
  background: rgba(10,12,18,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 12px 10px;
  width: 180px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}
.nick-color-panel.hidden { display: none; }
.outfit-nick-color {
  margin-top: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.outfit-nick-color.hidden { display: none; }
.outfit-nick-title {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.outfit-nick-palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.nick-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: var(--swatch, #2ecc71);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.25);
}
.nick-color-swatch.hidden { display: none; }
.nick-color-swatch.active {
  outline: 2px solid #f8fafc;
}
.outfit-char-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}
.outfit-char-label {
  text-align: center;
  font-size: 12px;
  color: #d9e4ff;
}
.outfit-char-btn {
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(212,175,55,0.35);
  color: #ffe7a6;
  font-size: 14px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.outfit-char-btn:hover {
  border-color: rgba(255,215,120,0.8);
  transform: translateY(-1px);
}
.outfit-apply-btn {
  background: linear-gradient(135deg, rgba(46,204,113,0.95) 0%, rgba(25,160,90,0.95) 100%);
  border: 1px solid rgba(0,0,0,0.3);
  color: #081a10;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}
.outfit-apply-btn:hover { filter: brightness(1.05); }
.outfit-apply-btn.vip-locked {
  background: linear-gradient(135deg, #5bc0ff, #2d7cff);
  color: #0d1b2a;
}
.outfit-close-btn {
  float: right;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(212,175,55,0.35);
  color: #ffe7a6;
  border-radius: 8px;
  padding: 2px 8px;
  cursor: pointer;
}
.vip-offer-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(20,30,40,0.88), rgba(8,10,15,0.92));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 36000;
  padding: 20px;
}
.vip-offer-overlay.hidden { display: none; }
.vip-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  width: min(1040px, 96vw);
}
.vip-offer-card {
  width: 100%;
  background: linear-gradient(165deg, rgba(18,24,36,0.95), rgba(10,14,22,0.95));
  border-radius: 14px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(90,140,255,0.2);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  color: #eef2ff;
  position: relative;
  text-align: center;
}
.vip-offer-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  color: #dbeafe;
  border-radius: 8px;
  padding: 2px 8px;
  cursor: pointer;
  z-index: 2;
}
.vip-offer-badge {
  display: inline-block;
  background: linear-gradient(135deg, #5bc0ff, #2d7cff);
  color: #0b1220;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.vip-offer-badge--vip2 {
  background: linear-gradient(135deg, #ffe66d, #ff9f1c);
  color: #2a1600;
}
.vip-offer-title {
  margin: 6px 0 4px;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.vip-offer-subtitle {
  margin: 0 0 10px;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
}
.vip-offer-price {
  font-size: 18px;
  font-weight: bold;
  color: #ffe7a6;
  margin-bottom: 10px;
}
.vip-offer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  text-align: left;
  display: grid;
  gap: 6px;
  max-height: 170px;
  overflow: auto;
}
.vip-offer-list li {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
}
.vip-offer-buy {
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  border: 1px solid rgba(0,0,0,0.35);
  color: #2a1d00;
  font-weight: bold;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.vip-offer-buy--vip2 {
  background: linear-gradient(135deg, #ffe66d, #ff9f1c);
}
.vip-offer-buy--vip2-year {
  background: linear-gradient(135deg, #f7b733, #fc4a1a);
  color: #2a0f00;
}
.vip-skin-showcase {
  margin: 12px auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px 12px;
}
.vip-skin-caption {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.vip-offer-card--vip2 {
  border-color: rgba(255,193,7,0.35);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 25px rgba(255,193,7,0.22);
}
.vip-offer-card--vip2-year {
  border-color: rgba(247,183,51,0.45);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 30px rgba(247,183,51,0.25);
}
.vip-offer-card--vip2-year .vip-offer-title {
  color: #ffeaa7;
}
.vip-offer-buy:hover { filter: brightness(1.05); }
.bank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 10px;
}
.bank-expand-btn {
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  border: 1px solid rgba(0,0,0,0.35);
  color: #0b1220;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
}
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
}
.bank-grid .bank-slot {
  width: 42px;
  height: 42px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.bank-grid .bank-slot img {
  width: 32px;
  height: 32px;
  pointer-events: none;
}
.bank-grid .bank-slot .qty {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.bank-hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

.esc-menu {
  position: fixed;
  inset: 0;
  background: rgba(5,8,12,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3600;
}
.esc-menu.hidden { display: none; }
.esc-menu-card {
  width: min(420px, 92vw);
  background: linear-gradient(160deg, rgba(16,22,34,0.96), rgba(8,12,20,0.96));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 18px;
  color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}
.esc-menu-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}
.esc-menu-list {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
  border-radius: 10px;
}
.esc-menu-link {
  background: none;
  border: none;
  color: #e5e7eb;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 4px 2px;
  cursor: pointer;
}
.esc-menu-link:hover {
  color: #ffd166;
  text-shadow: 0 0 6px rgba(255,209,102,0.35);
}
.esc-menu-link:active {
  transform: translateX(2px);
}
.esc-menu-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
}
.esc-menu-row label {
  color: rgba(255,255,255,0.75);
}
.esc-menu-buttons {
  display: flex;
  gap: 8px;
}
.esc-gfx-btn {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e7eb;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.esc-gfx-btn.active {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #081018;
  border-color: rgba(0,0,0,0.35);
  font-weight: bold;
}
.esc-menu-close {
  width: 100%;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  border: 1px solid rgba(0,0,0,0.35);
  color: #2a1d00;
  font-weight: bold;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
@media (max-width: 1024px) {
  .vip-offer-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 720px) {
  .vip-offer-overlay {
    align-items: flex-start;
    padding: 12px;
  }
  .vip-offer-grid {
    grid-template-columns: 1fr;
    width: min(360px, 90vw);
    max-height: 88vh;
    overflow-y: auto;
    padding: 6px 0;
  }
  .vip-offer-close {
    top: 6px;
    right: 6px;
  }
  .vip-offer-card {
    padding: 12px;
    border-radius: 10px;
    margin: 0 auto;
    width: min(100%, 340px);
    background: linear-gradient(165deg, rgba(14,18,28,0.98), rgba(4,6,12,0.98));
    box-shadow: 0 20px 34px rgba(0,0,0,0.55);
  }
  .vip-offer-badge {
    padding: 2px 10px;
    font-size: 11px;
  }
  .vip-offer-title {
    font-size: 18px;
  }
  .vip-offer-subtitle {
    font-size: 11px;
  }
  .vip-offer-price {
    font-size: 16px;
  }
  .vip-offer-list {
    max-height: 120px;
    font-size: 10px;
  }
  .vip-offer-buy {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .vip-offer-overlay {
    padding-top: 12vh;
    align-items: flex-start;
  }
  .vip-offer-grid {
    width: min(360px, 92vw);
    max-height: 70vh;
  }
}
}
#status-stats {
  padding: 10px 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  color: var(--ui-text);
}
.status-label {
  color: var(--ui-muted);
}
.status-bonus {
  color: #2ecc71;
  margin-left: 6px;
  font-weight: bold;
}
.status-penalty {
  color: #e74c3c;
  margin-left: 6px;
  font-weight: bold;
}

/* Cores dos canais */
.msg-local  { color: #e8e8ea !important; }
.msg-global { color: #ffe7a6 !important; text-shadow: 0 0 8px rgba(212,175,55,0.22) !important; }
.msg-trade  { color: #ffb020 !important; }
.msg-guild  { color: #2ecc71 !important; }
.msg-party  { color: #3fa9f5 !important; font-weight: bold !important; }
.msg-system { color: #9bd7ff !important; font-style: italic !important; border-left: 2px solid rgba(63,169,245,0.85) !important; }

/* Botões de ícone */
.icon-btn{
  background: rgba(0,0,0,0.40) !important;
  border: 1px solid rgba(212,175,55,0.22) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-soft) !important;
}
.icon-btn:hover{
  border-color: rgba(255,215,120,0.78) !important;
  background: rgba(0,0,0,0.55) !important;
  box-shadow: var(--shadow-soft), 0 0 0 3px rgba(212,175,55,0.10) !important;
}

/* Editor */
#admin-editor{
  background: var(--ui-panel-strong) !important;
  border: 1px solid rgba(212,175,55,0.22) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow) !important;
}
.layer-buttons button,
.tileset-buttons button,
#btn-colisao,
#btn-bucket{
  background: rgba(0,0,0,0.38) !important;
  border: 1px solid rgba(212,175,55,0.18) !important;
  color: rgba(232,232,234,0.78) !important;
  border-radius: 10px !important;
}
.layer-buttons button:hover,
.tileset-buttons button:hover,
#btn-colisao:hover,
#btn-bucket:hover{
  border-color: rgba(255,215,120,0.72) !important;
  color: #ffe7a6 !important;
}
.layer-buttons button.active,
.tileset-buttons button.active{
  background: rgba(212,175,55,0.12) !important;
  border-color: rgba(212,175,55,0.70) !important;
  color: #ffe7a6 !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.10) !important;
}
#btn-colisao.active,
#btn-bucket.active{
  background: rgba(178,29,29,0.18) !important;
  border-color: rgba(178,29,29,0.70) !important;
  color: #ffd0d0 !important;
}

/* Botão salvar */
.save-btn{
  background: linear-gradient(135deg, rgba(63,169,245,0.92) 0%, rgba(95,190,255,0.88) 100%) !important;
  color: #071018 !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-soft) !important;
}
.save-btn:hover{
  filter: brightness(1.05);
  box-shadow: var(--shadow) !important;
}

/* Barra global XP */
#global-xp-container{
  background: rgba(0,0,0,0.62) !important;
  border-top: 1px solid rgba(212,175,55,0.32) !important;
}
#global-xp-bar{
  border: 1px solid rgba(212,175,55,0.18) !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,0.60) !important;
}
#global-xp-bar::after{
  background: linear-gradient(90deg, rgba(212,175,55,0.95), rgba(46,204,113,0.90)) !important;
  box-shadow: 0 0 12px rgba(212,175,55,0.18) !important;
}
#global-xp-text{
  color: #ffe7a6 !important;
}

/* Tooltip */
#xp-tooltip{
  background: rgba(16, 18, 22, 0.94) !important;
  border: 1px solid rgba(212,175,55,0.30) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow) !important;
}
.tooltip-title{ color: #ffe7a6 !important; }
.tooltip-percentage{ color: #2ecc71 !important; }

/* Context menu */
.context-menu{
  background: rgba(16, 18, 22, 0.96) !important;
  border: 1px solid rgba(212,175,55,0.30) !important;
  border-radius: 12px !important;
}
.context-menu button:hover{
  background: rgba(212,175,55,0.10) !important;
  color: #ffe7a6 !important;
}

/* Notificações */
.notification{
  border: 1px solid rgba(212,175,55,0.28) !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(28,30,36,0.92), rgba(14,16,20,0.92)) !important;
  box-shadow: var(--shadow) !important;
}
.notification-title{ color: #ffe7a6 !important; }
.notification.success{ border-color: rgba(46,204,113,0.65) !important; }
.notification.error{ border-color: rgba(178,29,29,0.70) !important; }
.notification.warning{ border-color: rgba(255,176,32,0.70) !important; }
.notification.info{ border-color: rgba(63,169,245,0.70) !important; }
.notification-close{ color: rgba(255,231,166,0.72) !important; }
.notification-close:hover{ color: #ffb020 !important; }

/* Mapa */
#map-canvas{
  border: 2px solid rgba(212,175,55,0.55) !important;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Zone */
.zone-text{
  color: #ffe7a6 !important;
  text-shadow:
    0 14px 28px rgba(0,0,0,0.85),
    0 0 16px rgba(212,175,55,0.22) !important;
}


/* (removido) bloco duplicado do título — estava sobrescrevendo o estilo medieval */


/* --- HUD Player (Retrato + HP/MP) --- */
.hud-player{
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 10px;
    background: rgba(10, 8, 6, 0.55);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.45), inset 0 0 12px rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
}

.hud-portrait{
    width:54px;
    height:54px;
    border-radius: 999px;
    position:relative;
    background: radial-gradient(circle at 30% 30%, rgba(255,215,120,0.22), rgba(0,0,0,0.2));
    border: 2px solid rgba(212,175,55,0.80);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.55), 0 0 18px rgba(212,175,55,0.18);
    overflow:hidden;
    flex: 0 0 auto;
}

.hud-portrait::before{
    content:'';
    position:absolute;
    inset: -6px;
    border-radius: 999px;
    background: conic-gradient(from 120deg, rgba(212,175,55,0.0), rgba(212,175,55,0.55), rgba(212,175,55,0.0));
    filter: blur(6px);
    opacity: 0.45;
    pointer-events:none;
}

.hud-portrait img{
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transform: scale(1.15);
}

.hud-bars{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width: 170px;
}

.hud-bar{
    position:relative;
    height: 14px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(212,175,55,0.18);
    overflow:hidden;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.75);
}

.hud-bar-fill{
    position:absolute;
    inset: 0;
    width: var(--bar, 100%);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.hud-hp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(231,76,60,0.95), rgba(241,196,15,0.65));
    box-shadow: 0 0 10px rgba(231,76,60,0.20);
}

.hud-mp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(52,152,219,0.95), rgba(46,204,113,0.55));
    box-shadow: 0 0 10px rgba(52,152,219,0.18);
}

.hud-bar::after{
    content:'';
    position:absolute;
    inset: 1px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.0));
    pointer-events:none;
}

.hud-bar-text{
    position:absolute;
    inset: 0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255,231,166,0.92);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.9);
    pointer-events:none;
}


/* =========================================
   HUD PLAYER (Retrato + HP/MP)
   ========================================= */
.hud-player{
    display:flex;
    align-items:center;
    gap:10px;
    pointer-events:auto;
}

.hud-portrait{
    width:52px;
    height:52px;
    border-radius:50%;
    position:relative;
    overflow:hidden;
    background: radial-gradient(circle at 30% 30%, rgba(255, 215, 120, 0.25), rgba(0,0,0,0.65));
    border: 2px solid rgba(212,175,55,0.85);
    box-shadow: 0 8px 16px rgba(0,0,0,0.65), inset 0 0 0 2px rgba(0,0,0,0.55);
}
.hud-portrait::before{
    content:'';
    position:absolute;
    inset:3px;
    border-radius:50%;
    border:1px dashed rgba(212,175,55,0.55);
    pointer-events:none;
}
.hud-portrait::after{
    content:'';
    position:absolute;
    inset:-10px;
    background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 55%);
    pointer-events:none;
}
.hud-portrait img{
    width:100%;
    height:100%;
    object-fit:cover;
    image-rendering: pixelated;
}

.hud-bars{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width: 160px;
}

.hud-bar{
    position:relative;
    height:16px;
    border-radius:999px;
    overflow:hidden;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(212,175,55,0.28);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.75), 0 6px 12px rgba(0,0,0,0.35);
}
.hud-bar::before{
    content:'';
    position:absolute;
    inset:1px;
    border-radius:999px;
    border: 1px solid rgba(255,255,255,0.06);
    pointer-events:none;
}

.hud-bar-fill{
    height:100%;
    width:100%;
    transform-origin:left center;
    transition: width 0.15s ease;
}

.hud-hp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(231,76,60,0.95), rgba(192,57,43,0.85));
    box-shadow: 0 0 12px rgba(231,76,60,0.25);
}

.hud-mp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(52,152,219,0.95), rgba(41,128,185,0.85));
    box-shadow: 0 0 12px rgba(52,152,219,0.25);
}

.hud-bar-text{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:'Roboto', sans-serif;
    font-size:11px;
    font-weight:bold;
    color: rgba(255,231,166,0.95);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.85);
    letter-spacing: 0.5px;
    pointer-events:none;
}

/* Ajuste do botão de teleporte dentro do HUD */
.hud-top-left{ gap: 12px; }
.action-icon-btn{ margin-left: 0 !important; }


/* --- HUD PLAYER (Portrait + HP/MP) --- */
.hud-player{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 14px;
    background: rgba(10, 8, 6, 0.55);
    border: 1px solid rgba(212,175,55,0.25);
    box-shadow: 0 10px 24px rgba(0,0,0,0.55), inset 0 0 14px rgba(0,0,0,0.55);
    pointer-events: auto;
}

.hud-portrait{
    width: 64px;
    height: 64px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.18), rgba(0,0,0,0.65));
    border: 2px solid rgba(212,175,55,0.85);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.55), 0 0 18px rgba(212,175,55,0.18);
}

.hud-portrait::before{
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px dashed rgba(255,231,166,0.55);
    opacity: 0.9;
    pointer-events: none;
}

.hud-portrait::after{
    content: '';
    position: absolute;
    inset: -10px;
    background: conic-gradient(from 0deg, rgba(212,175,55,0.0), rgba(212,175,55,0.35), rgba(212,175,55,0.0));
    filter: blur(10px);
    opacity: 0.45;
    pointer-events: none;
}

#hud-portrait-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transform: scale(1.05);
}

.hud-bars{
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.hud-bar{
    position: relative;
    height: 16px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(212,175,55,0.20);
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.75);
}

.hud-bar .hud-bar-fill{
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%; /* JS pode sobrescrever via style.width */
    border-radius: 999px;
    transition: width 0.18s ease-out;
}

.hud-bar.hud-hp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(231,76,60,0.95), rgba(192,57,43,0.95));
    box-shadow: 0 0 14px rgba(231,76,60,0.25);
}

.hud-bar.hud-hp.poisoned .hud-bar-fill{
    background: linear-gradient(90deg, rgba(16,185,129,0.95), rgba(5,150,105,0.95));
    box-shadow: 0 0 14px rgba(16,185,129,0.35);
}

.hud-bar.hud-mp .hud-bar-fill{
    background: linear-gradient(90deg, rgba(52,152,219,0.95), rgba(41,128,185,0.95));
    box-shadow: 0 0 14px rgba(52,152,219,0.22);
}

.hud-bar .hud-bar-text{
    position: relative;
    z-index: 2;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(255,231,166,0.95);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.9);
    text-align: center;
    line-height: 16px;
}

/* Ajuste do layout do topo esquerdo com o novo HUD */
.hud-top-left{ gap: 12px; }
.action-icon-btn{ margin-left: 0 !important; }

@media (max-width: 768px){
    .hud-player{ transform: scale(0.92); transform-origin: top left; }
    .hud-bars{ min-width: 190px; }
}

/* === NOVA IDENTIDADE DAS JANELAS (INV/EQP/HOTKEYS/SKILLS) === */
#win-inventory,
#win-skills,
#win-equipment,
#win-hotbar{
    background:
        linear-gradient(160deg, rgba(40,28,18,0.96), rgba(15,10,7,0.96)),
        repeating-linear-gradient(135deg, rgba(255,230,185,0.04) 0 2px, rgba(0,0,0,0.04) 2px 4px);
    border: 1px solid rgba(214,170,92,0.45);
    border-radius: 14px;
    box-shadow: 0 18px 28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,230,185,0.08);
    font-family: 'Cormorant Garamond', serif;
}

#win-inventory .win-header,
#win-skills .win-header,
#win-equipment .win-header,
#win-hotbar .win-header{
    background: linear-gradient(90deg, rgba(44,30,18,0.98), rgba(84,56,30,0.98), rgba(44,30,18,0.98));
    border-bottom: 1px solid rgba(214,170,92,0.45);
    border-radius: 12px 12px 6px 6px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0,0,0,0.9);
}

#win-inventory #currency-display{
    background: rgba(10,7,5,0.55);
    border-bottom: 1px solid rgba(214,170,92,0.35);
}

#win-inventory #inventory-grid{
    background: radial-gradient(circle at top, rgba(255,226,180,0.05), rgba(0,0,0,0) 60%);
}

#win-inventory .inv-slot,
#win-hotbar .inv-slot{
    background: radial-gradient(circle at 30% 25%, rgba(255,220,160,0.08), rgba(12,9,6,0.9));
    border: 1px solid rgba(193,150,85,0.55);
    border-radius: 9px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

#win-inventory .inv-slot:hover,
#win-hotbar .inv-slot:hover{
    border-color: rgba(241,196,15,0.9);
    background: radial-gradient(circle at 30% 25%, rgba(255,220,160,0.16), rgba(12,9,6,0.92));
}

#win-hotbar #hotbar-grid{
    background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0));
    border-top: 1px solid rgba(214,170,92,0.22);
}

#win-hotbar .hotkey-slot{
    border-radius: 8px;
}

#win-hotbar .key-number{
    color: #ffe2a3;
    text-shadow: 0 1px 0 rgba(0,0,0,0.9);
}

#win-equipment .eq-grid{
    background: radial-gradient(circle at top, rgba(255,210,140,0.08), rgba(0,0,0,0.4));
    border: 1px dashed rgba(214,170,92,0.25);
    border-radius: 10px;
}

#win-equipment .eq-slot{
    background: radial-gradient(circle at 30% 25%, rgba(255,220,160,0.1), rgba(12,9,6,0.92));
    border: 1px solid rgba(193,150,85,0.55);
    border-radius: 10px;
}

#win-equipment .eq-slot:hover{
    border-color: rgba(241,196,15,0.9);
    background: radial-gradient(circle at 30% 25%, rgba(255,220,160,0.18), rgba(12,9,6,0.95));
}

#win-skills .skill-row{
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.2px;
}

#win-skills .skill-info{
    color: #f1deb5;
    font-size: 12px;
}

#win-skills .skill-bar{
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(214,170,92,0.5);
    background: rgba(0,0,0,0.7);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
}

#win-skills .skill-bar .fill{
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(87,182,115,0.95), rgba(46,204,113,0.95));
    box-shadow: 0 0 10px rgba(87,182,115,0.4);
}



/* Tooltip organizado: seções e bônus */
.item-tooltip-section-title{
    margin-top: 4px;
    margin-bottom: 2px;
    font-weight: 700;
    color: #e6d8b5;
    opacity: 0.95;
}
.item-tooltip-sep{
    height: 1px;
    background: rgba(107, 90, 64, 0.8);
    margin: 6px 0 5px 0;
}
.item-bonus{
    color: #b26bff; /* destaque roxo */
    font-weight: 700;
    font-size: 11px;
    line-height: 1.15;
}
.item-tooltip-desc{
    color: #d6c7a6;
    font-size: 11px;
    line-height: 1.2;
    white-space: pre-line;
}
.force-mobile-controls .mobile-controls {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    max-height: 58vh;
    min-height: 140px;
    padding: 10px clamp(12px, 4vw, 26px) calc(12px + env(safe-area-inset-bottom, 8px));
    pointer-events: none;
    touch-action: none;
}
.force-mobile-controls .mobile-controls .mobile-actions,
.force-mobile-controls .mobile-controls .joystick,
.force-mobile-controls .mobile-esc-btn {
    display: block !important;
    opacity: 1 !important;
}
.force-mobile-controls .mobile-esc-btn {
    pointer-events: auto;
}
.force-mobile-controls .mobile-hotkey {
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}
