/* ============================================================
   STYLE.CSS — REFATORADO
   Consolidado, sem redundâncias, visualmente idêntico ao original
   ============================================================ */

/* --- 1. RESET & VARIÁVEIS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-wood: #5d4037;
    --bg-wood-dark: #3e2723;
    --bg-parchment: #f3e5ab;
    --border-gold: #cba136;
    --border-gold-light: #ffd700;
    --text-dark: #2c1b0e;
    --text-light: #ffecb3;
    --btn-primary: #8d6e63;
    --btn-primary-hover: #a1887f;
    --btn-danger: #c62828;
    --btn-success: #2e7d32;
    --slot-bg: #4e342e;
}

/* --- 2. BODY & CURSORES --- */
body {
    overflow: hidden;
    background: #000;
    font-family: 'MedievalSharp', cursive;
    user-select: none;
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}

/* Cursor padrão (seta) — botões e elementos interativos gerais */
body, button, .rpg-btn,
.close-btn, .cart-remove-btn, .delete-char-btn,
.rpg-icon-btn, .hotkey-slot, .char-slot, .class-btn,
#char-selection-screen {
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}

/* Cursor pick (mãozinha) — itens arrastáveis */
.item-slot, .skill-item, .skill-icon, .shop-item {
    cursor: url('assets/cursors/cursor_pick.png'), pointer !important;
}

/* Classes de cursor aplicadas ao body via JS */
body.cursor-default  { cursor: url('assets/cursors/cursor_default.png'), auto !important; }
body.cursor-attack   { cursor: url('assets/cursors/cursor_attack.png'), auto !important; }
body.cursor-pick     { cursor: url('assets/cursors/cursor_pick.png'), auto !important; }
body.cursor-interact { cursor: url('assets/cursors/cursor_interact.png'), auto !important; }

/* Inputs mantêm cursor de texto */
input { cursor: text !important; user-select: text !important; }

/* Área 3D de preview */
.char-preview-area {
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
.char-preview-area.rotatable {
    cursor: url('assets/cursors/cursor_pick.png'), grab !important;
}
.char-preview-area.rotatable:active {
    cursor: url('assets/cursors/cursor_pick.png'), grabbing !important;
}

/* --- 3. POINTER-EVENTS (PASS-THROUGH) --- */
#hud, #chat-container, #damage-container, #hotbar-container,
#debug-panel, #notification-container, #transition-overlay {
    pointer-events: none;
}
#chat-input, .hotkey-slot, .hud-buttons div, .rpg-window *,
.rpg-panel *, .rpg-notification {
    pointer-events: auto;
}

/* --- 4. SCROLLBARS GLOBAIS --- */
::-webkit-scrollbar { 
    width: 8px; 
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
::-webkit-scrollbar-track { 
    background: rgba(0,0,0,0.2); 
    border-radius: 4px; 
}
::-webkit-scrollbar-thumb { 
    background: #8d6e63; 
    border: 1px solid #5d4037; 
    border-radius: 4px; 
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
::-webkit-scrollbar-thumb:hover { background: #a1887f; }

/* Força o cursor em todos os elementos que podem ter barra de rolagem */
.bag-grid, 
.chat-content-area, 
.skills-grid, 
.cart-list, 
.party-list-container, 
#friend-list, 
#shop-setup-slots,
.admin-item-list {
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}

/* --- 5. INPUTS ESTILIZADOS --- */
.input-group { text-align: left; margin-bottom: 15px; }
.input-group label { display: block; font-size: 14px; color: #deb887; margin-bottom: 5px; }
.input-group input, .rpg-input-number {
    width: 100%; padding: 8px;
    background: #2b1d15; border: 1px solid #5d4037;
    color: #fff; font-family: 'Roboto', sans-serif;
    border-radius: 4px; outline: none; transition: 0.2s;
}
.input-group input:focus { border-color: var(--border-gold); background: #3e2723; }

.checkbox-group {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 15px; color: #deb887; font-size: 13px; cursor: pointer;
}
.checkbox-group input, .checkbox-group label { cursor: pointer; margin: 0; width: auto; }

/* --- 6. COMPONENTES GENÉRICOS --- */

/* Painéis */
.rpg-panel {
    background: var(--bg-wood-dark);
    border: 3px solid var(--border-gold);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5);
    color: var(--text-light);
    text-align: center;
    position: relative;
}
.rpg-title {
    color: var(--border-gold-light);
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 20px;
    font-size: 28px;
    letter-spacing: 1px;
}

/* Botões */
.rpg-btn {
    width: 100%; padding: 10px; border: none; border-radius: 4px;
    font-family: 'MedievalSharp', cursive; font-size: 16px; font-weight: bold;
    color: #fff; text-shadow: 1px 1px 0 #000;
    box-shadow: 0 4px 0 rgba(0,0,0,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    background: linear-gradient(to bottom, #8d6e63, #5d4037);
    border: 1px solid #a1887f;
}
.rpg-btn:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(0,0,0,0.4); }
.rpg-btn.primary { background: linear-gradient(to bottom, #f57f17, #ef6c00); border-color: #ffb74d; }
.rpg-btn.success { background: linear-gradient(to bottom, #66bb6a, #2e7d32); border-color: #81c784; }
.rpg-btn.danger  { background: linear-gradient(to bottom, #ef5350, #c62828); border-color: #e57373; }
.rpg-btn.small   { width: auto; padding: 5px 15px; font-size: 14px; }
.rpg-btn.gold {
    background: linear-gradient(to bottom, #ffca28, #f57c00);
    border-color: #ffe082;
    color: #fff; text-shadow: 1px 1px 0 #000, 0 0 3px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}
.rpg-btn.gold:hover {
    background: linear-gradient(to bottom, #ffd54f, #fb8c00);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 160, 0, 0.4);
    border-color: #fff;
}
button:disabled, .rpg-btn:disabled {
    background: #9e9e9e !important; color: #424242 !important;
    border-color: #616161 !important; cursor: not-allowed !important;
    box-shadow: none !important; transform: none !important;
    filter: grayscale(100%);
}

.link-btn { margin-top: 15px; color: #deb887; text-decoration: underline; cursor: pointer; font-size: 12px; }
.error { color: #ff5252; font-size: 13px; margin-top: 10px; min-height: 20px; }
.auth-message {
    margin-top: 15px; font-size: 13px; min-height: 20px; text-align: center;
    font-weight: bold; text-shadow: 1px 1px 0 #000; transition: opacity 0.3s;
}
.auth-message.error { color: #ff5252; }
.auth-message.success { color: #69f0ae; }

/* Botão de ícone HUD */
.rpg-icon-btn {
    width: 40px; height: 40px;
    background: radial-gradient(#5d4037, #3e2723);
    border: 2px solid #8d6e63; border-radius: 8px;
    color: #deb887; font-size: 18px; font-weight: bold;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5); transition: 0.2s;
}
.rpg-icon-btn:hover { border-color: var(--border-gold); color: #fff; transform: scale(1.05); }

/* Destaque pulsante nos botões HUD */
.rpg-icon-btn.highlight {
    border-color: #ffd700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    position: relative; overflow: hidden;
}
.rpg-icon-btn.highlight::after {
    content: '';
    position: absolute; top: 0; left: -150%; width: 80%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-25deg);
    animation: btnShine 2s infinite;
    pointer-events: none;
}
@keyframes btnShine {
    0%   { left: -100%; opacity: 0; }
    20%  { opacity: 0.1; }
    50%  { opacity: 0.6; }
    100% { left: 200%; opacity: 0; }
}

/* Botões de canto */
.corner-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid #5d4037;
    display: flex; justify-content: center; align-items: center;
    font-size: 20px;
    cursor: url('assets/cursors/cursor_default.png'), pointer !important;
    background: radial-gradient(circle, #4e342e, #281813);
    box-shadow: 0 3px 6px rgba(0,0,0,0.6); transition: all 0.2s;
}
.corner-btn:hover { transform: scale(1.1); filter: brightness(1.2); }
.corner-btn.primary { border-color: #ffd9008c; color: #ffd700; }
.corner-btn.danger  { border-color: #ef53508e; color: #ef5350; }

#btn-mini-logout { animation: popIn 0.2s ease-out; }

/* Mini botões */
.mini-btn {
    width: 24px; height: 24px; background: #8d6e63; color: white;
    border: 1px solid #5d4037; border-radius: 3px; cursor: pointer; font-weight: bold; line-height: 1;
}
.mini-btn:hover { background: #a1887f; }

/* --- 7. TELAS COMPLETAS (SCREENS) --- */

/* Overlay de transição de mapa */
#transition-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 9000; opacity: 0; transition: opacity 0.5s ease-in-out;
}
.fade-out { opacity: 1 !important; pointer-events: auto !important; }

/* Loading */
#loading-screen {
    position: absolute; width: 100%; height: 100%;
    background-color: #1a1a1a;
    background-position: center; background-size: cover; background-repeat: no-repeat;
    display: none; flex-direction: column;
    justify-content: center; align-items: center;
    color: var(--border-gold); z-index: 10000;
    box-shadow: inset 0 0 150px rgba(0,0,0,0.8);
}
.loading-bar-frame {
    width: 400px; height: 24px; background: #000;
    border: 2px solid var(--border-gold); border-radius: 12px; padding: 2px; margin: 15px 0;
}
#loading-bar-fill {
    height: 100%; background: linear-gradient(90deg, #c62828, #ff8f00);
    border-radius: 10px; width: 0%; transition: width 0.2s;
}

/* Login */
#login-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('assets/login.png') no-repeat center center fixed;
    background-size: cover;
    display: flex; justify-content: center; align-items: center; z-index: 2000;
}
.login-panel { width: 350px; }

/* Debug */
#debug-panel {
    position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.6);
    color: #0f0; padding: 5px; font-size: 12px; font-family: monospace; border: 1px solid #004400;
}

/* --- 8. SELEÇÃO E CRIAÇÃO DE PERSONAGEM --- */
#char-selection-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.2);
    display: none; flex-direction: row; z-index: 1500;
}

/* Lista lateral de chars */
.char-list-panel {
    width: 300px; background: rgba(0,0,0,0.8);
    border-right: 3px solid var(--border-gold);
    padding: 20px; display: flex; flex-direction: column; gap: 15px;
}
#char-slots-container {
    display: flex; flex-direction: column; gap: 15px;
    overflow-y: auto; max-height: 400px; padding-right: 5px;
}
.char-action-buttons { margin-top: auto; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.char-action-buttons button { width: 100%; }

.char-slot {
    background: var(--bg-wood); border: 2px solid #5d4037;
    padding: 15px; border-radius: 8px; transition: 0.2s;
    position: relative; display: flex; flex-direction: column;
}
.char-slot:hover { border-color: #aaa; }
.char-slot.selected { border-color: var(--border-gold-light); background: #4e342e; box-shadow: 0 0 10px #ffb74d; }
.char-slot.empty { opacity: 0.6; border-style: dashed; justify-content: center; align-items: center; min-height: 80px; }
.char-name-display { font-size: 18px; color: #ffb74d; font-weight: bold; }
.char-info-display { font-size: 12px; color: #ccc; font-family: 'Roboto', sans-serif; }
.delete-char-btn {
    position: absolute; top: 5px; right: 5px;
    color: #ef5350; font-size: 12px; border: 1px solid #c62828; padding: 2px 5px;
    background: rgba(0,0,0,0.5); border-radius: 4px; z-index: 10;
}
.delete-char-btn:hover { background: #c62828; color: white; }

.char-preview-area { flex: 1; position: relative; }

/* Painel de criação */
.char-create-panel {
    width: 360px;
    background: rgba(20, 10, 5, 0.95);
    border-left: 4px solid var(--border-gold);
    padding: 25px;
    display: none; flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    height: 100%; max-height: 100vh;
    overflow-y: auto; overflow-x: hidden;
}

.class-selector-title {
    color: #ffb74d; margin: 15px 0 5px 0; font-size: 14px;
    text-transform: uppercase; letter-spacing: 1px;
}

.class-btn {
    padding: 15px; margin-bottom: 10px;
    background: linear-gradient(to bottom, #4e342e, #3e2723);
    border: 2px solid #5d4037; border-radius: 6px;
    color: #a1887f; display: flex; align-items: center; gap: 15px;
    transition: all 0.2s ease; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); position: relative;
}
.class-btn:hover {
    background: linear-gradient(to bottom, #5d4037, #4e342e);
    border-color: #8d6e63; color: #fff; transform: translateX(5px);
}
.class-btn.selected {
    background: linear-gradient(to bottom, #3e2723, #281813);
    border: 2px solid var(--border-gold); color: var(--border-gold-light);
    box-shadow: inset 0 0 15px rgba(255,215,0,0.1), 0 0 10px rgba(0,0,0,0.7);
}
.class-btn.selected::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--border-gold); border-radius: 4px 0 0 4px; box-shadow: 0 0 10px var(--border-gold);
}
.class-btn .class-icon { font-size: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8)); }
.class-btn .class-name { font-weight: bold; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; }

.class-details-container {
    background: rgba(0,0,0,0.4); padding: 15px; border-radius: 6px; border: 1px solid #3e2723;
    margin: 15px 0; flex: 1; display: flex; flex-direction: column; gap: 15px;
}
.class-desc-text {
    color: #ffe0b2; font-size: 15px; line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8); font-style: italic; margin-bottom: 5px;
}

.stat-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #deb887; margin-bottom: 4px; }

/* Barras de stat (genérico) */
.stat-bar-bg { width: 120px; height: 6px; background: #222; border-radius: 3px; overflow: hidden; }
.stat-bar-fill { height: 100%; background: #ffca28; width: 0%; transition: width 0.5s ease-out; }

/* Barras de stat no preview de criação (override local) */
.class-stats-preview .stat-bar-bg {
    width: 120px; height: 8px;
    background: #222; border: 1px solid #5d4037; border-radius: 4px;
    overflow: hidden; display: block;
}
.class-stats-preview .stat-bar-fill {
    height: 100%; background-color: #ffca28 !important;
    width: 0%; transition: width 0.3s ease-out; display: block;
}

.create-actions { display: flex; gap: 10px; margin-top: auto; }
.create-actions button { flex: 1; }

/* Spinner de loading 3D */
#preview-loading {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: none; flex-direction: column; align-items: center;
    color: #ffb74d !important; font-weight: bold; font-size: 18px; text-shadow: 2px 2px 0 #000;
    z-index: 10000 !important; pointer-events: none;
}
.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(0,0,0,0.5); border-top: 5px solid #ffb74d;
    border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.8); background-color: rgba(0,0,0,0.2);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Gênero */
.gender-toggle,
.gender-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: flex-start;
    align-items: center;
}
.gender-btn {
    width: 40px; height: 40px;
    background: #3e2723; border: 2px solid #5d4037; border-radius: 50%;
    color: #8d6e63; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.gender-btn:hover { border-color: #ffd700; color: #fff; }
.gender-btn.selected {
    background: #5d4037; border-color: #ffd700; color: #ffd700;
    box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

/* Aparência */
.appearance-section {
    background: rgba(0,0,0,0.3); padding: 10px;
    border-radius: 6px; margin: 10px 0; border: 1px solid #3e2723;
}
.hair-style-control {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; color: #ffecb3; font-weight: bold;
}
.arrow-btn {
    background: #4e342e; border: 1px solid #8d6e63; color: #fff;
    width: 30px; height: 30px; border-radius: 4px;
}
.arrow-btn:hover { background: #5d4037; border-color: #ffd700; }

/* Swatches de cor */
.color-swatch {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid #3e2723;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 8px #fff; transform: scale(1.2); }

/* Seleção de cores agrupadas (duas colunas: Cor do Cabelo | Tom de Pele) */
.color-selection-area {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 15px 0;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #3e2723;
}
.color-group { flex: 1; }
.color-group label {
    display: block; margin-bottom: 5px;
    font-size: 12px; color: #deb887; text-align: center;
}
/* Grid 3 colunas dentro de cada grupo de cor */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    justify-content: center;
    justify-items: center;
}
/* hair-colors usado fora do color-selection-area */
.hair-colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    justify-items: center;
}

/* Painel central de info (preview 3D) */
#creation-arrows {
    position: absolute; top: 30%; left: 0; width: 100%; height: 0;
    pointer-events: none; z-index: 10;
}
.preview-arrow {
    position: absolute; width: 50px; height: 50px;
    background: rgba(0,0,0,0.6); border: 2px solid var(--border-gold);
    color: var(--border-gold-light); font-size: 24px;
    display: flex; justify-content: center; align-items: center;
    pointer-events: auto; transition: all 0.2s; border-radius: 8px;
}
.preview-arrow:hover { background: var(--border-gold); color: #000; transform: scale(1.1); }
.preview-arrow.left  { left: 50%; margin-left: -250px; }
.preview-arrow.right { left: 50%; margin-left: 200px; }

.preview-info-box {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 400px; background: rgba(20,10,5,0.85);
    border: 2px solid var(--border-gold); border-radius: 8px;
    padding: 15px; text-align: center; box-shadow: 0 0 20px rgba(0,0,0,0.8); z-index: 10;
}
.preview-class-title {
    font-size: 20px; color: #ffca28; font-weight: bold;
    text-transform: uppercase; margin-bottom: 5px; letter-spacing: 2px; text-shadow: 2px 2px 0 #000;
}
.center-desc {
    font-size: 13px; color: #ddd; font-style: italic;
    margin-bottom: 10px; line-height: 1.4; text-shadow: 1px 1px 0 #000;
}
.class-stats-preview.compact .stat-row { font-size: 11px; margin-bottom: 2px; }
.class-stats-preview.compact .stat-bar-bg { width: 150px; background: #111; }

.dice-btn {
    font-size: 24px;
    background: radial-gradient(circle, #5d4037, #3e2723);
    border-color: #aaa; color: #fff;
}
.dice-btn:hover { background: #fff; color: #000; border-color: #fff; transform: rotate(20deg); }

/* Responsividade criação de char */
@media screen and (max-height: 850px) {
    #class-selection-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
    .class-btn { margin-bottom: 0; padding: 8px 5px; flex-direction: column; justify-content: center; text-align: center; gap: 5px; height: 80px; }
    .class-btn .class-icon { font-size: 20px; }
    .class-btn .class-name { font-size: 13px; }
    .input-group, .checkbox-group, .class-selector-title { margin-bottom: 8px; }
    .class-details-container { padding: 10px; gap: 5px; margin: 5px 0 15px 0; }
}

/* --- 9. HUD --- */
#hud {
    position: absolute; top: 15px; left: 15px;
    width: 380px; z-index: 100;
    font-family: 'Roboto', sans-serif; pointer-events: none;
}
.hud-layout { display: flex; align-items: flex-start; gap: 10px; }

/* Nível */
.hud-level-container { position: relative; z-index: 2; flex-shrink: 0; }
.level-ring {
    width: 55px; height: 55px;
    background: radial-gradient(circle, #4e342e, #281813);
    border: 3px solid var(--border-gold); border-radius: 50%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.8); color: #fff;
}
.lvl-label { font-size: 9px; color: #ffd700; font-weight: bold; margin-top: -2px; }
#lvl-text  { font-size: 22px; font-weight: 900; line-height: 1; text-shadow: 1px 1px 0 #000; }

/* Container de stats */
.hud-stats-container { flex: 1; display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }

/* Linha superior HP/MP/XP + Estamina */
.stats-top-row { display: flex; flex-direction: row; width: 100%; gap: 5px; }
.bars-column-left { flex: 1; display: flex; flex-direction: column; gap: 4px; }

/* Estamina */
.stamina-wrapper { display: flex; flex-direction: column; align-items: center; width: 24px; flex-shrink: 0; }
.stamina-bg {
    width: 12px; height: 60px; background: rgba(0,0,0,0.6);
    border: 1px solid #3e2723; border-radius: 2px; position: relative; display: flex; align-items: flex-end;
}
.stamina-fill {
    width: 100%; height: 100%;
    background: linear-gradient(to top, #fdd835, #fff59d);
    transition: height 0.2s ease-out; box-shadow: 0 0 5px #fbc02d;
}
.stamina-number {
    font-family: 'Roboto', sans-serif; font-size: 10px; font-weight: bold;
    color: #ffd700; text-shadow: 1px 1px 0 #000; margin-top: 2px; text-align: center; width: 100%;
}

/* Barras HP/MP/XP */
.stat-bar-wrapper {
    position: relative; width: 100%; height: 18px;
    background: rgba(0,0,0,0.6); border-radius: 4px; border: 1px solid #3e2723;
    box-shadow: inset 0 0 5px #000;
}
/* Reutiliza .stat-bar-bg e .stat-bar-fill definidos acima, com overrides de tamanho */
.stat-bar-wrapper .stat-bar-bg { width: 100%; height: 100%; position: relative; overflow: hidden; border-radius: 3px; }
.hp-fill { background: linear-gradient(to right, #d32f2f, #ef5350); }
.mp-fill { background: linear-gradient(to right, #1565c0, #42a5f5); }
.stat-bar-text {
    position: absolute; top: 0; left: 0; width: 100%; text-align: center;
    font-size: 11px; font-weight: bold; color: #fff;
    text-shadow: 1px 1px 1px #000, 0 0 3px #000;
    line-height: 18px; z-index: 2; white-space: nowrap;
}
.xp-wrapper { height: 14px; border-color: #555; }
.xp-fill { background: linear-gradient(to right, #f57f17, #ffd700); }
.xp-wrapper .stat-bar-text { line-height: 14px; font-size: 10px; color: #fffde7; }

/* Rodapé HUD */
.hud-footer {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(to right, rgba(0,0,0,0.8), rgba(62,39,35,0.8));
    padding: 4px 10px; border-radius: 4px; border-top: 1px solid #5d4037;
}
.hud-class-text { font-family: 'MedievalSharp', cursive; color: #bdbdbd; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.hud-gold-container { display: flex; align-items: center; gap: 5px; color: #ffca28; font-weight: bold; font-size: 14px; }
.gold-icon-sm { width: 16px; height: 16px; }

/* Botões HUD lateral */
.hud-buttons { position: fixed; top: 140px; left: 15px; display: flex; flex-direction: column; gap: 10px; z-index: 500; }

/* Ícone do alvará */
.hud-shop-icon { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); }

/* --- 10. STATUS CONTAINER (BUFFS/DEBUFFS LATERAL) --- */
#status-container {
    position: absolute; top: 50%; right: 20px; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none; padding-left: 60px; overflow: visible !important;
}
.status-icon {
    width: 46px; height: 46px;
    background-color: transparent; border: none; border-radius: 0; margin-bottom: 8px;
    position: relative; overflow: visible !important;
    display: flex; justify-content: center; align-items: center;
}
.status-img {
    width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%;
    image-rendering: auto; image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}
.status-timer {
    position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
    margin-right: 8px; white-space: nowrap;
    font-size: 16px; font-weight: bold; color: #fff; font-family: 'Roboto', sans-serif;
    text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
                 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000;
    z-index: 10; pointer-events: none;
}
.status-stacks {
    position: absolute; top: -6px; right: -6px;
    background: #000; color: #fff; font-size: 11px; font-weight: bold;
    padding: 2px 6px; border-radius: 10px; border: 1px solid #fff; z-index: 11;
}
.status-icon.buff .status-img {
    filter: drop-shadow(0 0 4px rgba(105,240,174,0.6)) drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}
.status-icon.debuff .status-img {
    filter: drop-shadow(0 0 4px rgba(239,83,80,0.6)) drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

/* --- 11. HOTBAR --- */
#hotbar-container {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 2000; pointer-events: none;
}
.hotbar-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.hotbar-frame {
    background: transparent; border: none; outline: none; box-shadow: none; padding: 0;
    display: flex; flex-direction: column; align-items: center;
    transition: transform 0.3s ease;
}
.hotbar-frame.expanded { transform: translateY(-5px); }
.hotbar-row {
    background: rgba(79,53,46,0.95); border: 2px solid #3e2723; outline: 1px solid #8d6e63;
    padding: 5px; box-shadow: 0 6px 12px rgba(0,0,0,0.8);
    display: flex; gap: 4px; justify-content: center;
}
.main-row { border-radius: 6px; z-index: 10; position: relative; }
.sec-row {
    display: none; opacity: 0; transition: opacity 0.3s ease;
    border-radius: 0 0 6px 6px; margin-top: -2px; padding-top: 6px;
    z-index: 5; border-top: none; outline-offset: -1px;
}
.hotbar-frame.expanded .sec-row { display: flex; opacity: 1; }

#hotbar-toggle-btn {
    position: absolute; right: -28px; top: 28px; transform: translateY(-50%);
    width: 22px; height: 22px;
    background: #4f352e; border: 1px solid #8d6e63; color: #ffd700;
    font-size: 14px; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px; transition: all 0.2s; user-select: none;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5); z-index: 15;
}
#hotbar-toggle-btn:hover { background: #5d4037; color: #fff; border-color: #ffd700; }

.hotkey-slot {
    width: 46px; height: 46px;
    background: rgba(0,0,0,0.4); border: 1px solid #5d4037; border-radius: 4px;
    position: relative; transition: border-color 0.2s, background-color 0.2s;
}
.hotkey-slot:hover { border-color: #ffd700; background: rgba(255,255,255,0.05); }
.key-number {
    position: absolute; top: 2px; left: 4px;
    font-size: 10px; color: #bdbdbd; font-weight: bold;
    text-shadow: 1px 1px 0 #000; pointer-events: none; z-index: 5;
}
.hotkey-content { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.hotkey-content img { width: 38px; height: 38px; }
.hotkey-qtd {
    position: absolute; bottom: 2px; right: 4px;
    font-size: 11px; color: #fff; text-shadow: 1px 1px 0 #000;
    font-weight: bold; pointer-events: none; z-index: 5;
}
.cd-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 0%;
    background-color: rgba(0,0,0,0.7); z-index: 4; pointer-events: none; border-radius: 3px;
}

/* --- 12. CHAT --- */
#chat-container {
    position: absolute; bottom: 20px; left: 15px; width: 380px;
    background: none; border: none; pointer-events: none;
    display: flex; flex-direction: column; z-index: 200;
    opacity: 0.75; transition: opacity 0.2s;
}
#chat-tabs-header { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 0; pointer-events: auto; }
.chat-tab {
    background: rgba(0,0,0,0.6); color: #aaa;
    padding: 4px 10px; border-radius: 6px 6px 0 0;
    font-family: 'Roboto', sans-serif; font-size: 12px;
    border: 1px solid #444; border-bottom: none; transition: 0.2s; position: relative;
}
.chat-tab:hover { background: rgba(0,0,0,0.8); color: #fff; }
.chat-tab.active { background: rgba(0,0,0,0.85); color: #ffca28; font-weight: bold; border-color: #777; z-index: 2; }
.tab-unread { color: #00e676; font-weight: bold; animation: pulseText 1s infinite; }
@keyframes pulseText { 50% { opacity: 0.5; } }
.tab-close { margin-left: 6px; color: #ef5350; font-weight: bold; }
.tab-close:hover { color: #ff0000; }

#chat-body-container {
    background: rgba(0,0,0,0.75); border: 1px solid #555; border-top: none;
    border-radius: 0 4px 4px 4px; height: 160px; pointer-events: auto; position: relative;
}
.chat-content-area {
    width: 100%; height: 100%; overflow-y: auto; padding: 5px;
    color: #fff; font-size: 13px; font-family: 'Roboto', sans-serif;
    text-shadow: 1px 1px 0 #000; scrollbar-width: thin;
}
.chat-input-wrapper {
    background: rgba(0,0,0,0.6); border: 1px solid #555; border-top: none;
    border-radius: 0 0 4px 4px; padding: 2px; pointer-events: auto;
}
#chat-input {
    width: 100%; background: transparent; border: none;
    color: white; padding: 5px; font-size: 12px; outline: none;
}

/* Cores das mensagens */
.msg-system  { color: #ffff00; font-style: italic; }
.msg-error   { color: #ff5252; font-style: italic; }
.msg-party   { color: #00e5ff; }
.msg-pm-in   { color: #e040fb; font-weight: bold; }
.msg-pm-out  { color: #ea80fc; }
.msg-local   { color: #ffffff; }

/* --- 13. JANELAS (WINDOWS) --- */
.rpg-window {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 340px; background: var(--bg-wood); border: 2px solid var(--border-gold);
    border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    z-index: 2000; display: flex; flex-direction: column;
}
.large-window { width: 400px; }
.wide-window  { width: 525px; }

.win-header {
    background: var(--bg-wood-dark); color: var(--border-gold-light);
    padding: 8px 12px; font-size: 18px; border-bottom: 2px solid #8d6e63;
    display: flex; justify-content: space-between; align-items: center; border-radius: 6px 6px 0 0;
}
.close-btn { color: #ef5350; font-size: 20px; transition: 0.2s; }
.close-btn:hover { color: #ff1744; text-shadow: 0 0 5px red; }
.win-content { padding: 15px; color: var(--text-dark); flex: 1; }
.parchment-bg { background: var(--bg-parchment); box-shadow: inset 0 0 20px rgba(93,64,55,0.3); }
.win-footer {
    background: var(--bg-wood-dark); padding: 10px; border-top: 2px solid #8d6e63;
    display: flex; justify-content: space-around; border-radius: 0 0 6px 6px;
}

/* Posicionamento padrão das janelas */
#inventory-window { left: 25%; top: 40%; transform: translate(-50%, -50%); margin: 0; }
#status-window    { left: 45%; top: 40%; transform: translate(-50%, -50%); margin: 0; }
#skills-window    { left: 65%; top: 40%; transform: translate(-50%, -50%); margin: 0; }
#social-window    { top: 40px !important; left: auto; right: 20px; transform: none; margin: 0; }

/* --- 14. JANELA DE STATUS (ATRIBUTOS) --- */
.attr-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.attr-card {
    background: rgba(255,255,255,0.3); padding: 5px 10px;
    border: 1px solid #d7ccc8; border-radius: 4px;
    display: flex; justify-content: space-between; align-items: center;
}
.attr-label { font-weight: bold; font-size: 14px; }
.attr-controls { display: flex; align-items: center; gap: 8px; }
.attr-val { width: 25px; text-align: center; font-weight: bold; }
.stat-bonus { color: #2e7d32; font-size: 12px; margin-left: 4px; }
.separator { height: 2px; background: #d7ccc8; margin: 15px 0; }
.points-row { text-align: center; font-weight: bold; margin-bottom: 15px; color: #5d4037; }
.highlight-text { color: #c62828; font-size: 18px; }
.derived-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.stat-box {
    background: rgba(0,0,0,0.05); padding: 5px; border-radius: 4px;
    width: 48%; border: 1px solid rgba(0,0,0,0.1); font-family: 'Roboto', sans-serif; font-weight: bold;
}
.stat-box.full-width { width: 100%; text-align: center; }

/* --- 15. JANELA DE INVENTÁRIO --- */
.inv-left { display: flex; flex-direction: column; gap: 10px; width: 140px; flex-shrink: 0; justify-content: center; }
.equip-slots-container { display: flex; flex-direction: column; gap: 10px; padding-left: 30px; }
.inv-left .equip-row { display: flex; justify-content: center; gap: 6px; }
.inv-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.inv-right-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.inv-divider { width: 1px; background: rgba(141,110,99,0.2); margin: 0 12px; }

/* Abas de inventário */
.inv-local-tabs { display: flex; gap: 4px; }
.local-tab {
    background: rgba(93,64,55,0.15); border: none; border-radius: 3px;
    color: #5d4037; font-family: 'MedievalSharp', cursive; font-size: 12px; font-weight: bold;
    padding: 5px 16px; transition: all 0.15s; opacity: 0.7; white-space: nowrap;
}
.local-tab:hover { background: rgba(93,64,55,0.25); opacity: 0.9; }
.local-tab.active { background: rgba(62,39,35,0.85); color: #ffca28; opacity: 1; }
.bag-capacity-top { font-family: 'Roboto', sans-serif; font-size: 14px; color: #d32f2f; font-weight: bold; margin-right: 15px; }

/* Boneco de equipamentos */
.equip-doll { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-bottom: 15px; margin-top: 10px; }
.equip-row  { display: flex; flex-direction: row; gap: 10px; justify-content: center; }
.slot-container { display: flex; flex-direction: column; align-items: center; }
.slot-label { font-size: 10px; color: #5d4037; text-align: center; margin-bottom: 2px; font-weight: bold; }

/* Item slot (inventário + equipamentos) */
.item-slot {
    width: 44px; height: 44px; background: var(--slot-bg);
    border: 2px solid #3e2723; border-radius: 4px; box-shadow: inset 0 0 5px #000;
    display: flex; justify-content: center; align-items: center; position: relative; transition: border-color 0.2s;
}
.item-slot:hover { border-color: var(--border-gold-light); }
.item-qtd {
    position: absolute; bottom: 1px; right: 2px;
    font-size: 10px; color: #fff; text-shadow: 1px 1px 0 #000;
    font-family: 'Roboto', sans-serif; pointer-events: none;
}
.item-slot.item-in-sell { opacity: 0.3; filter: grayscale(100%); pointer-events: none; border-style: dashed; }

/* Grid da mochila */
.bag-grid {
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 5px;
    background: rgba(0,0,0,0.03); 
    padding: 8px;
    border: 1px solid rgba(93,64,55,0.2); 
    height: 195px;
    overflow-y: auto; 
    overflow-x: hidden; 
    align-content: start;
    cursor: url('assets/cursors/cursor_default.png'), auto !important; /* Adicione esta linha */
}
/* Barra de rolagem específica da mochila (Corrigido para não perder o cursor) */
.bag-grid::-webkit-scrollbar { 
    width: 6px; 
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
.bag-grid::-webkit-scrollbar-track { 
    background: transparent; 
}
.bag-grid::-webkit-scrollbar-thumb { 
    background: rgba(93,64,55,0.3); 
    border-radius: 3px; 
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
.bag-grid::-webkit-scrollbar-thumb:hover { 
    background: rgba(93,64,55,0.5); 
}
/* Note: Removi a regra :not(:hover) que estava ocultando o thumb, 
   pois ela pode interferir na detecção do mouse pelo navegador */


/* Qualidade de renderização dos ícones */
.item-slot img, .skill-icon-img, .hotkey-content img,
.shop-item-icon, .trade-slot img, .cart-row img {
    image-rendering: auto !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: high-quality !important;
    width: 100%; height: 100%; object-fit: contain;
}
.item-slot img, .skill-icon-img {
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.5));
}

/* Socket */
.socket-target-valid {
    border: 2px solid #00ff00 !important; box-shadow: 0 0 10px #00ff00;
    cursor: url('assets/cursors/cursor_interact.png'), pointer !important;
    animation: pulseBorder 1s infinite;
}
@keyframes pulseBorder {
    0%, 100% { border-color: #00ff00; }
    50%       { border-color: #ccffcc; }
}

/* --- 16. JANELA DE HABILIDADES --- */
.skills-grid { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 5px; margin-top: 10px; }
.skill-item {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.5); border: 1px solid #8d6e63; border-radius: 6px;
    padding: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.skill-icon-container { position: relative; width: 44px; height: 44px; margin-right: 12px; flex-shrink: 0; }
.skill-icon-img { width: 100%; height: 100%; border: 1px solid #5d4037; border-radius: 4px; background: #222; object-fit: cover; }
.skill-level-badge {
    position: absolute; bottom: -4px; right: -4px;
    background: #333; color: #ffd700; font-size: 11px; font-weight: bold;
    padding: 1px 5px; border: 1px solid #fff; border-radius: 4px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.5); z-index: 2;
}
.skill-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.skill-name {
    font-family: 'MedievalSharp', serif;
    font-weight: bold;
    color: #3e2723;
    font-size: 15px; /* Tamanho reduzido conforme pedido */
    margin-bottom: 2px;
}
.skill-type-label { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.type-active  { color: #d84315; }
.type-passive { color: #1565c0; }
.skill-actions { width: 90px; display: flex; justify-content: flex-end; align-items: center; }
.skill-btn {
    width: 100%; height: 28px; border: 1px solid rgba(0,0,0,0.3); border-radius: 4px;
    font-family: 'Roboto', sans-serif; font-weight: bold; font-size: 12px;
    text-transform: uppercase; transition: all 0.2s; color: white;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
.skill-btn:active { transform: translateY(2px); }
.btn-learn   { background: linear-gradient(to bottom, #66bb6a, #43a047); border-color: #2e7d32; }
.btn-learn:hover { background: linear-gradient(to bottom, #81c784, #4caf50); }
.btn-upgrade { background: linear-gradient(to bottom, #ffca28, #ffb300); border-color: #ff8f00; font-size: 18px; line-height: 18px; }
.btn-upgrade:hover { background: linear-gradient(to bottom, #ffe082, #ffca28); }
.max-label { font-weight: bold; color: #f57f17; font-size: 12px; text-align: center; width: 100%; }

/* Textos de cor na tooltip */
.text-cyan  { color: #00ffff; font-weight: bold; font-size: 12px; display: block; margin-top: 4px; }
.text-red   { color: #ff5555; }
.text-green { color: #55ff55; }

/* --- 17. LOJA --- */
.shop-tabs { display: flex; background: #3e2723; border-bottom: 2px solid #8d6e63; }
.shop-tab {
    flex: 1; padding: 10px; background: none; border: none;
    color: #aaa; font-family: 'MedievalSharp', cursive; font-size: 16px; transition: 0.2s;
}
.shop-tab:hover { color: #fff; background: rgba(255,255,255,0.1); }
.shop-tab.active { color: #ffb74d; background: #5d4037; border-bottom: 3px solid #ffb74d; font-weight: bold; }
.shop-labels { font-size: 12px; color: #5d4037; font-weight: bold; margin-bottom: 5px; text-transform: uppercase; }

.shop-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    background: rgba(0,0,0,0.2); border: 1px solid #5d4037; padding: 6px; border-radius: 4px;
    height: 190px; overflow-y: auto; margin-bottom: 10px;
    grid-auto-rows: 55px; align-content: start;
}
.shop-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; height: 100%; overflow: hidden;
    background: linear-gradient(to bottom, #6d4c41, #4e342e);
    border: 1px solid #8d6e63; border-radius: 6px; padding: 4px 8px;
    position: relative; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.shop-item:hover { background: linear-gradient(to bottom, #795548, #5d4037); border-color: #ffb74d; transform: translateY(-1px); }
.shop-item img { width: 36px !important; height: 36px !important; object-fit: contain; flex-shrink: 0; background: rgba(0,0,0,0.3); border: 1px solid #3e2723; border-radius: 4px; }
.shop-item-details { display: flex; flex-direction: column; justify-content: center; overflow: hidden; flex: 1; }
.shop-item-name  { font-size: 12px; font-weight: bold; color: #fff8e1; text-shadow: 1px 1px 0 rgba(0,0,0,0.8); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-bottom: 2px; }
.shop-item-price { font-size: 11px; color: #ffca28; font-weight: bold; text-shadow: 1px 1px 0 rgba(0,0,0,0.8); font-family: 'Roboto', sans-serif; }

.cart-list { height: 160px; overflow-y: auto; background: rgba(255,255,255,0.3); border: 1px solid #d7ccc8; padding: 5px; border-radius: 4px; }
.cart-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.9); margin-bottom: 2px;
    padding: 4px 6px; font-size: 13px; border-radius: 3px;
    border: 1px solid #a1887f; color: #3e2723; font-weight: bold;
}
.cart-remove-btn { color: #c62828; font-weight: 900; padding: 0 5px; margin-left: 5px; }
.cart-remove-btn:hover { color: #ff0000; transform: scale(1.2); }
.price-loss { color: #d32f2f; font-weight: 900; }
.price-gain { color: #2e7d32; font-weight: 900; }

.shop-footer {
    background: #3e2723; padding: 10px; border-top: 2px solid #8d6e63;
    color: #fff; font-family: 'Roboto', sans-serif; font-size: 13px; border-radius: 0 0 6px 6px;
    display: flex; flex-direction: row; justify-content: center; gap: 15px;
    align-items: center; min-height: 50px;
}
.shop-footer .rpg-btn { width: auto; min-width: 100px; padding: 6px 15px; font-size: 13px; height: 32px; line-height: 1; }
.shop-info-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 5px; }
.money-display { margin: 0; color: #ffd700; font-weight: bold; font-size: 14px; }
.transaction-info { margin: 0; font-size: 14px; font-weight: bold; text-align: right; }
.cost-ok  { color: #69f0ae; }
.cost-bad { color: #ff5252; }

/* Vazio */
.shop-empty-bg { background-repeat: no-repeat; background-position: center; background-size: 80px; background-color: rgba(255,255,255,0.5); }
.bg-buy  { background-image: url('assets/icons/bag_itens.png'); background-blend-mode: lighten; }
.bg-sell { background-image: url('assets/icons/bag_coins.png'); background-blend-mode: lighten; }
.empty-instruction {
    width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;
    text-align: center; font-family: 'Roboto', sans-serif; font-size: 14px; font-style: italic;
    color: #3e2723; font-weight: 600; line-height: 1.5; padding: 20px;
    text-shadow: 0 0 10px #ffffff, 0 0 5px #ffffff; pointer-events: none;
}

/* Modal de quantidade (loja) */
#shop-quant-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    z-index: 5000; display: none; justify-content: center; align-items: center;
}

/* Criação de loja — setup */
#shop-setup-slots {
    display: flex; flex-direction: column; gap: 5px;
    max-height: 250px; overflow-y: auto;
    background: rgba(0,0,0,0.2); padding: 5px;
    border: 1px solid #5d4037; border-radius: 4px; min-height: 150px;
}
.shop-setup-row {
    display: flex; align-items: center;
    background: rgba(62,39,35,0.8); border: 1px solid #8d6e63; border-radius: 4px;
    padding: 5px; height: 50px; transition: background 0.2s;
}
.shop-setup-row:hover { background: rgba(93,64,55,0.9); }
.shop-setup-row.empty {
    border: 1px dashed #8d6e63; background: rgba(0,0,0,0.1);
    justify-content: center; color: #8d6e63; font-size: 12px;
}
.setup-col-icon { width: 40px; height: 40px; position: relative; margin-right: 10px; border: 1px solid #000; background: #222; border-radius: 4px; }
.setup-col-icon img { width: 100%; height: 100%; }
.setup-col-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.setup-item-name  { color: #fff; font-size: 14px; font-weight: bold; }
.setup-item-price { color: #ffd700; font-size: 13px; }
.setup-remove-btn { color: #ef5350; font-weight: bold; padding: 0 10px; font-size: 16px; }
.setup-remove-btn:hover { color: #ff8a80; }

/* Label do setup */
#shop-setup-window label { color: #3e2723; font-weight: bold; font-size: 14px; text-shadow: none; }

/* Gerenciamento da loja */
.shop-meta-info {
    display: flex; justify-content: space-between;
    background: rgba(0,0,0,0.6); padding: 8px 10px; border-radius: 4px; margin-bottom: 10px;
    font-size: 14px; color: #ffffff; font-weight: bold; text-shadow: 1px 1px 0 #000; border: 1px solid #5d4037;
}
.shop-meta-icon { margin-right: 5px; }
.shop-profit-display {
    text-align: center; background: linear-gradient(to bottom, rgba(62,39,35,0.9), rgba(40,20,15,0.9));
    border: 1px solid #ffd700; border-radius: 6px; padding: 10px; margin-bottom: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.profit-label { font-size: 12px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.profit-value { font-size: 24px; font-weight: bold; color: #69f0ae; text-shadow: 0 0 5px rgba(105,240,174,0.4); }
.owner-list-container { max-height: 200px; overflow-y: auto; border: 1px solid #5d4037; background: rgba(0,0,0,0.2); border-radius: 4px; padding: 5px; margin-bottom: 10px; }
.no-profit-msg { color: #ccc; font-style: italic; font-size: 14px; text-align: center; padding: 8px 0; width: 100%; }

/* Botão flutuante HUD da loja */
.hud-circle-btn {
    position: absolute; top: 100px; right: 15px;
    width: 50px; height: 50px;
    background: radial-gradient(circle, #ffd700, #ff8f00);
    border: 2px solid #fff; border-radius: 50%;
    color: #3e2723; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); z-index: 20; transition: transform 0.1s;
}
.hud-circle-btn:active { transform: scale(0.9); }
.hud-circle-btn:hover  { filter: brightness(1.2); }

/* --- 18. TOOLTIP --- */
#item-tooltip {
    position: fixed; top: 0; left: 0;
    background: rgba(20,15,10,0.95); border: 2px solid var(--border-gold);
    padding: 10px; max-width: 300px; color: #fff; font-size: 12px; font-family: 'Roboto', sans-serif;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); white-space: normal;
    
    z-index: 100000 !important; /* Aumentei mais um zero por garantia */
    pointer-events: none;      
}

#item-tooltip h3 { margin-bottom: 5px; font-family: 'MedievalSharp', cursive; font-size: 16px; border-bottom: 1px solid #555; padding-bottom: 3px; }
#item-tooltip .desc { color: #aaa; margin-bottom: 8px; font-style: italic; }
#item-tooltip .stat { display: block; margin-top: 2px; }

/* --- 19. MODAIS --- */
.small-modal  { width: 250px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3000; }
.modal-title  { color: #ef5350; font-size: 18px; margin-bottom: 10px; }
.modal-actions{ display: flex; justify-content: space-around; gap: 10px; margin-top: 15px; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 5000;
    display: flex; justify-content: center; align-items: center; animation: fadeIn 0.2s ease-out;
}
.delete-modal-content { width: 320px; background: var(--bg-wood-dark); border: 2px solid var(--border-gold); box-shadow: 0 0 30px rgba(0,0,0,0.9); }
.delete-msg { margin: 20px 0 10px 0; font-size: 16px; color: #ccc; line-height: 1.4; }
#del-char-name-display { color: #fff; font-weight: bold; font-size: 20px; text-shadow: 0 0 5px #ffb74d; }
.delete-warning {
    background: rgba(198,40,40,0.15); border: 1px solid #c62828; color: #ef5350;
    padding: 10px; border-radius: 4px; margin: 15px 0 25px 0; font-size: 13px; font-weight: bold;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.warning-icon { font-size: 18px; }

/* --- 20. MENU DE CONTEXTO --- */
.rpg-context-menu {
    position: absolute; z-index: 9999;
    background: var(--bg-wood-dark); border: 2px solid var(--border-gold);
    border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    min-width: 150px; overflow: hidden;
    font-family: 'Roboto', sans-serif; animation: fadeIn 0.1s ease-out;
}
.ctx-header {
    background: #4e342e; color: var(--border-gold-light);
    padding: 8px 10px; font-size: 13px; font-weight: bold;
    border-bottom: 1px solid #8d6e63; text-align: center; pointer-events: none;
}
.ctx-options { padding: 4px 0; }
.ctx-item {
    padding: 8px 15px;
    cursor: url('assets/cursors/cursor_default.png'), default !important;
    color: #ffecb3; font-size: 13px; transition: background 0.2s;
    display: flex; align-items: center; gap: 8px; justify-content: center;
}
.ctx-item:hover { background: #5d4037; color: #fff; }
.ctx-item.disabled {
    color: #795548;
    cursor: url('assets/cursors/cursor_default.png'), default !important;
    pointer-events: none; font-style: italic;
}

/* --- 21. TRADE --- */
.trade-side  { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.trade-label { font-weight: bold; text-align: center; color: #3e2723; border-bottom: 1px solid #8d6e63; margin-bottom: 5px; }
.trade-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: rgba(0,0,0,0.1); padding: 5px; border-radius: 4px; height: 150px; overflow-y: auto; }
.trade-slot {
    position: relative; width: 44px; height: 44px;
    background: var(--slot-bg); border: 2px solid #3e2723; border-radius: 4px;
    display: flex; justify-content: center; align-items: center; box-shadow: inset 0 0 5px #000;
}
.trade-slot img { width: 34px; height: 34px; pointer-events: none; }
.trade-slot .item-qtd { position: absolute; bottom: 1px; right: 2px; font-size: 10px; color: #fff; text-shadow: 1px 1px 0 #000; font-family: 'Roboto', sans-serif; pointer-events: none; }
.trade-gold-input input { width: 80px; padding: 2px; font-size: 12px; }
.trade-gold-display { font-weight: bold; color: #e65100; margin-top: 5px; }
.trade-status-text { margin-top: auto; text-align: center; font-style: italic; color: #555; font-size: 12px; padding: 5px; background: rgba(0,0,0,0.05); }
.status-locked { color: #2e7d32; font-weight: bold; border: 1px solid #2e7d32; background: #e8f5e9; }

/* --- 22. GRUPO/PARTY --- */
.party-list-container { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.party-member-card { background: rgba(255,255,255,0.5); border: 1px solid #a1887f; border-radius: 4px; padding: 5px; font-family: 'Roboto', sans-serif; position: relative; }
.party-member-card.offline { opacity: 0.6; filter: grayscale(100%); }
.pm-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #3e2723; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 2px; margin-bottom: 2px; }
.pm-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #5d4037; }
.pm-hp-bar { width: 80px; height: 8px; background: #333; border: 1px solid #000; border-radius: 2px; position: relative; overflow: hidden; }
.pm-hp-fill { height: 100%; background: #d32f2f; width: 100%; transition: width 0.2s; }
.leader-icon { color: #ffd700; text-shadow: 1px 1px 0 #000; margin-right: 4px; }
.kick-btn { color: #d32f2f; font-weight: bold; padding: 0 6px; font-family: monospace; font-size: 14px; }
.kick-btn:hover { background-color: #ffcdd2; border-radius: 4px; }

/* --- 23. AMIGOS --- */
.friend-card {
    background: rgba(255,255,255,0.4); border: 1px solid #a1887f; border-radius: 4px;
    padding: 6px; display: flex; justify-content: space-between; align-items: center;
    font-family: 'Roboto', sans-serif; transition: background 0.2s;
    cursor: url('assets/cursors/cursor_default.png'), pointer !important;
}
.friend-card:hover { background: rgba(255,255,255,0.6); }
.friend-info  { display: flex; flex-direction: column; }
.friend-name  { font-weight: bold; font-size: 13px; color: #3e2723; }
.friend-status { font-size: 10px; }
.status-on    { color: #2e7d32; font-weight: bold; }
.status-off   { color: #795548; font-style: italic; }
.friend-remove-btn { color: #c62828; font-weight: bold; padding: 2px 6px; font-size: 14px; }
.friend-remove-btn:hover { background: rgba(255,0,0,0.1); border-radius: 4px; }
.friend-card.friend-offline {
    opacity: 0.6; filter: grayscale(100%);
    cursor: url('assets/cursors/cursor_default.png'), default !important;
}
.friend-card.friend-offline:hover { background: rgba(255,255,255,0.4); }
.empty-list-msg { text-align: center; color: #795548; font-style: italic; margin-top: 20px; padding-bottom: 30px; }

/* --- 24. NOTIFICAÇÕES (TOAST) --- */
#notification-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.rpg-notification {
    background: linear-gradient(to right, #3e2723, #281813);
    border: 2px solid var(--border-gold); border-left: 6px solid;
    color: var(--text-light); padding: 12px 20px; border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    font-family: 'MedievalSharp', cursive; font-size: 16px;
    min-width: 280px; display: flex; align-items: center; gap: 10px;
    text-shadow: 1px 1px 0 #000; animation: slideIn 0.3s ease-out forwards; pointer-events: auto;
}
.rpg-notification.success { border-left-color: #2e7d32; }
.rpg-notification.error   { border-left-color: #c62828; }
.rpg-notification.info    { border-left-color: #0288d1; }

/* --- 25. CAST BAR --- */
#cast-bar-container {
    position: absolute; bottom: 160px; left: 50%; transform: translateX(-50%);
    width: 250px; text-align: center; pointer-events: none; z-index: 200;
}
#cast-name  { color: #ffd700; text-shadow: 1px 1px 0 #000; font-size: 14px; margin-bottom: 2px; }
.cast-frame { width: 100%; height: 14px; background: #222; border: 2px solid #5d4037; border-radius: 7px; overflow: hidden; }
#cast-fill  { width: 0%; height: 100%; background: #ff9800; }

/* --- 26. NÚMEROS DE DANO --- */
#damage-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 50; }

.dmg-popup {
    position: absolute; pointer-events: none;
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; transform: translateX(-50%); will-change: top, left, opacity, transform;
}
.dmg-text {
    font-family: 'Roboto', 'Arial Black', sans-serif; font-weight: 900; font-size: 32px; color: #fff;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
                 -2px 0 0 #000, 2px 0 0 #000, 0 -2px 0 #000, 0 2px 0 #000, 3px 3px 5px rgba(0,0,0,0.5);
    position: relative; z-index: 2;
    animation: textPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes textPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.dmg-miss   { color: #cccccc !important; font-style: italic; font-size: 24px !important; opacity: 0.9; }
.dmg-white  { color: #ffffff !important; font-size: 36px !important; }
.dmg-red    { color: #ff5252 !important; font-size: 36px !important; }
.dmg-yellow { color: #ffea00 !important; font-size: 36px !important; }
.crit-anim .dmg-text { font-size: 42px !important; }

.crit-bg {
    position: absolute; width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(200,0,0,0.9) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
    clip-path: polygon(20% 0%, 30% 30%, 0% 20%, 30% 40%, 0% 60%, 30% 50%, 20% 100%, 50% 70%, 80% 100%, 70% 50%, 100% 60%, 70% 40%, 100% 20%, 70% 30%, 80% 0%, 50% 30%);
    animation: spinCrit 0.15s linear infinite alternate;
}
@keyframes spinCrit { from { transform: rotate(-15deg) scale(1.0); } to { transform: rotate(15deg) scale(1.1); } }

/* --- 27. DRAG GHOST --- */
.drag-ghost {
    position: fixed; width: 44px; height: 44px; pointer-events: none; z-index: 10000; opacity: 0.8;
    background: var(--slot-bg); border: 1px solid #fff; border-radius: 4px;
    display: flex; justify-content: center; align-items: center;
}
.drag-ghost img { width: 34px; height: 34px; }
.highlight-drop-zone { border: 2px dashed #ffd700 !important; background: rgba(255,215,0,0.1) !important; box-shadow: inset 0 0 15px rgba(255,215,0,0.3); }

/* --- 28. DIÁLOGOS --- */
#dialogue-overlay {
    position: absolute; 
    bottom: 150px; 
    left: 50%; 
    transform: translate(-50%, 0);
    width: 600px; 
    
    /* ALTERADO: De 4000 para 25000 para ficar na frente de tudo */
    z-index: 25000; 
    
    pointer-events: none;
}
#dialogue-overlay.system-mode {
    position: fixed; 
    top: 50%; 
    left: 50%; 
    bottom: auto;
    transform: translate(-50%, -50%) !important; 
    
    /* ALTERADO: De 5000 para 25000 */
    z-index: 25000; 
    
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dialogue-box {
    background: rgba(20,10,5,0.95); border: 3px solid #8d6e63; border-radius: 8px;
    padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); color: #fff;
    font-family: 'MedievalSharp', cursive; pointer-events: auto;
}
.dialogue-box.system-style {
    background: rgba(15,15,15,0.98); border: 2px solid #ffd700;
    box-shadow: 0 0 20px rgba(255,215,0,0.15), 0 0 50px rgba(0,0,0,0.9);
    text-align: center; padding: 30px;
}
.dialogue-npc-name { color: #ffd700; font-size: 22px; margin-bottom: 15px; font-weight: bold; text-shadow: 2px 2px 0 #000; text-transform: uppercase; border-bottom: 1px solid rgba(255,215,0,0.2); padding-bottom: 10px; }
.dialogue-text { font-size: 18px; line-height: 1.6; margin-bottom: 25px; color: #ffecb3; }
.system-style .dialogue-text { color: #f5f5f5; font-size: 17px; }
.key-highlight { color: #76ff03; background: rgba(255,255,255,0.1); border: 1px solid rgba(118,255,3,0.4); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-weight: bold; box-shadow: 0 0 5px rgba(118,255,3,0.2); }
.dialogue-options { display: flex; flex-direction: column; gap: 8px; }
.dial-btn {
    background: linear-gradient(to right, #4e342e, #3e2723); border: 1px solid #8d6e63;
    color: #fff; padding: 12px; text-align: left;
    font-size: 16px; border-radius: 4px; transition: all 0.2s; font-family: 'Roboto', sans-serif;
    cursor: url('assets/cursors/cursor_default.png'), pointer !important;
}
.dial-btn:hover { background: linear-gradient(to right, #6d4c41, #4e342e); border-color: #ffd700; padding-left: 15px; box-shadow: 0 0 10px rgba(255,215,0,0.2); }
.dial-btn.disabled {
    opacity: 0.5; filter: grayscale(100%);
    cursor: url('assets/cursors/cursor_default.png'), not-allowed !important;
}
.dial-btn.selected { border: 1px solid #ffd700; color: #ffd700; background: rgba(0,0,0,0.8); transform: scale(1.02); }
.system-style .dialogue-options { flex-direction: row; justify-content: center; }
.system-style .dial-btn { text-align: center; background: linear-gradient(to bottom, #3e2723, #1b0000); border: 1px solid #ffd700; min-width: 150px; }
.system-style .dial-btn:hover { padding-left: 12px; transform: scale(1.05); background: linear-gradient(to bottom, #5d4037, #3e2723); }

/* --- 29. TELA DE NOTÍCIAS --- */
.news-panel-centered { width: 500px; max-height: 80vh; display: flex; flex-direction: column; z-index: 2050; animation: slideDown 0.5s ease-out; }
.news-subtitle { color: #ffd700; font-size: 14px; margin-bottom: 10px; font-family: 'Roboto', sans-serif; text-transform: uppercase; letter-spacing: 2px; }
.news-content-area { background: rgba(0,0,0,0.4); border: 1px solid #5d4037; border-radius: 4px; padding: 20px; height: 300px; overflow-y: auto; text-align: left; font-family: 'Roboto', sans-serif; color: #e0e0e0; margin-bottom: 20px; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.news-content-area h3 { color: #ffb74d; margin-top: 0; }
.news-content-area ul { padding-left: 20px; margin-bottom: 15px; }
.news-content-area li { margin-bottom: 5px; }
.news-footer { display: flex; justify-content: center; }
.news-footer button { width: 200px; font-size: 18px; }

/* --- 30. TELA DE MORTE --- */
#death-screen {
    position: absolute; bottom: 15%; left: 0; width: 100%; height: auto;
    pointer-events: none; display: flex; justify-content: center; align-items: center;
    z-index: 5000; font-family: 'MedievalSharp', cursive;
}
.death-info-container { background: rgba(0,0,0,0.6); padding: 15px 30px; border-radius: 10px; border: 1px solid #535d37; text-align: center; box-shadow: 0 0 15px rgba(0,0,0,0.8); }
.death-status { font-size: 20px; color: #cdef50; margin-bottom: 5px; text-shadow: 1px 1px 0 #000; }
.death-hint   { font-size: 14px; color: #bdbdbd; text-shadow: 1px 1px 0 #000; }

/* --- 31. MENU DE CANTO (VOLUME/LOGOUT) --- */
#corner-menu-container { position: absolute; bottom: 15px; right: 15px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 5000; pointer-events: none; }
#mini-volume-panel {
    background: rgba(20,10,5,0.95); border: 2px solid #5d4037; border-radius: 6px;
    padding: 10px; width: 160px; box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    pointer-events: auto; display: flex; flex-direction: column; gap: 12px;
    animation: fadeInSlide 0.2s ease-out;
}
.vol-group   { display: flex; flex-direction: column; gap: 2px; }
.vol-label   { font-size: 11px; color: #ffd700; font-family: 'Roboto', sans-serif; font-weight: bold; text-transform: uppercase; margin-left: 2px; text-shadow: 1px 1px 0 #000; }
.vol-controls { display: flex; align-items: center; gap: 8px; }
.vol-icon    { font-size: 14px; filter: drop-shadow(1px 1px 0 #000); }
.rpg-range {
    -webkit-appearance: none; width: 100%; height: 6px;
    background: #3e2723; border-radius: 3px; border: 1px solid #5d4037; outline: none;
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
.rpg-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    background: radial-gradient(#ffd700, #ffca28); border: 1px solid #fff; border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.8); margin-top: -1px;
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
.rpg-range::-moz-range-thumb {
    width: 14px; height: 14px; background: radial-gradient(#ffd700, #ffca28);
    border: 1px solid #fff; border-radius: 50%;
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}
.corner-actions { display: flex; align-items: center; gap: 10px; pointer-events: auto; }

/* --- 32. ANIMAÇÕES GLOBAIS --- */
@keyframes fadeIn    { from { opacity: 0; }                  to { opacity: 1; } }
@keyframes slideIn   { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut   { to   { transform: translateX(100%); opacity: 0; } }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeInSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn {
    0%   { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}


/* ============================================================
   SEÇÃO 11. HOTBAR
   ============================================================ */

/* Indicador de Nível na Hotbar (Canto Superior Direito) */
.hotkey-level {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    z-index: 5;
}


/* ============================================================
   SEÇÃO 16. JANELA DE HABILIDADES
   ============================================================ */

.skill-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #8d6e63;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
}

.skill-icon-img {
    width: 100%;
    height: 100%;
    background: #222;
    border: 1px solid #5d4037;
    border-radius: 4px;
    object-fit: cover;
    cursor: url('assets/cursors/cursor_pick.png'), pointer !important;
}

.skill-right-side {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza horizontalmente */
    justify-content: center; /* Centraliza verticalmente no espaço */
    gap: 2px;
    width: 105px; /* Ajustado para caber o botão APRENDER confortavelmente */
    flex-shrink: 0;
}

.skill-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

/* Seletor de Nível (Setinhas) */
.skill-level-selector {
    display: flex;
    align-items: center;
    justify-content: center; /* Garante centralização perfeitamente alinhada com o botão */
    gap: 3px;
    background: none;
    border: none;
    padding: 0;
    width: 100%;
}

/* Texto do nível (ex: Lv: 3 / 10) */
.skill-level-text {
    font-family: 'Roboto', sans-serif;
    color: #2c1b0e;
    font-weight: bold;
    font-size: 12px;
    min-width: 45px; /* Largura fixa para o texto não "pular" quando mudar o número */
    text-align: center;
}

/* Setinhas de navegação de nível */
.skill-arrow {
    font-size: 16px;
    font-weight: bold;
    color: #5d4037;
    padding: 0 4px;
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
    user-select: none;
    transition: transform 0.1s, color 0.1s;
}
.skill-arrow:hover {
    color: #c62828;
    transform: scale(1.2);
}
.skill-arrow:active {
    transform: scale(0.9);
}
.skill-arrow.disabled {
    color: #aaa;
    opacity: 0.5;
    cursor: url('assets/cursors/cursor_default.png'), auto !important;
    transform: none;
}

/* --- SISTEMA DE EMOJIS --- */
#btn-emoji-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    outline: none;
    filter: grayscale(20%);
    transition: filter 0.2s, transform 0.2s;
}

#btn-emoji-toggle:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

#emoji-picker {
    position: absolute;
    bottom: 110%;
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid #5d4037;
    border-radius: 6px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

/* Regra duplicada removida — mantida apenas esta versão completa */
.emoji-picker-item {
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s, background 0.2s;
    pointer-events: none;
}

/* Hover movido para o container (o item tem pointer-events: none) */
.emoji-slot-container:hover .emoji-picker-item {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.1);
}

.floating-emoji-bubble {
    position: absolute;
    width: 48px;
    height: 48px;
    pointer-events: none;
    transform: translate(-50%, -100%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.emoji-slot-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    cursor: grab;
}

.emoji-shortcut-label {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: rgba(0,0,0,0.9);
    border: 1px solid #5d4037;
    color: #ffd700;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 3px;
    pointer-events: none;
    font-weight: bold;
    z-index: 2;
}

.emoji-slot-container.dragging {
    opacity: 0.4;
    transform: scale(0.9);
}

.emoji-slot-container.drag-over {
    background: rgba(255, 215, 0, 0.3);
    border: 1px dashed #ffd700;
}

/* --- MENU DE CONTEXTO DO EMOJI --- */
#emoji-context-menu {
    position: fixed;
    background: rgba(15, 15, 15, 0.98);
    border: 1px solid #5d4037;
    border-radius: 4px;
    padding: 4px 0;
    z-index: 100000;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.9);
    min-width: 110px;
}

.emoji-ctx-header {
    padding: 4px 8px 6px 8px;
    font-size: 10px;
    color: #aaa;
    border-bottom: 1px solid #444;
    text-align: center;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.emoji-ctx-item {
    padding: 6px 12px;
    color: #ffd700;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}

.emoji-ctx-item:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #fff;
}

/* 2. Emojis: Remover a mãozinha branca e forçar o cursor do jogo */
.emoji-slot-container, 
.emoji-picker-item, 
.emoji-ctx-item {
    cursor: url('../assets/cursors/cursor_default.png'), default !important;
}

/* 3. Barra de rolagem do Inventário (e outras janelas) */
/* Isso força o cursor do jogo mesmo quando estiver em cima da scrollbar */
::-webkit-scrollbar {
    cursor: url('../assets/cursors/cursor_default.png'), default !important;
}
::-webkit-scrollbar-thumb {
    cursor: url('../assets/cursors/cursor_default.png'), default !important;
}

/* 4. Janela de Grupos: Checkboxes e Labels */
.social-window input[type="checkbox"],
.social-window label,
.social-window .party-member-card {
    cursor: url('../assets/cursors/cursor_default.png'), default !important;
}

/* 5. Ajuste Geral para botões de fechar (X) e abas que ainda usem ponteiro */
.tab-close, 
.setup-remove-btn, 
.cart-remove-btn,
.local-tab {
    cursor: url('../assets/cursors/cursor_default.png'), default !important;
}


/* BARRA DE DEBUG (CANTO SUPERIOR DIREITO) */
.debug-top-bar {
    position: fixed;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.4); /* Fundo mais transparente e discreto */
    color: #e0e0e0;
    padding: 4px 10px; /* Apenas o tamanho necessário para o texto */
    font-family: monospace;
    font-size: 12px;
    border-radius: 6px; /* Cantos arredondados suaves */
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    pointer-events: none; /* Para não atrapalhar os cliques na tela */
    text-shadow: 1px 1px 1px #000;
}

.debug-top-bar .dbg-sep {
    color: #777;
}

/* No mobile, fica ainda menor e grudado no canto para não atrapalhar */
@media (max-width: 900px) {
    .debug-top-bar {
        font-size: 10px;
        padding: 3px 6px;
        top: 2px;
        right: 2px;
        gap: 4px;
    }
}