/* === VARIÁVEIS CYBERPUNK E RESET === */
:root {
    --bg-dark: #030305; --panel-bg: #0a0a0f; --accent-red: #ff1a55; --accent-blue: #00e5ff; 
    --accent-purple: #b000ff; --text-main: #e0e0e0; 
    --rarity-com: #aaaaaa; --rarity-inc: #00ff66; --rarity-rar: #0077ff; --rarity-epi: #aa00ff; --rarity-leg: #ffaa00;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Courier New', Courier, monospace; background-color: var(--bg-dark); color: var(--text-main); margin: 0; height: 100vh; overflow: hidden; user-select: none; -webkit-user-select: none; }

/* SCROLLBARS */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #000; border-left: 1px solid #111; }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 10px; box-shadow: inset 0 0 10px rgba(0,229,255,0.8); }

/* INPUTS */
input, select { appearance: none; -webkit-appearance: none; background: #000 !important; color: #fff !important; border: 1px solid var(--accent-blue) !important; padding: 10px; border-radius: 4px; font-family: inherit; outline: none; width: 100%; box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.1); }
select { background: url('data:image/svg+xml;utf8,<svg fill="%2300e5ff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center; }
input:focus, select:focus { border-color: var(--accent-red) !important; box-shadow: inset 0 0 10px rgba(255, 26, 85, 0.3), 0 0 10px var(--accent-red); }
button { font-family: inherit; cursor: pointer; transition: 0.3s; outline: none; }

/* TEXTOS NEON */
h1, h2, h3, h4 { color: var(--accent-blue); text-shadow: 0 0 10px var(--accent-blue); text-transform: uppercase; margin-top: 0;}
.neon-red { color: var(--accent-red) !important; text-shadow: 0 0 10px var(--accent-red) !important; }
.neon-green { color: #00ff00 !important; text-shadow: 0 0 10px #00ff00 !important; }
.neon-gold { color: #ffaa00 !important; text-shadow: 0 0 10px #ffaa00 !important; }
.neon-purple { color: var(--accent-purple) !important; text-shadow: 0 0 15px var(--accent-purple) !important; }

button.action-btn { padding: 10px 15px; font-size: 12px; font-weight: bold; text-transform: uppercase; background: transparent; color: var(--accent-red); border: 1px solid var(--accent-red); border-radius: 4px; text-shadow: 0 0 5px var(--accent-red); box-shadow: inset 0 0 10px rgba(255,26,85,0.1);}
button.action-btn:hover { background: var(--accent-red); color: #000; box-shadow: 0 0 20px var(--accent-red); text-shadow: none; }

/* === MODAIS DE SISTEMA E TOAST NEON === */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center; z-index: 5000; }
.modal-content { background: #050505; border: 2px solid var(--accent-blue); padding: 30px; border-radius: 12px; width: 90%; max-width: 400px; box-shadow: 0 0 40px rgba(0, 229, 255, 0.2), inset 0 0 20px rgba(0, 229, 255, 0.1); text-align: center; position: relative; overflow: hidden; }
.modal-content::before { content: ''; position:absolute; top:0; left:0; width:100%; height:4px; background:var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }

#loadingTerminal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:#000; z-index:9000; flex-direction:column; justify-content:center; align-items:center; color:#0f0; font-family:'Courier New', Courier, monospace; text-align:left; font-size:14px; text-shadow: 0 0 5px #0f0; }

/* AVISOS NEON NA TELA */
#neonToast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #000; border: 2px solid var(--accent-red); color: var(--accent-red); padding: 15px 30px; border-radius: 8px; font-weight: bold; font-size: 16px; box-shadow: 0 0 30px var(--accent-red), inset 0 0 15px rgba(255,26,85,0.4); z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.3s, top 0.3s; text-align: center; text-transform: uppercase; }
#neonToast.show { opacity: 1; top: 50px; }

/* === DESKTOP BASE === */
#base-desktop { width: 100%; height: 100vh; background: #000; position: absolute; top:0; left:0; z-index: 1;}

/* GAVETA DE AGENTES (DIREITA) */
.sidebar { width: 260px; background-color: rgba(5,5,8,0.95); border-left: 1px solid var(--accent-blue); padding: 15px; display: flex; flex-direction: column; transition: transform 0.3s ease; position: fixed; right: 0; top: 0; height: 100vh; z-index: 4500; backdrop-filter: blur(5px);}
.sidebar.minimized { transform: translateX(100%); }
.btn-toggle-sidebar { position: absolute; left: -40px; top: 20px; background: rgba(5,5,8,0.95); border: 1px solid var(--accent-blue); border-right: none; color: var(--accent-blue); width: 40px; height: 50px; display: flex; justify-content: center; align-items: center; cursor: pointer; font-weight: bold; font-size: 18px; border-radius: 8px 0 0 8px; }
.user-list { flex: 1; overflow-y: auto; margin-bottom: 20px; margin-top: 10px;}
.user-item { background-color: rgba(0,0,0,0.5); padding: 10px; margin-bottom: 8px; border-left: 3px solid #555; font-size: 13px; border-radius: 4px;}
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.status-dot.online { background-color: #00ff00; box-shadow: 0 0 8px #00ff00; }
.hp-display { font-weight: bold; color: var(--accent-red); font-size: 12px; margin-top: 5px; text-shadow: 0 0 5px var(--accent-red);}

/* BOTÕES FLUTUANTES GLOBAIS (ESQUERDA INFERIOR) */
.floating-controls { position: fixed; bottom: 20px; left: 20px; display: flex; flex-direction: column-reverse; gap: 15px; z-index: 4500; }
.btn-floating { width: 55px; height: 55px; background: rgba(0,0,0,0.85); border: 2px solid var(--accent-blue); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 26px; cursor: pointer; box-shadow: 0 0 20px rgba(0,229,255,0.5); transition: transform 0.2s;}
.btn-floating:hover { transform: scale(1.1); background: var(--accent-blue); color:#000; text-shadow: none; }
#btnHomeApp { border-color: var(--accent-red); color: var(--accent-red); box-shadow: 0 0 15px rgba(255,26,85,0.5); display: none; font-weight: bold;}
#btnHomeApp:hover { background: var(--accent-red); color: #000; }

/* === SISTEMA OPERACIONAL (SMARTPHONE UI) === */
#phoneOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.8); z-index: 4000; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px);}

.phone-frame { 
    position: relative;
    width: 100%; 
    max-width: 400px; 
    aspect-ratio: 9 / 18.5;
    max-height: 90vh; 
    background-image: url('bg.png'); 
    background-size: 100% 100%; 
    border-radius: 35px; 
    box-shadow: 0 0 60px rgba(0,229,255,0.2), inset 0 0 20px rgba(0,0,0,0.8); 
}

@media(max-width: 500px) { 
    .phone-frame { border-radius: 0; max-width: none; max-height: none; height: 100vh; aspect-ratio: auto; background-size: cover; background-position: center;} 
}

/* THE HITBOX GRID FOR BG.PNG APPS - Totalmente Invisíveis */
.phone-apps-grid { 
    position: absolute; 
    top: 15%; bottom: 10%; left: 0%; right: 8%; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: repeat(4, 1fr); 
    gap: 45px; 
}

.app-hitbox { background: transparent; border: none; cursor: pointer; border-radius: 20px; transition: 0.1s; position: relative;}
.app-hitbox:active { background: rgba(255,255,255,0.2); transform: scale(0.95); }

.close-phone-btn { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0,0,0,0.8); border: 1px solid var(--accent-red); width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; font-weight: bold; box-shadow: 0 0 15px var(--accent-red);}

/* === ESTRUTURA DOS APPLICATIVOS (FULLSCREEN) === */
#gameContainer { display: none; width: 100%; height: 100vh; position: absolute; top:0; left:0; background: #07070a; overflow-y: auto; z-index: 1000; padding: 20px; padding-bottom: 90px;}

/* AQUI FICA A MAGIA DA CORREÇÃO DE VAZAMENTO DE TELA E TABULEIRO */
.tab-content { display: none !important; width: 100%; max-width: 1200px; margin: 0 auto; flex-direction: column; animation: fadeIn 0.3s; }
.tab-content.active { display: flex !important; }
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

/* HUD DO TOPO (MY GAMBLE / GERAL) */
.profile-header-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; background: #0a0a0f; padding: 15px; border: 1px dashed var(--accent-blue); border-radius: 8px; margin-bottom: 15px;}
.profile-stat-box { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000; border: 1px solid #333; padding: 10px; border-radius: 4px; text-align: center;}

.attr-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #ccc; border-bottom: 1px dashed #222; padding: 10px 0;}
.val-display { color: var(--accent-blue); font-weight: bold; width: 25px; text-align: center; font-size: 16px;}
.btn-attr { background: #000; border: 1px solid var(--accent-blue); color: var(--accent-blue); width: 28px; height: 28px; display: flex; justify-content: center; align-items: center; border-radius: 4px; font-weight: bold; font-size: 14px;}
.btn-attr:hover { background: var(--accent-blue); color: #000; box-shadow: 0 0 10px var(--accent-blue); }

.dice-quick-btn { background: #000; border: 1px dashed var(--accent-blue); color: var(--accent-blue); padding: 8px; font-size: 12px; cursor: pointer; border-radius: 4px; flex: 1; text-align: center; font-weight: bold;}
.dice-quick-btn:hover { background: var(--accent-blue); color: #000; box-shadow: 0 0 10px var(--accent-blue); }

.integrity-bar-bg { width: 100%; background: #222; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 5px; border: 1px solid #0f0;}
.integrity-bar-fill { height: 100%; background: #00ff00; width: 0%; transition: width 0.5s linear; box-shadow: 0 0 10px #00ff00;}

/* --- MAPA E VTT ORTOGONAL --- */
.map-container-main { display: flex; flex-direction: column; gap: 15px; width: 100%; min-height: 80vh;}
@media(min-width: 900px) { .map-container-main { flex-direction: row; align-items: stretch;} }

.rpg-hud-map { width: 100%; background: rgba(5, 5, 10, 0.95); border: 1px solid var(--accent-blue); padding: 15px; border-radius: 8px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 0 20px rgba(0,229,255,0.1); flex-shrink: 0;}
@media(min-width: 900px) { .rpg-hud-map { width: 300px; max-height: 80vh; overflow-y: auto;} }

.map-visual-area { flex: 1; position: relative; overflow: hidden; border: 2px solid var(--accent-blue); border-radius: 8px; box-shadow: inset 0 0 50px rgba(0,229,255,0.2); min-height: 60vh;}

.map-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; background-image: url('mapa1.png'); background-size: cover; background-position: center; transition: 0.5s; cursor: pointer;}
.map-overlay-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background: rgba(0, 0, 10, 0.7); background-image: linear-gradient(rgba(0, 229, 255, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, 0.15) 1px, transparent 1px); background-size: 40px 40px; z-index: 1; }

.svg-lines-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; display: block; }
.map-node { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-blue); background: #000; transform: translate(-50%, -50%); cursor: pointer; box-shadow: 0 0 10px var(--accent-blue), inset 0 0 10px var(--accent-blue); z-index: 10; display: flex; justify-content: center; align-items: center; transition: 0.2s;}
.map-node::after { content: ''; width: 10px; height: 10px; background: var(--accent-blue); border-radius: 50%; }
.map-node.danger { border-color: var(--accent-red); box-shadow: 0 0 20px var(--accent-red), inset 0 0 10px var(--accent-red); animation: pulseDanger 1s infinite;}

.node-label { position: absolute; top: 35px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: bold; color: #fff; background: rgba(0,0,0,0.8); padding: 3px 8px; border-radius: 4px; white-space: nowrap; border: 1px solid #333; pointer-events: none;}

.avatar-on-map { position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #00ff00; object-fit: cover; z-index: 20; box-shadow: 0 0 15px #00ff00; transition: top 0.4s ease-out, left 0.4s ease-out; background:#111; pointer-events: none; }
.avatar-offline { filter: grayscale(100%); border-color: #555; opacity: 0.6; box-shadow: none;}
.token-hp { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: #000; color: var(--accent-red); border: 1px solid var(--accent-red); font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 4px; z-index: 25; text-shadow: 0 0 5px var(--accent-red); pointer-events: none; }

@keyframes pulseDanger { 0% { box-shadow: 0 0 5px #f00; } 50% { box-shadow: 0 0 20px #f00; } 100% { box-shadow: 0 0 5px #f00; } }

/* VTT INTERIOR E TÁTICAS (ALCANCE / SLIDE) */
.submap-canvas { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #050505; z-index: 100; flex-direction: column; padding: 15px; background-size: cover; background-position: center;}

.tactical-board { flex: 1; position: relative; background: rgba(0,0,0,0.7); border-top: 2px solid var(--accent-blue); overflow: hidden;}
.grid-cells-container { display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(12, 1fr); width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 2; }
.tokens-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.tactical-cell { border: 1px solid rgba(0, 229, 255, 0.15); transition: background-color 0.2s; position: relative;}
.tactical-cell:hover { background: rgba(0,229,255,0.3); }

.tactical-cell.in-range { background: rgba(0, 255, 100, 0.25); box-shadow: inset 0 0 15px rgba(0, 255, 100, 0.6); cursor: pointer; border: 1px dashed #0f0; z-index: 3;}
.tactical-cell.in-range-blocked { background: rgba(255, 26, 85, 0.25); box-shadow: inset 0 0 15px rgba(255, 26, 85, 0.6); cursor: not-allowed; border: 1px dashed #f00; z-index: 3;}

/* MIRA VERMELHA QUANDO O JOGADOR VAI ATACAR */
.tactical-cell.in-range-combat { background: rgba(255, 170, 0, 0.25); box-shadow: inset 0 0 15px rgba(255, 170, 0, 0.6); cursor: crosshair; border: 1px dashed #ffaa00; z-index: 3;}
.tactical-cell.target-hover { background: rgba(255, 26, 85, 0.4) !important; box-shadow: inset 0 0 20px rgba(255, 26, 85, 0.8) !important; border: 1px solid #ff1a55 !important; cursor: crosshair; z-index: 4;}

.cell-obstacle { background: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 26, 85, 0.3) 5px, rgba(255, 26, 85, 0.3) 10px); border: 1px solid rgba(255, 26, 85, 0.5); cursor: not-allowed;}
.cell-obstacle-gaia { border-color: #00ff00 !important; cursor: crosshair !important; box-shadow: inset 0 0 10px rgba(0,255,0,0.2);}

.tactical-token { position: absolute; width: 6.25%; height: 8.33%; background-size: cover; border-radius: 50%; border: 2px solid #00ff00; box-shadow: 0 0 15px #00ff00; transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1), top 0.4s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none;}

/* BARRINHA DE VIDA FLUTUANTE DOS TOKENS VTT */
.token-hp-bar-container { position: absolute; top: -14px; left: -10%; width: 120%; height: 6px; background: #000; border: 1px solid #333; border-radius: 3px; overflow: hidden; box-shadow: 0 0 5px rgba(0,0,0,0.8); z-index: 30;}
.token-hp-bar-trail { position: absolute; top: 0; left: 0; height: 100%; background: #ffaa00; width: 100%; transition: width 0.8s ease-out; }
.token-hp-bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: #ff1a55; width: 100%; transition: width 0.2s ease-out; }

.room-overlay { position: absolute; border: 2px solid var(--accent-blue); background: rgba(0,229,255,0.05); display: flex; align-items: flex-start; justify-content: center; padding-top: 5px; color: #fff; font-size: 14px; font-weight: bold; text-shadow: 0 0 8px var(--accent-blue); pointer-events: none; z-index: 1;}

.turn-order-bar { display:flex; gap:10px; overflow-x:auto; background:rgba(0,0,0,0.8); padding:5px; border:1px solid var(--accent-red); align-items:center; border-radius: 4px; max-width: 100%;}
.turn-avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #555; opacity: 0.5; transition: 0.3s; flex-shrink: 0;}
.turn-avatar.active { border-color: #00ff00; opacity: 1; box-shadow: 0 0 15px #00ff00; transform: scale(1.1); }

.food-action-bar { display: flex; gap: 10px; z-index: 200; flex-wrap:wrap; padding: 10px; background: rgba(0,0,0,0.8); border-bottom: 1px solid var(--accent-blue);}
.btn-eat { background: rgba(0,255,100,0.2); border: 1px solid #00ff00; color: #00ff00; padding: 10px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; text-shadow: 0 0 5px #00ff00; backdrop-filter: blur(5px);}

.eating-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.95); z-index:9000; display:none; flex-direction:column; justify-content:center; align-items:center; pointer-events: all; }
.eating-text { color: #00ff00; font-size: 28px; font-weight: bold; text-shadow: 0 0 20px #00ff00; margin-bottom: 20px; animation: pulseDanger 1s infinite; }
.eating-bar-bg { width: 300px; height: 25px; border: 2px solid #00ff00; border-radius: 12px; padding: 3px; background: #111; }
.eating-bar-fill { height: 100%; background: #00ff00; width: 0%; box-shadow: 0 0 20px #00ff00; border-radius: 8px; }

/* DADOS OVERLAY (SKIP CLICÁVEL) */
.dice-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.92); z-index: 8000; display: none; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.dice-box-panel { background: rgba(5,5,10,0.95); border: 2px solid var(--accent-blue); border-radius: 15px; padding: 40px; box-shadow: 0 0 60px rgba(0,229,255,0.5); text-align: center; width: 90%; max-width: 400px; pointer-events: none;}
.dice-spinners { display: flex; gap: 15px; margin: 25px 0; font-size: 36px; font-weight: bold; color: var(--accent-red); text-shadow: 0 0 20px var(--accent-red); font-family: monospace; flex-wrap: wrap; justify-content: center;}
.dice-number { background: #111; border: 2px solid var(--accent-red); border-radius: 10px; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 20px rgba(255,26,85,0.4);}
.dice-result-box { display: inline-block; background: #000; border: 2px solid #00ff00; color: #00ff00; padding: 15px 25px; border-radius: 10px; margin: 5px; font-weight: bold; font-size: 28px; box-shadow: 0 0 15px rgba(0,255,0,0.5), inset 0 0 10px rgba(0,255,0,0.3);}

/* --- AJUSTE DOS DADOS NO HISTÓRICO (MESA DE DADOS) --- */
#diceLog .dice-result-box {
    padding: 2px 8px;          
    font-size: 12px;           
    margin: 2px;               
    border-width: 1px;         
    border-radius: 4px;        
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.4); 
    display: inline-block;
    vertical-align: middle;
}
#diceLog div { line-height: 1.8; }

/* === ANIMAÇÃO CLASH DADOS DE COMBATE === */
.clash-dice-box { width: 90px; height: 90px; display:flex; justify-content:center; align-items:center; font-size: 40px; font-weight: 900; border-radius: 15px; background: #111; color: #fff; position: relative; z-index: 5; }
.atk-dice { border: 3px solid var(--accent-red); box-shadow: inset 0 0 20px rgba(255,26,85,0.5), 0 0 20px rgba(255,26,85,0.5); }
.def-dice { border: 3px solid var(--accent-blue); box-shadow: inset 0 0 20px rgba(0,229,255,0.5), 0 0 20px rgba(0,229,255,0.5); }

@keyframes clashSmashWinner {
    0% { transform: scale(1); }
    40% { transform: scale(1.1) translate(0, -10px); }
    100% { transform: scale(1.5) translate(0, 0); z-index:20; filter: brightness(1.2); }
}
@keyframes clashSmashLoser {
    0% { transform: scale(1); filter: brightness(1); }
    60% { transform: scale(0.8) translate(0, 10px) rotate(-10deg); filter: brightness(0.5) grayscale(100%); }
    100% { transform: scale(0) rotate(45deg); opacity: 0; }
}
.clash-winner { animation: clashSmashWinner 1s cubic-bezier(0.25,1,0.5,1) forwards; }
.clash-loser { animation: clashSmashLoser 1s cubic-bezier(0.25,1,0.5,1) forwards; }


/* === TETRIS (PERSONAGEM / INVENTÁRIO) === */
.tetris-wrapper { display: flex; justify-content: center; margin-top: 15px; overflow-x: auto; padding: 10px; }
.tetris-grid { position: relative; display: grid; gap: 1px; background: #111; border: 2px solid var(--accent-blue); box-shadow: 0 0 20px rgba(0,229,255,0.2); touch-action: none; box-sizing: content-box; min-width: max-content; margin: 0 auto; }
.grid-cell { background: #050505; width: 45px; height: 45px; border: 1px dashed #333; }

.item-tetris { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; color: #fff; text-align: center; border-radius: 4px; cursor: grab; touch-action: none; z-index: 100; transition: transform 0.1s, box-shadow 0.1s; box-shadow: inset 0 0 10px rgba(255,255,255,0.2), 0 0 5px rgba(0,0,0,0.8); flex-direction: column; overflow: visible; margin: 0; box-sizing: border-box;}
.item-tetris span { pointer-events: none; } 
.item-tetris.dragging { z-index: 999; opacity: 0.9; cursor: grabbing; box-shadow: 0 15px 30px rgba(0,0,0,0.9); transform: scale(1.05); }

.btn-excluir-item { position:absolute; top:-8px; right:-8px; font-size:12px; width:22px; height:22px; background:#000; color:var(--accent-gold); border:1px solid var(--accent-gold); border-radius:50%; cursor:pointer; display:flex; justify-content:center; align-items:center; z-index:10; box-shadow:0 0 8px var(--accent-gold); text-shadow:0 0 5px var(--accent-gold); padding:0; }
.btn-excluir-item.discard { color:var(--accent-red); border-color:var(--accent-red); box-shadow:0 0 8px var(--accent-red); text-shadow:0 0 5px var(--accent-red); }
/* BOTÃO DE ROTACIONAR ITENS DO INVENTÁRIO */
.btn-rotate-item { 
    position:absolute; top:-8px; left:-8px; font-size:12px; width:22px; height:22px; 
    background:#000; color:var(--accent-blue); border:1px solid var(--accent-blue); 
    border-radius:50%; cursor:pointer; display:flex; justify-content:center; align-items:center; 
    z-index:10; box-shadow:0 0 8px var(--accent-blue); text-shadow:0 0 5px var(--accent-blue); padding:0; 
}
.btn-rotate-item:hover { background: var(--accent-blue); color: #000; }
.item-tetris.Arma { background: rgba(255, 26, 85, 0.8); border: 1px solid var(--accent-red); }
.item-tetris.Roupa { background: rgba(0, 119, 255, 0.8); border: 1px solid var(--rarity-rar); }
.item-tetris.Comida { background: rgba(0, 255, 102, 0.8); border: 1px solid var(--rarity-inc); color: #000;}
.item-tetris.Tecnologia { background: rgba(176, 0, 255, 0.8); border: 1px solid var(--accent-purple); }
.item-tetris.Móvel { background: rgba(255, 170, 0, 0.8); border: 1px solid var(--rarity-leg); color: #000;}
.item-tetris.Acessório { background: rgba(200, 200, 200, 0.8); border: 1px solid #fff; color: #000;}
.item-tetris.Mochila { background: rgba(100, 100, 100, 0.8); border: 1px solid #fff; color: #000;}

.inv-itens-soltos { display: flex; flex-wrap: wrap; gap: 10px; min-height: 80px; padding: 15px; background: #0a0a0f; border: 1px dashed var(--accent-blue); border-radius: 8px; margin-top: 15px;}
.inv-itens-soltos .item-tetris { position: relative !important; left: auto !important; top: auto !important;}

/* PANTEÃO ROLETA GACHA E LISTA */
.gacha-container { display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 20px; margin-bottom: 20px; }
.gacha-display { width: 100%; max-width:600px; min-height: 220px; display: flex; gap:20px; align-items: center; justify-content: center; background:#050505; border: 2px dashed var(--accent-purple); padding:20px; border-radius:12px; box-shadow: inset 0 0 30px rgba(176,0,255,0.1); flex-wrap: wrap;}

.god-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; width: 100%; max-width: 900px; margin: 0 auto; }
.card { background: #1a0033; border: 2px solid var(--accent-purple); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(176,0,255,0.4); text-align: center; padding: 15px; transition: 0.2s;}
.card.spinning { animation: slotMachine 0.1s infinite; border-color: #fff; box-shadow: 0 0 30px #fff;}
.card.selected { border-color: #0f0; box-shadow: 0 0 30px #0f0;}
@keyframes slotMachine { 0% { transform: translateY(-2px); } 50% { transform: translateY(2px); } 100% { transform: translateY(-2px); } }

/* === IGAMBLE CHAT PREMIUM === */
#tab-igamble {
    height: calc(100vh - 50px);
    overflow: hidden;
    display: none; 
}

#tab-igamble.active {
    display: flex !important; 
    flex-direction: column;
}

.igamble-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.igamble-nav {
    display: none !important; 
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #000;
    border-bottom: 1px solid var(--accent-blue);
    flex-shrink: 0;
}

.igamble-tab-btn {
    background: #111;
    color: #aaa;
    border: 1px solid #333;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
}

.igamble-tab-btn.active {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

.igamble-tab-btn:hover:not(.active) { background: #222; color: #fff; }

/* --- VIEWS INTERNAS (Esconde/Mostra) --- */
.igamble-view { display: none !important; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.igamble-view.active { display: flex !important; }

@media(min-width: 768px) { .igamble-wrapper { flex-direction: row; } }

/* PAINEL LATERAL (Galeria e Títulos) */
.igamble-side { display: flex; flex-direction: column; gap: 15px; overflow-y: auto; max-height: 250px; flex-shrink: 0; }
@media(min-width: 768px) { .igamble-side { flex: 1; min-width: 250px; max-width: 320px; max-height: 100%; height: 100%; } }

/* CHAT PRINCIPAL */
.igamble-chat { flex: 2; display: flex; flex-direction: column; background: #050508; border: 1px solid var(--accent-blue); border-radius: 8px; box-shadow: 0 0 20px rgba(0,229,255,0.1); height: 100%; overflow: hidden; min-height: 0; }
.avatar-maker-panel { background: #0a0a0f; border: 1px dashed var(--accent-blue); border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;}
.avatar-grid-select { display: grid; grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)); gap: 8px; max-height: 200px; overflow-y: auto; background: #000; padding: 10px; border: 1px solid #333; border-radius: 4px; }
.av-thumb { width: 45px !important; height: 45px !important; max-width: 45px !important; max-height: 45px !important; flex-shrink: 0; cursor: pointer; border-radius: 50%; border: 2px solid transparent; transition: 0.2s; background: #111; object-fit: cover; }
.av-thumb:hover { transform: scale(1.1); }
.av-thumb.selected { border-color: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }

.chat-messages { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.chat-input-area { display: flex; padding: 10px; background: #000; border-top: 1px solid var(--accent-blue); align-items: center; gap: 10px; flex-shrink: 0; }
.chat-input-area input { flex: 1; border: none !important; box-shadow: none !important; padding: 12px; font-size: 14px; background: #111 !important; }
.neon-icon-btn { background: transparent !important; color: var(--accent-blue) !important; border: none !important; font-size: 24px; text-shadow: 0 0 10px var(--accent-blue); padding: 0 5px; width: auto; }
.neon-icon-btn:hover { color: #fff !important; text-shadow: 0 0 15px #fff; }

.msg-box { display: flex; gap: 15px; align-items: flex-start; width: 100%; }
.msg-avatar-container { display: flex; flex-direction: column; align-items: center; min-width: 50px; max-width: 50px; flex-shrink: 0; gap: 5px; }
.msg-avatar { width: 45px !important; height: 45px !important; max-width: 45px !important; max-height: 45px !important; flex-shrink: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--accent-blue); box-shadow: 0 0 10px rgba(0,229,255,0.5); background:#111; object-fit:cover; }
.msg-content { background: #111; padding: 12px; border-radius: 8px; max-width: 80%; border: 1px solid #333; position: relative; min-width: 0; word-wrap: break-word; overflow-wrap: break-word; }
.msg-image { max-width: 100%; max-height: 200px; width: auto; border-radius: 8px; margin-top: 8px; object-fit: contain; border: 1px solid var(--accent-blue); background: #000; display: block; }

.title-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-right: 5px; font-weight: bold; text-transform: uppercase; border: 1px solid currentColor; }
.title-tag.com { color: var(--rarity-com); }
.title-tag.inc { color: var(--rarity-inc); text-shadow: 0 0 5px var(--rarity-inc); }
.title-tag.rar { color: var(--rarity-rar); text-shadow: 0 0 5px var(--rarity-rar); }
.title-tag.epi { color: var(--rarity-epi); text-shadow: 0 0 8px var(--rarity-epi); }
.title-tag.leg { color: var(--rarity-leg); text-shadow: 0 0 10px var(--rarity-leg); }

/* =========================================================
   POSTS DA REDE SOCIAL (INSTA/TIKTOK UI)
   ========================================================= */
.post-creator-box { background: #0a0a0f; padding: 15px; border: 1px solid #222; border-radius: 8px; }
.gamble-input { background: #000; border: 1px solid #333; color: #fff; padding: 8px; border-radius: 4px; font-family: monospace; font-size: 12px; width: 100%; outline:none; }
.gamble-input:focus { border-color: var(--accent-blue); }

#igamble-view-posts { flex: 1; min-height: 0; padding: 0; display: none; flex-direction: column; background: #000; }
#igamble-view-posts.active { display: flex !important; }

#igamble-view-posts .feed-container {
    flex: 1 !important; height: 100% !important; max-height: 100% !important; overflow-y: scroll !important;
    scroll-snap-type: y mandatory !important; scroll-behavior: smooth !important; -webkit-overflow-scrolling: touch !important;
    -ms-overflow-style: none; scrollbar-width: none; box-sizing: border-box !important;
}
#igamble-view-posts .feed-container::-webkit-scrollbar { display: none !important; }

#igamble-view-posts .post-card {
    height: 100% !important; width: 100% !important; flex: 0 0 100% !important; position: relative !important;
    scroll-snap-align: start !important; scroll-snap-stop: always !important; border-bottom: 2px solid #111 !important;
    overflow: hidden !important; box-sizing: border-box !important; min-height: 0 !important; 
}

#igamble-view-posts .post-media{ position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: contain !important; z-index: 2 !important; }
#igamble-view-posts .post-media-bg{ position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover !important; opacity: 0.30 !important; filter: blur(20px) !important; transform: scale(1.10) !important; z-index: 1 !important; }
#igamble-view-posts .post-overlay{ position: absolute !important; inset: 0 !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; padding: 15px !important; pointer-events: none; z-index: 10 !important; }
#igamble-view-posts .post-header { display: flex !important; justify-content: space-between !important; align-items: center !important; pointer-events: auto !important; gap: 10px !important; }
.post-header-left { display:flex; align-items:center; gap:10px; }
.post-avatar { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--accent-blue); background:#111; object-fit: cover; }
.post-name { font-weight: bold; color: #fff; font-size: 14px; text-shadow: 0 2px 5px #000; }
.post-ad-tag { background: var(--accent-gold); color: #000; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 4px; margin-left: 8px; text-shadow: none; border: 1px solid #fff; }

#igamble-view-posts .post-caption{
  position: absolute !important; left: 18px !important; bottom: 14px !important; right: calc(50% + (var(--imgW) / 2) + var(--gap)) !important;
  background: transparent !important; border: none !important; padding: 0 !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-word !important;
  line-height: 1.35 !important; font-size: 13px !important; max-height: 160px !important; overflow: hidden !important; text-shadow: 0 2px 10px #000 !important; pointer-events: none !important;
}

#igamble-view-posts .post-sidebar { position: absolute !important; bottom: 25px !important; right: 15px !important; left: auto !important; display: flex !important; flex-direction: column !important; gap: 15px !important; pointer-events: auto !important; z-index: 20 !important; }
#igamble-view-posts .post-btn-vert { width: 44px !important; height: 44px !important; border-radius: 50% !important; background: rgba(0, 0, 0, 0.6) !important; border: 1px solid rgba(255,255,255,0.2) !important; color: #fff !important; }
.post-btn-vert:hover { transform: scale(1.06); border-color: var(--accent-blue); }
.post-btn-vert span { font-size: 11px !important; font-weight: 900 !important; line-height: 1 !important; color: #fff !important; text-shadow: 0 0 5px #000 !important; }
.post-btn-vert.liked { color: var(--accent-red); text-shadow: 0 0 15px var(--accent-red); border-color: rgba(255, 26, 85, 0.45); }
.post-btn-vert.reposted { color: #00ff00; text-shadow: 0 0 15px #00ff00; border-color: rgba(0,255,0,0.35); }

.post-del-btn{ background: rgba(255,0,0,0.18); border: 1px solid #ff1a55; color: #ff1a55; font-size: 10px; padding: 6px 10px; border-radius: 8px; cursor: pointer; text-transform: uppercase; }
.post-del-btn:hover{ background: #ff1a55; color: #000; }

@media(max-width: 500px){
  #igamble-view-posts .feed-container{ height: calc(100vh - 190px) !important; }
  #igamble-view-posts .post-card{ height: calc(100vh - 190px) !important; min-height: 520px; --imgW: 300px; --gap: 12px;}
  #igamble-view-posts .post-caption{ left: 12px !important; bottom: 10px !important; max-height: 130px !important; font-size: 12px !important; }
  #igamble-view-posts .post-sidebar{ bottom: 12px !important; }
}

/* === CARD DE EMBATES (ARENA) === */
.embate-card { background: linear-gradient(135deg, #110000 0%, #000011 100%); border: 1px solid #333; border-radius: 8px; padding: 15px; text-align: center; position: relative; overflow: hidden; box-shadow: 0 0 20px rgba(255,0,0,0.1); }
.embate-desc { font-size: 12px; color: #aaa; margin-bottom: 15px; font-style: italic; }
.embate-vs-container { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.embate-fighter { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.embate-fighter-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 15px rgba(255,255,255,0.2); background:#000; }
.embate-fighter-name { font-weight: bold; color: #fff; font-size: 14px; text-transform: uppercase; }
.embate-vs-text { font-size: 30px; font-weight: 900; font-style: italic; color: #f00; text-shadow: 0 0 10px #f00; margin: 0 10px; }
.embate-premio { margin-top: 15px; border-top: 1px dashed #333; padding-top: 10px; color: var(--accent-gold); font-weight: bold; }


/* =========================================================
   MERCADO NEGRO (CORREÇÃO DE VISIBILIDADE E CAROUSEL COM SETAS)
   ========================================================= */

/* =========================================================
   MERCADO NEGRO (CORREÇÃO DE VISIBILIDADE E CAROUSEL COM SETAS)
   ========================================================= */

#tab-loja { width: 100%; max-width: 1200px; margin: 0 auto; height: calc(100vh - 120px); overflow-y: auto !important; padding: 10px; }
#tab-loja.active { display: flex; flex-direction: column; gap: 15px; }
#tab-loja > h1 { margin: 0; text-align: center; font-size: 30px; color: var(--accent-blue); text-shadow: 0 0 15px rgba(0, 229, 255, 0.5); }

#masterShopPanel { width: 100%; padding: 15px; border-radius: 12px; background: rgba(10, 10, 15, 0.9); border: 1px solid rgba(255, 26, 85, 0.5); box-shadow: 0 0 20px rgba(255, 26, 85, 0.2); }
.shop-tabs { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(0, 229, 255, 0.2); flex-shrink: 0; }
.shop-tab-btn { background: rgba(0, 0, 0, 0.8); border: 1px solid rgba(255, 255, 255, 0.2); color: #ccc; padding: 8px 15px; border-radius: 8px; font-weight: bold; text-transform: uppercase; transition: 0.2s; }
.shop-tab-btn:hover { border-color: rgba(0, 229, 255, 0.6); color: #fff; box-shadow: 0 0 15px rgba(0, 229, 255, 0.3); }
.shop-tab-btn.active { background: rgba(0, 229, 255, 0.2); border-color: var(--accent-blue); color: var(--accent-blue); box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); }

.shop-carousel-wrapper { display: flex; align-items: center; gap: 10px; width: 100%; flex: 1; min-height: 350px; position: relative; }
#shopGrid { display: flex; gap: 15px; overflow-x: auto; overflow-y: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; width: 100%; height: 100%; padding-bottom: 15px; scrollbar-width: thin; align-items: stretch; }

.shop-nav-btn { background: rgba(0, 0, 0, 0.7); color: var(--accent-blue); border: 1px solid var(--accent-blue); border-radius: 50%; width: 40px; height: 40px; font-size: 20px; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 10; box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); transition: 0.2s; flex-shrink: 0; }
.shop-nav-btn:hover { background: var(--accent-blue); color: #000; box-shadow: 0 0 20px var(--accent-blue); }

.shop-item { position: relative; flex: 0 0 calc(25% - 12px); scroll-snap-align: start; border-radius: 12px; background: radial-gradient(circle at top left, rgba(0, 229, 255, 0.1), rgba(0, 0, 0, 0.95)); border: 1px solid rgba(0, 229, 255, 0.2); box-shadow: 0 0 20px rgba(0, 229, 255, 0.1); padding: 15px; display: flex; flex-direction: column; justify-content: space-between; height: max-content; min-height: 280px; }
.shop-item.master-edit { border: 1px dashed rgba(0, 229, 255, 0.3); }

.shop-item-content { flex: 1; margin-bottom: 10px;}
.shop-item-content h3 { margin: 5px 0; font-size: 16px;}
.shop-item-content p { margin: 0; font-size: 12px; color: #bbb; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.shop-item-footer h2 { margin: 0 0 10px 0; font-size: 20px; }
.shop-item-footer .action-btn { width: 100%; border-radius: 8px;}

.shop-promo-tag { position: absolute; top: 10px; right: 10px; background: var(--accent-red); color: #fff; font-size: 10px; font-weight: 900; padding: 4px 8px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 0 10px rgba(255, 26, 85, 0.5); letter-spacing: 1px; z-index: 5; pointer-events: none; }

@media (max-width: 1100px) { .shop-item { flex: 0 0 calc(33.33% - 10px); } }
@media (max-width: 820px) { .shop-item { flex: 0 0 calc(50% - 8px); } }
@media (max-width: 520px) { .shop-item { flex: 0 0 100%; } .shop-nav-btn { width: 35px; height: 35px; font-size: 16px; } }

/* =========================================================
   PATCH: REAÇÕES DO CHAT ALINHADAS
   ========================================================= */
.react-add { background: transparent; border: 1px dashed var(--accent-blue); color: var(--accent-blue); border-radius: 12px; padding: 3px 8px; font-size: 11px; cursor: pointer; transition: 0.2s; font-family: inherit; font-weight: bold; }
.react-add:hover { background: var(--accent-blue); color: #000; box-shadow: 0 0 10px var(--accent-blue); }
.react-btn { background: rgba(0,0,0,0.5); border: 1px solid #333; color: #fff; border-radius: 12px; padding: 3px 8px; font-size: 11px; display: flex; align-items: center; gap: 4px; font-family: inherit; }

/* =========================================================
   SISTEMA DE MENÇÕES (@) E COMENTÁRIOS INSTAGRAM
   ========================================================= */
.mention-dropdown { position: fixed !important; z-index: 999999 !important; background: #111; border: 1px solid var(--accent-blue, #00f0ff); border-radius: 8px; box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); max-height: 200px; overflow-y: auto; width: 250px; }
.mention-item { display: flex; align-items: center; gap: 10px; padding: 10px; cursor: pointer; border-bottom: 1px solid #333; transition: background 0.2s; }
.mention-item:hover { background: #222; }

.comments-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 6000; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.comments-panel { width: 100%; max-width: 500px; height: 75vh; background: #050508; border-top-left-radius: 20px; border-top-right-radius: 20px; border: 1px solid var(--accent-blue); border-bottom: none; display: flex; flex-direction: column; animation: slideUp 0.3s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 -10px 40px rgba(0,0,0,0.8); position: relative;}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.comments-header { display: flex; justify-content: center; align-items: center; padding: 15px; border-bottom: 1px solid #222; position: relative; }
.drag-handle { width: 40px; height: 5px; background: #444; border-radius: 5px; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); cursor: grab; }
.drag-handle:active { cursor: grabbing; background: var(--accent-blue); }
.comments-header h3 { margin: 0; font-size: 14px; color: #fff; text-transform: uppercase; margin-top: 5px; }
.close-comments-btn { position: absolute; right: 15px; top: 15px; background: transparent; border: none; color: #aaa; font-size: 18px; cursor: pointer; }
.close-comments-btn:hover { color: var(--accent-red); }

.comments-list { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 15px; }
.comment-item { display: flex; gap: 10px; }
.comment-avatar { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 1px solid #333; }
.comment-content { flex: 1; background: #111; padding: 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; color: #ddd; word-break: break-word; }
.comment-name { font-weight: bold; color: #fff; margin-bottom: 4px; font-size: 12px; }

.comments-input-area { padding: 15px; background: #000; border-top: 1px solid var(--accent-blue); display: flex; gap: 10px; align-items: center; border-radius: 0;}
.comments-input-area input { flex: 1; border: none !important; background: #111 !important; color: #fff; padding: 12px 15px; border-radius: 20px; font-size: 13px; box-shadow: inset 0 0 10px rgba(0,0,0,0.5) !important; outline: none; }

/* WHATSAPP REPLY */
.reply-preview{ display:flex; align-items:center; gap:10px; background: rgba(0,0,0,0.85); border-top: 1px solid rgba(0,229,255,0.35); border-bottom: 1px solid rgba(0,229,255,0.35); padding: 10px 12px; margin: 0 10px; border-radius: 10px; }
.reply-bar{ width:4px; height:34px; border-radius:10px; background: var(--accent-blue); box-shadow: 0 0 10px rgba(0,229,255,0.5); }
.reply-texts{ flex:1; min-width:0; }
.reply-to-name{ font-size: 12px; font-weight: 900; color: var(--accent-blue); margin-bottom: 2px; text-transform: uppercase; }
.reply-to-text{ font-size: 12px; color:#bbb; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reply-cancel{ background: transparent; border:none; color:#aaa; font-size: 16px; cursor:pointer; }
.reply-cancel:hover{ color: var(--accent-red); }

/* Stack de notificação top-right (máx 3) */
.mention-notify-stack{ position: fixed; top: 14px; right: 14px; z-index: 99999; display:flex; flex-direction:column; gap: 10px; pointer-events:none; }
.mention-notify{ width: 280px; max-width: calc(100vw - 28px); display:flex; gap: 10px; align-items:center; background: rgba(0,0,0,0.88); border: 1px solid rgba(0,229,255,0.5); border-radius: 14px; padding: 10px 12px; box-shadow: 0 0 25px rgba(0,229,255,0.15); transform: translateX(120%); opacity: 0; animation: mentionIn 0.35s cubic-bezier(0.25,1,0.5,1) forwards; }
@keyframes mentionIn{ to { transform: translateX(0); opacity: 1; } }
.mention-notify.out{ animation: mentionOut 0.35s ease forwards; }
@keyframes mentionOut{ to { transform: translateX(120%); opacity: 0; } }
.mention-notify img{ width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(0,229,255,0.6); object-fit: cover; background:#000; }
.mention-notify .mn-texts{ min-width:0; }
.mention-notify .mn-title{ color:#fff; font-weight:900; font-size: 12px; line-height: 1.1; }
.mention-notify .mn-sub{ color:#bbb; font-size: 12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width: 210px; }

/* BADGES DE NOTIFICAÇÃO (BOLINHA VERMELHA) */
.app-hitbox { position: relative; } 
.notification-badge { position: absolute; top: -5px; right: -5px; background: var(--accent-red); color: #fff; font-size: 11px; font-weight: 900; border-radius: 50%; width: 22px; height: 22px; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 10px var(--accent-red); border: 2px solid #000; z-index: 10; pointer-events: none; font-family: Arial, sans-serif; }
#badge-igamble-main { top: 5px; right: 5px; font-size: 16px; padding: 4px 10px; width: auto; height: auto; }

/* =========================================================
   SISTEMA DE FOLLOW (AMIGOS)
   ========================================================= */
.avatar-wrapper { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.follow-badge-btn { position: absolute; bottom: -6px; background: #000; border: 1px solid var(--accent-blue); color: var(--accent-blue); border-radius: 12px; font-size: 10px; padding: 2px 6px; cursor: pointer; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 5px rgba(0, 229, 255, 0.5); transition: 0.2s; z-index: 15; white-space: nowrap; }
.follow-badge-btn:hover { background: var(--accent-blue); color: #000; transform: scale(1.1); }
.follow-badge-btn.following { border-color: #00ff66; color: #00ff66; box-shadow: 0 0 5px rgba(0, 255, 102, 0.5); }
.follow-badge-btn.friends { border-color: var(--accent-purple); color: var(--accent-purple); box-shadow: 0 0 5px rgba(176, 0, 255, 0.5); }

/* =========================================================
   GAMBLE HOUSE E CORTES
   ========================================================= */
#grid-casa { background-color: transparent !important; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; }
#grid-casa .grid-cell { background: rgba(0, 0, 0, 0.4) !important; border: 1px dashed rgba(255, 170, 0, 0.15) !important; }

.contact-add-bar { display:flex; gap:5px; padding:10px; background:#000; border-bottom:1px solid #333; }
.contact-add-bar input { flex:1; font-size:11px; padding:5px; border-radius:4px; border:1px solid var(--accent-blue); background:#111; color:#fff; outline:none; }
.contact-add-bar button { background:var(--accent-blue); color:#000; border:none; border-radius:4px; font-weight:bold; cursor:pointer; padding:0 15px; }

.hidden-vtt-cell { visibility: hidden !important; pointer-events: none !important; border: none !important; background: transparent !important; }

/* EMOJIS POPUP */
.emoji-popup { position: fixed; background: rgba(10, 10, 15, 0.95); border: 1px solid var(--accent-blue); border-radius: 8px; padding: 10px; display: none; flex-wrap: wrap; gap: 10px; width: 200px; box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); z-index: 9999 !important; }
.emoji-popup .emoji-btn { background: #000; border: 1px solid #333; font-size: 20px; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.emoji-popup .emoji-btn:hover { border-color: var(--accent-blue); transform: scale(1.1); }

/* === ANIMAÇÕES DE CÂMERA E DANO (VTT) === */
@keyframes cameraShake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-2px, -3px) rotate(-1deg); }
    20% { transform: translate(-4px, 0px) rotate(1deg); }
    30% { transform: translate(4px, 3px) rotate(0deg); }
    40% { transform: translate(2px, -2px) rotate(1deg); }
    50% { transform: translate(-2px, 3px) rotate(-1deg); }
    60% { transform: translate(-4px, 2px) rotate(0deg); }
    70% { transform: translate(4px, 2px) rotate(-1deg); }
    80% { transform: translate(-2px, -2px) rotate(1deg); }
    90% { transform: translate(2px, 3px) rotate(0deg); }
    100% { transform: translate(2px, -3px) rotate(-1deg); }
}
.shake-camera { animation: cameraShake 0.4s cubic-bezier(.36,.07,.19,.97) both; }

.damage-popup {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #ff1a55;
    font-weight: 900;
    font-size: 26px;
    font-family: monospace;
    text-shadow: 0 0 10px #000, 0 0 5px #ff1a55;
    z-index: 1000;
    pointer-events: none;
    animation: floatUpFade 1.5s ease-out forwards;
}
.damage-popup.miss { color: #aaa; text-shadow: 0 0 10px #000; }
@keyframes floatUpFade {
    0% { opacity: 1; transform: translate(-50%, -10px) scale(1.5); }
    100% { opacity: 0; transform: translate(-50%, -60px) scale(1); }
}

/* === ÍCONES DE STATUS FLUTUANTES NO VTT === */
.token-status-layer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    z-index: 15;
    pointer-events: none;
}
.vtt-status-icon {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
    padding: 2px;
    font-size: 11px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    box-shadow: 0 0 5px #000;
}
.vtt-status-icon small {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: var(--accent-red);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
}

/* === NOVO LAYOUT VTT TÁTICO === */
.vtt-grid-layout {
    display: flex;
    gap: 15px;
    width: 100%;
    height: calc(100vh - 100px); /* Usa a tela toda menos o menu */
}
.vtt-sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 250px;
    flex-shrink: 0;
}
/* Caixa Azul - Faces */
.box-faces {
    background: rgba(5,5,10,0.95);
    border: 2px solid var(--accent-blue);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(0,229,255,0.1);
}
.char-face-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border: 1px dashed var(--accent-blue);
    background: #000;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: 0.1s;
}
/* Caixa Vermelha - Perícias e Log */
.box-history {
    background: rgba(5,5,10,0.95);
    border: 2px solid var(--accent-red);
    border-radius: 8px;
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 20px rgba(255,26,85,0.1);
    overflow-y: auto;
}
.vtt-main-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-width: 0;
    height: 100%;
}
/* A Mágica do Mapa Esticado */
.map-visual-area { 
    flex: 1; /* Empurra o HUD verde pro fundo */
    position: relative; 
    overflow: hidden; 
    border: 2px solid var(--accent-blue); 
    border-radius: 8px; 
    box-shadow: inset 0 0 50px rgba(0,229,255,0.2); 
    /* min-height removido para se adaptar perfeitamente */
}
/* Caixa Verde - HUD Atributos Inferior */
.box-hud-bottom {
    flex-shrink: 0; /* Impede o HUD de ser esmagado */
    background: rgba(5,5,10,0.95);
    border: 2px solid #00ff66;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: inset 0 0 20px rgba(0,255,102,0.1);
    gap: 10px;
}
.hud-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: #000;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #333;
}

/* === CONTROLES DESLIZANTES DO MICROFONE E VOZ === */
.gamble-slider { 
    -webkit-appearance: none; appearance: none; width: 100%; height: 4px; 
    background: #333; outline: none; border-radius: 2px; 
}
.gamble-slider::-webkit-slider-thumb { 
    -webkit-appearance: none; appearance: none; width: 14px; height: 14px; 
    border-radius: 50%; background: var(--accent-blue); cursor: pointer; 
    box-shadow: 0 0 10px var(--accent-blue); 
}
/* === SISTEMA DE POPULARIDADE E ANIMAÇÕES === */
.pop-star {
    font-size: 14px;
    margin-left: 6px;
    cursor: help;
    transition: transform 0.2s;
    display: inline-block;
}
.pop-star:hover {
    transform: scale(1.3);
}

/* O Coração que voa pro alto */
.heart-anim {
    position: fixed;
    font-size: 28px;
    color: #ff1a55;
    pointer-events: none;
    z-index: 999999;
    animation: floatHeart 0.8s ease-out forwards;
    text-shadow: 0 0 15px rgba(255, 26, 85, 0.8);
}
@keyframes floatHeart {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    50% { transform: translateY(-40px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-80px) scale(1); opacity: 0; }
}

/* =========================================================
   CORREÇÃO: FORÇAR CLIQUES NOS PAINÉIS DO MESTRE
========================================================= */
.mestre-panel, 
#mestreVTT, 
#masterShopPanel, 
#masterEmbatePanel, 
[id^="masterMenu_"] {
    position: relative !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
}

.mestre-panel input, 
.mestre-panel select, 
.mestre-panel button,
#mestreVTT input,
#mestreVTT button,
#masterShopPanel input, 
#masterShopPanel select, 
#masterShopPanel button,
#masterEmbatePanel input,
#masterEmbatePanel button,
[id^="masterMenu_"] select,
[id^="masterMenu_"] button {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    position: relative;
    z-index: 100000 !important;
}

/* =========================================================
   ANIMAÇÃO TIKTOK LIKES (CORAÇÕES SUBINDO)
========================================================= */
@keyframes tiktokHeartAnim {
    0% { transform: translateY(0) scale(0.5) translateX(0); opacity: 0; }
    20% { opacity: 1; transform: translateY(-50px) scale(1.2) translateX(-15px); }
    80% { opacity: 1; transform: translateY(-200px) scale(1) translateX(15px); }
    100% { transform: translateY(-300px) scale(0.8) translateX(-20px); opacity: 0; }
}

.tiktok-heart {
    position: fixed;
    bottom: 90px;
    pointer-events: none;
    z-index: 999999;
    animation: tiktokHeartAnim 2.5s ease-out forwards;
    filter: drop-shadow(0 0 5px rgba(255,26,85,0.8));
}

/* =========================================================
   ANIMAÇÃO TIKTOK LIKES (CORAÇÕES, FOGOS E DINHEIRO)
========================================================= */
@keyframes tiktokHeartAnim {
    0% { transform: translateY(0) scale(0.5) translateX(0); opacity: 0; }
    15% { opacity: 1; transform: translateY(-50px) scale(1.2) translateX(-15px); }
    75% { opacity: 1; transform: translateY(-300px) scale(1) translateX(15px); }
    100% { transform: translateY(-450px) scale(0.8) translateX(-20px); opacity: 0; }
}

.tiktok-heart {
    position: fixed;
    bottom: 120px;
    pointer-events: none;
    z-index: 9999999 !important;
    animation: tiktokHeartAnim 2.5s ease-out forwards;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.8));
}

/* =========================================================
   NOVO SISTEMA DE TRABALHOS E ÁRVORE DE HABILIDADES
========================================================= */
.mygamble-view { display: none; flex-direction: column; }
.mygamble-view.active { display: flex; }

/* Cartas de Sub-Trabalhos (Rosa) */
.job-card {
    background: #111;
    border: 2px solid #ff66b2;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 102, 178, 0.2);
}
.job-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 102, 178, 0.6);
}
.job-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid #ff66b2;
}
.job-card h3 {
    margin: 10px 0;
    color: #ff66b2;
    text-shadow: 0 0 10px #ff66b2;
}

/* Árvore de Habilidades (Grid) */
.skill-tree-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 10px;
}
.skill-row {
    display: flex;
    justify-content: center;
    gap: 30px;
}
.skill-node {
    width: 60px;
    height: 60px;
    background: #050505;
    border: 2px solid #555;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
    color: #fff;
    font-weight: bold;
    font-size: 10px;
    text-align: center;
    padding: 2px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}
.skill-node:hover {
    border-color: #aaa;
    transform: scale(1.1);
}

/* Status das Habilidades */
.skill-node.unlocked {
    border-color: #00ff66;
    background: rgba(0, 255, 102, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.5), inset 0 0 10px rgba(0, 255, 102, 0.3);
    color: #00ff66;
}
.skill-node.available {
    border-color: #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
    animation: pulseAvailable 2s infinite;
}
@keyframes pulseAvailable { 0% { box-shadow: 0 0 5px #00e5ff; } 50% { box-shadow: 0 0 20px #00e5ff; } 100% { box-shadow: 0 0 5px #00e5ff; } }

/* Ultimate Skills (Azuizinhas Maiores) */
.skill-node.ultimate {
    width: 80px;
    height: 80px;
    border-color: var(--accent-blue);
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}
.skill-node.ultimate.unlocked {
    border-color: #ffaa00;
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.8), inset 0 0 15px rgba(255, 170, 0, 0.4);
}

/* Tooltip da Habilidade */
.skill-tooltip {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.95);
    border: 1px solid var(--accent-blue);
    padding: 10px;
    width: 220px;
    z-index: 100;
    border-radius: 8px;
    pointer-events: none;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0,0,0,0.9);
}
.skill-node:hover .skill-tooltip {
    display: block;
}
.skill-tooltip-title { font-size: 12px; color: var(--accent-blue); font-weight: 900; border-bottom: 1px dashed #555; padding-bottom: 4px; margin-bottom: 4px; }
.skill-tooltip-desc { font-size: 10px; color: #ddd; line-height: 1.3; }
.skill-tooltip-cost { font-size: 10px; color: var(--accent-gold); font-weight: bold; margin-top: 5px; text-align: right; }

/* =========================================================
   TOOLTIPS E IMAGENS DAS HABILIDADES (TBS)
========================================================= */
.skill-node {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-shadow: 0 0 5px #000, 0 0 5px #000; /* Pra ler o nome se tiver imagem de fundo */
}

.skill-tooltip {
    width: 280px;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.95);
    background: rgba(5,5,10,0.98);
    backdrop-filter: blur(5px);
}

.tbs-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #333;
    font-size: 11px;
}

.tbs-stats-grid span {
    background: #111;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #222;
    color: #ccc;
    font-weight: bold;
}

.tbs-stats-grid span strong {
    color: var(--accent-blue);
}

/* =========================================================
   HUD TÁTICA: TOOLTIP DAS HABILIDADES E MINI-GRID
========================================================= */
.skill-node {
    position: relative; /* Fundamental pro balão saber onde nascer */
}

.skill-tooltip {
    display: none; /* Escondido por padrão */
    position: absolute;
    bottom: 120%; /* Aparece acima do botão */
    left: 50%;
    transform: translateX(-50%);
    width: 340px; /* Largura excelente pra caber tudo */
    background: rgba(10, 10, 15, 0.98);
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    padding: 15px;
    z-index: 9999999 !important; /* Muito alto para ficar por cima de tudo */
    box-shadow: 0 15px 35px rgba(0,0,0,0.95), 0 0 15px rgba(0, 229, 255, 0.3);
    text-align: left;
    pointer-events: none; /* Pra não bugar o clique do mouse */
    flex-direction: column;
    gap: 10px;
}

/* Setinha brilhante embaixo do Tooltip */
.skill-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--accent-blue) transparent transparent transparent;
}

/* A mágica do Hover */
.skill-node:hover .skill-tooltip {
    display: flex; /* Aparece quando passa o mouse! */
    animation: fadeInTooltip 0.2s ease-in-out;
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.tbs-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
}

.tbs-stats-grid span {
    background: #000;
    padding: 5px;
    border: 1px dashed #333;
    border-radius: 4px;
    font-size: 10px;
    color: #ccc;
}
.tbs-stats-grid span strong { color: #fff; }
