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

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

body.mobile-zoom-90 {
    zoom: 0.9;
}

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

/* =========================================
   TELA INICIAL
   ======================================== */
#start-screen {
    position: relative;
    width: 100%; height: 100%;
    background:
        radial-gradient(1200px 700px at 70% 20%, rgba(120, 160, 120, 0.18), transparent 60%),
        radial-gradient(900px 600px at 20% 80%, rgba(28, 48, 32, 0.45), transparent 60%),
        linear-gradient(180deg, #0a0f0c 0%, #0f1411 45%, #0a0e0b 100%);
    z-index: 10;
    overflow: hidden;
}

#start-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 8px, rgba(0,0,0,0.03) 8px 16px),
        radial-gradient(600px 300px at 20% 20%, rgba(170, 220, 170, 0.12), transparent 60%),
        radial-gradient(700px 320px at 80% 90%, rgba(28, 48, 32, 0.35), transparent 70%);
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 0;
}

#start-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 180px rgba(0,0,0,0.7);
    pointer-events: none;
    z-index: 1;
}

.start-top-right {
    position: absolute;
    right: 24px;
    top: 52%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 6;
}

.start-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 18px 18px;
    border: 1px solid rgba(120, 160, 120, 0.75);
    background:
        linear-gradient(180deg, rgba(24, 34, 26, 0.95) 0%, rgba(12, 18, 14, 0.95) 100%);
    box-shadow: 0 10px 24px rgba(0,0,0,0.55), inset 0 0 10px rgba(170, 220, 170, 0.08);
    color: #c8e6c0;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    pointer-events: auto;
    text-decoration: none;
    padding: 0;
    appearance: none;
}

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

.start-icon:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(160, 210, 160, 0.95);
    box-shadow: 0 12px 26px rgba(0,0,0,0.65), inset 0 0 14px rgba(170, 220, 170, 0.12);
}

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

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

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

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

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

#game-logo {
    position: absolute;
    top: calc(10% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    text-align: center;
    width: min(520px, 72vw);
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.65));
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
    100% { transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px){
    #game-logo { top: calc(6% + 10px); width: min(420px, 78vw); }
    .start-top-right{ right: 12px; left: auto; }
}

@media (max-width: 900px){
    #bottom-menu-bar{
        left: 50%;
        top: min(calc(clamp(200px, 30vh, 320px) + 260px), 76%);
        transform: translateX(-50%);
        width: 300px;
    }
    #auth-modal{
        justify-content: center;
        align-items: flex-start;
        padding: clamp(200px, 30vh, 320px) 0 0;
    }
    .glass-box{
        width: min(90vw, 360px);
    }
}

@media (max-width: 520px){
    #bottom-menu-bar{
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        top: min(calc(clamp(200px, 30vh, 320px) + 240px), 78%);
    }
    .start-top-right{
        top: auto;
        bottom: 6%;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 10px;
    }
}

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

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

#win-forge {
    display: flex;
    flex-direction: column;
    z-index: 1000;
    position: absolute;
    top: 140px;
    left: calc(50% - 220px);
    width: 440px;
    height: 520px;
    max-width: 94vw;
    max-height: 94vh;
    resize: both;
    overflow: hidden;
}

.forge-tabs {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid #4b6f4b;
}

.forge-tab-btn {
    flex: 1;
    background: rgba(90,74,53,0.35);
    border: 1px solid #4b6f4b;
    color: #d6e8d2;
    font-size: 11px;
    padding: 6px 8px;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.forge-tab-btn.active {
    background: rgba(160,120,60,0.35);
    color: #f5e6c5;
    border-color: #a27a3d;
}

.forge-tab-content {
    flex: 1;
    display: none;
    padding: 10px;
    gap: 10px;
    flex-direction: column;
    overflow: hidden;
}

.forge-tab-content.active {
    display: flex;
}

.forge-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.forge-help {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #8a6a3a;
    color: #f5d76e;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
    background: rgba(0,0,0,0.35);
}

.forge-tooltip {
    position: fixed;
    max-width: 260px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.92);
    border: 1px solid #4b6f4b;
    color: #e6d9c2;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
    pointer-events: none;
    z-index: 2000;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.forge-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.forge-section-title {
    font-size: 11px;
    color: #f5d76e;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.forge-slot-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.forge-slot {
    width: 46px;
    height: 46px;
    border: 1px solid #4b6f4b;
    background: rgba(0,0,0,0.4);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.forge-slot::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,210,120,0.35), transparent 35%),
        radial-gradient(circle at 80% 25%, rgba(255,120,80,0.3), transparent 38%),
        radial-gradient(circle at 30% 80%, rgba(120,190,255,0.35), transparent 40%),
        radial-gradient(circle at 70% 75%, rgba(160,255,180,0.28), transparent 42%);
    opacity: 0.55;
    animation: forgeParticles 6s linear infinite;
    pointer-events: none;
}

.forge-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(170,220,170,0.25) 45%, transparent 80%);
    opacity: 0.6;
    transform: translateX(-120%);
    animation: forgeShimmer 3.8s ease-in-out infinite;
    pointer-events: none;
}

.forge-slot:hover {
    transform: translateY(-1px) scale(1.02);
    border-color: #5e8b5e;
    box-shadow: 0 0 10px rgba(140,200,140,0.35), inset 0 0 8px rgba(0,0,0,0.75);
}

.forge-slot.forge-filled::after {
    opacity: 0.15;
    animation: none;
}

.forge-slot img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.forge-slot .forge-qty {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    color: #f5d76e;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    z-index: 2;
}

.forge-slot-large {
    width: 56px;
    height: 56px;
}

.forge-action-btn {
    background: #4b6f4b;
    color: #ddd0b5;
    border: none;
    padding: 8px 10px;
    font-size: 11px;
    cursor: not-allowed;
    opacity: 0.7;
}

.forge-refine-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 12px;
    height: 100%;
}

.forge-refine-slots,
.forge-refine-list,
.forge-enchant-list,
.forge-enchant-core {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.forge-equip-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    background: rgba(0,0,0,0.35);
    border: 1px solid #4b6f4b;
    min-height: 0;
    max-width: 100%;
}

.forge-equip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    color: #d6e8d2;
    font-size: 11px;
    border-bottom: 1px solid rgba(90,74,53,0.5);
    max-width: 100%;
    overflow: hidden;
}

.forge-equip-row:last-child {
    border-bottom: none;
}

.forge-equip-row div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forge-equip-icon {
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #4b6f4b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forge-equip-icon img {
    max-width: 22px;
    max-height: 22px;
}

.forge-empty-list {
    text-align: center;
    color: #8e8e8e;
    font-size: 11px;
    padding: 10px;
}

.forge-enchant-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
    height: 100%;
}

.forge-star {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.forge-star-slot {
    position: absolute;
}

.forge-star-slot.s1 { top: 0; left: 50%; transform: translateX(-50%); }
.forge-star-slot.s2 { top: 25px; right: 20px; }
.forge-star-slot.s3 { bottom: 25px; right: 20px; }
.forge-star-slot.s4 { bottom: 0; left: 50%; transform: translateX(-50%); }
.forge-star-slot.s5 { bottom: 25px; left: 20px; }
.forge-star-slot.s6 { top: 25px; left: 20px; }

.forge-slot-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

@keyframes forgeParticles {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-6px, 8px) rotate(8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes forgeShimmer {
    0% { transform: translateX(-120%); }
    50% { transform: translateX(20%); }
    100% { transform: translateX(120%); }
}

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

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

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

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

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

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

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

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

#bottom-menu-bar {
    position: absolute;
    left: 50%;
    top: min(calc(clamp(220px, 32vh, 360px) + 280px), 74%);
    transform: translateX(-50%);
    width: 340px;
    height: auto;
    padding: 18px 18px 22px;
    background:
        linear-gradient(180deg, rgba(24, 34, 26, 0.95) 0%, rgba(12, 18, 14, 0.95) 100%);
    border: 1px solid rgba(120, 160, 120, 0.55);
    border-radius: 16px 42px 16px 42px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(0,0,0,0.65), inset 0 0 18px rgba(170, 220, 170, 0.08);
}

#btn-entrar-trigger {
    width: 100%;
    background: linear-gradient(135deg, #4f7a4f 0%, #79a66f 50%, #3f5f3f 100%);
    color: #0f150f;
    border: 1px solid rgba(0,0,0,0.35);
    padding: 14px 20px;
    margin: 0;
    border-radius: 12px 28px 12px 28px;
    font-weight: 700;
    cursor: pointer;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
    pointer-events: auto;
    position: relative;
    z-index: 1001;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55), inset 0 0 10px rgba(170, 220, 170, 0.2);
}

#btn-entrar-trigger:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

#btn-entrar-trigger:active {
    transform: translateY(0);
}

/* --- MODAL LOGIN --- */
#auth-modal {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(220px, 32vh, 360px) 0 0;
    background: rgba(6, 9, 7, 0.7);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

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

#auth-modal .glass-box {
    background:
        linear-gradient(180deg, rgba(24, 34, 26, 0.95) 0%, rgba(12, 18, 14, 0.95) 100%);
    border: 1px solid rgba(120, 160, 120, 0.55);
    padding: 28px 26px 30px;
    border-radius: 18px 50px 18px 50px;
    width: 340px;
    text-align: center;
    color: #e9f4e6;
    box-shadow: 0 22px 48px rgba(0,0,0,0.65), inset 0 0 16px rgba(170, 220, 170, 0.08);
    pointer-events: auto;
    position: relative;
}

#auth-modal .glass-box::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(170, 220, 170, 0.25);
    border-radius: 12px 42px 12px 42px;
    pointer-events: none;
}

#auth-modal .glass-box h2 {
    margin-top: 0;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

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

#auth-modal .glass-box input {
    padding: 11px 12px;
    background: rgba(7, 12, 9, 0.8);
    border: 1px solid rgba(120, 160, 120, 0.45);
    color: #e9f4e6;
    border-radius: 10px 20px 10px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
}

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

#auth-modal .auth-buttons button {
    margin: 6px 0 0;
    padding: 10px 16px;
    border: 1px solid rgba(0,0,0,0.4);
    border-radius: 10px 22px 10px 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 100%;
    box-shadow: 0 10px 22px rgba(0,0,0,0.55), inset 0 0 8px rgba(170, 220, 170, 0.15);
}

#auth-modal #btn-login { background: linear-gradient(135deg, #5f7e59 0%, #8fbf85 100%); color: #0f150f; }
#auth-modal #btn-register { background: linear-gradient(135deg, #2f5f3f 0%, #4f8a5a 100%); color: #f2fff2; }

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

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

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

.hidden { display: none !important; }

/* Bloqueios temporários */
#vip-offer-overlay,
#outfit-overlay,
#esc-menu {
    display: none !important;
}

#mobile-esc-btn {
    display: none !important;
}

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

.game-window::-webkit-resizer {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, rgba(140,200,140,0) 45%, rgba(140,200,140,0.35) 55%, rgba(140,200,140,0.8) 70%);
    border-bottom-right-radius: 6px;
}

.win-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 28px;
    height: 28px;
    cursor: se-resize;
    touch-action: none;
    background: radial-gradient(circle at 70% 70%, rgba(140,200,140,0.9) 0%, rgba(140,200,140,0.6) 30%, rgba(0,0,0,0) 70%);
    z-index: 5;
}
#win-inventory { overflow: hidden; }

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

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

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

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

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

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

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

.window-adjust-dashboard {
    position: fixed;
    top: 12vh;
    right: 16px;
    width: min(360px, 92vw);
    max-height: 78vh;
    background: rgba(11, 7, 3, 0.95);
    border: 2px dashed rgba(140,200,140,0.6);
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 18px 40px rgba(0,0,0,0.75);
    z-index: 36550;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.window-adjust-dashboard .win-header {
    padding-right: 38px;
}

.window-adjust-dashboard-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: #cfe9c9;
    font-size: 18px;
    cursor: pointer;
}

.window-adjust-dashboard-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    font-size: 13px;
}

.window-adjust-dashboard-select {
    width: 100%;
    border-radius: 10px;
    color: #fff;
    padding: 8px 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(140,200,140,0.35);
    font-family: 'Roboto', sans-serif;
}

.window-adjust-slider-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.window-adjust-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cfe9c9;
    letter-spacing: 0.5px;
}

.window-adjust-slider-value {
    font-weight: bold;
    color: #fff;
}

.window-adjust-slider-row input[type="range"],
.window-adjust-slider-row input[type="number"] {
    width: 100%;
}


.window-adjust-dashboard-footer {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.window-adjust-dashboard-footer .esc-menu-close {
    padding: 8px 12px;
    width: auto;
}

@media (max-width: 720px) {
    .window-adjust-dashboard {
        top: 6vh;
        right: 6px;
        width: min(94vw, 340px);
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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

.eq-slot:hover { border-color: #8fbf85; background-color: #141a14; }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.hotkey-slot:hover {
    border-color: #8fbf85;
    background-color: #141a14;
}

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

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

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

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

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

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

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

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

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

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

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

.layer-buttons button:hover, .tileset-buttons button:hover {
    border-color: #7fb07a;
    color: #8fbf85;
}

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

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

#btn-colisao:hover,
#btn-bucket:hover {
    border-color: #7fb07a;
    color: #8fbf85;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

.mobile-controls-hidden .mobile-controls,
.mobile-controls-hidden .mobile-esc-btn,
.mobile-controls-hidden .mobile-inventory-menu {
    display: none !important;
    pointer-events: none !important;
}

.mobile-controls-hidden .joystick,
.mobile-controls-hidden .joystick-base,
.mobile-controls-hidden .joystick-stick,
.mobile-controls-hidden .mobile-actions,
.mobile-controls-hidden .mobile-btn,
.mobile-controls-hidden .mobile-hotkeys,
.mobile-controls-hidden .mobile-hotkey {
    display: none !important;
    pointer-events: none !important;
}

.mobile-controls-hidden:fullscreen .mobile-controls,
.mobile-controls-hidden:fullscreen .mobile-esc-btn,
.mobile-controls-hidden:fullscreen .mobile-inventory-menu,
.mobile-controls-hidden:-webkit-full-screen .mobile-controls,
.mobile-controls-hidden:-webkit-full-screen .mobile-esc-btn,
.mobile-controls-hidden:-webkit-full-screen .mobile-inventory-menu {
    display: none !important;
    pointer-events: none !important;
}

.mobile-controls-hidden:fullscreen .joystick,
.mobile-controls-hidden:fullscreen .joystick-base,
.mobile-controls-hidden:fullscreen .joystick-stick,
.mobile-controls-hidden:fullscreen .mobile-actions,
.mobile-controls-hidden:fullscreen .mobile-btn,
.mobile-controls-hidden:fullscreen .mobile-hotkeys,
.mobile-controls-hidden:fullscreen .mobile-hotkey,
.mobile-controls-hidden:-webkit-full-screen .joystick,
.mobile-controls-hidden:-webkit-full-screen .joystick-base,
.mobile-controls-hidden:-webkit-full-screen .joystick-stick,
.mobile-controls-hidden:-webkit-full-screen .mobile-actions,
.mobile-controls-hidden:-webkit-full-screen .mobile-btn,
.mobile-controls-hidden:-webkit-full-screen .mobile-hotkeys,
.mobile-controls-hidden:-webkit-full-screen .mobile-hotkey {
    display: none !important;
    pointer-events: none !important;
}

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

:root{
  --ui-bg: rgba(12, 18, 14, 0.90);
  --ui-panel: rgba(18, 26, 20, 0.88);
  --ui-panel-strong: rgba(10, 16, 12, 0.94);
  --ui-border: rgba(120, 160, 120, 0.40);        /* verde musgo */
  --ui-border-strong: rgba(140, 200, 140, 0.60);
  --ui-text: #e7f2e4;
  --ui-muted: rgba(220,236,220,0.70);

  --accent: #7fb07a;      /* verde musgo */
  --accent-2: #6b8f6a;    /* verde escuro */
  --accent-3: #8fbf85;    /* verde claro */
  --info: #6aa07a;        /* verde info */

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

  --radius: 10px;
}

html, body{
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(140, 200, 140, 0.10), transparent 60%),
    radial-gradient(900px 520px at 80% 0%, rgba(90, 130, 90, 0.10), transparent 55%),
    linear-gradient(180deg, #090d0a 0%, #0e1411 45%, #090d0a 100%) !important;
  color: var(--ui-text);
}

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

/* Título */
#game-title{
  color: #f6fff2 !important;
  text-shadow:
    0 4px 0 rgba(0,0,0,0.85),
    0 10px 24px rgba(0,0,0,0.85),
    0 0 26px rgba(140, 200, 140, 0.35) !important;
  letter-spacing: 1px;
}

/* Painel de entrada */
#bottom-menu-bar{
  background: linear-gradient(180deg, rgba(24, 34, 26, 0.95) 0%, rgba(12, 18, 14, 0.95) 100%) !important;
  border: 1px solid rgba(120, 160, 120, 0.55) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65), inset 0 0 18px rgba(170, 220, 170, 0.08) !important;
}

/* Botão Entrar */
#btn-entrar-trigger{
  background: linear-gradient(135deg, #4f7a4f 0%, #79a66f 50%, #3f5f3f 100%) !important;
  color: #0f150f !important;
  border: 1px solid rgba(0,0,0,0.35) !important;
  border-radius: 12px 28px 12px 28px !important;
  box-shadow: 0 12px 26px rgba(0,0,0,0.55), inset 0 0 10px rgba(170, 220, 170, 0.2) !important;
}
#btn-entrar-trigger:hover{
  filter: brightness(1.05);
  transform: translateY(-2px) !important;
}
#btn-entrar-trigger:active{
  transform: translateY(0px) !important;
}

/* Modal */
#auth-modal{
  background: rgba(6, 9, 7, 0.7) !important;
  backdrop-filter: blur(2px);
}
#auth-modal .glass-box{
  background: linear-gradient(180deg, rgba(24, 34, 26, 0.95) 0%, rgba(12, 18, 14, 0.95) 100%) !important;
  border: 1px solid rgba(120, 160, 120, 0.55) !important;
  border-radius: 18px 50px 18px 50px !important;
  box-shadow: 0 22px 48px rgba(0,0,0,0.65), inset 0 0 16px rgba(170, 220, 170, 0.08) !important;
}
#auth-modal .glass-box input{
  background: rgba(7, 12, 9, 0.8) !important;
  border: 1px solid rgba(120, 160, 120, 0.45) !important;
  border-radius: 10px 20px 10px 20px !important;
  color: #e9f4e6 !important;
}
#auth-modal .glass-box input:focus{
  outline: none !important;
  border-color: rgba(140, 200, 140, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(140, 200, 140, 0.15) !important;
}

/* Abas de login/registro */
#auth-modal .auth-tabs{
  display: flex;
  gap: 8px;
  margin: 8px 0 12px 0;
}
#auth-modal .auth-tab-btn{
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(120, 160, 120, 0.45);
  background: rgba(7, 12, 9, 0.6);
  color: #d6e8d2;
  border-radius: 12px 22px 12px 22px;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  letter-spacing: 0.5px;
}
#auth-modal .auth-tab-btn.active{
  background: linear-gradient(135deg, #5e8b5e 0%, #8abf86 100%);
  color: #0f150f;
  border-color: rgba(140, 200, 140, 0.8);
}
.auth-tab-panel{
  display: block;
}

/* Botões auth */
#btn-login{
  background: linear-gradient(135deg, #6f8a4a 0%, #9ab66a 100%) !important;
  color: #15120c !important;
  border-radius: 10px 22px 10px 22px !important;
}
#btn-register{
  background: linear-gradient(135deg, #8f2f2a 0%, #c1564a 100%) !important;
  color: #fff5e6 !important;
  border-radius: 10px 22px 10px 22px !important;
}
#auth-modal .auth-buttons button:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

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

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

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

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

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

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

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

.esc-menu {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 9, 0.8);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 14000;
}
.esc-menu.hidden { display: none; }
.esc-menu-card {
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(900px 520px at 10% 10%, rgba(130, 190, 140, 0.08), transparent 55%),
    linear-gradient(160deg, rgba(18, 28, 22, 0.96), rgba(10, 16, 12, 0.96));
  border: 1px solid rgba(140, 200, 140, 0.18);
  border-radius: 0;
  padding: 12px;
  color: #e7f2e4;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
}
.esc-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 4px 10px;
  border-bottom: 1px solid rgba(140, 200, 140, 0.18);
}
.esc-menu-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.8px;
  color: #eaf8e7;
}
.esc-menu-close-top {
  width: auto;
  padding: 8px 14px;
  font-size: 12px;
  background: linear-gradient(135deg, rgba(70, 110, 78, 0.9), rgba(48, 78, 54, 0.9));
  border: 1px solid rgba(140, 200, 140, 0.45);
  color: #f3fff1;
  border-radius: 10px 20px 10px 20px;
}
.esc-menu-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr minmax(200px, 24vw);
  gap: 14px;
  grid-template-areas: "content menu";
}
.esc-menu-right {
  grid-area: content;
  display: grid;
  gap: 12px;
  height: 100%;
  overflow: auto;
  align-content: start;
  padding-bottom: 24px;
  background: rgba(10, 16, 12, 0.5);
  border: 1px solid rgba(140, 200, 140, 0.18);
  border-radius: 14px;
  padding: 12px;
}
.esc-tab-panel {
  display: none;
  grid-auto-rows: min-content;
  gap: 10px;
  min-height: 0;
  height: 100%;
  grid-template-rows: min-content 1fr;
  overflow: auto;
}
.esc-tab-panel.active {
  display: grid;
}
.esc-tab-title {
  font-size: 14px;
  font-weight: bold;
  color: rgba(232, 246, 230, 0.9);
  letter-spacing: 0.3px;
}
.esc-menu-action {
  width: 100%;
  background: rgba(120, 160, 120, 0.12);
  border: 1px solid rgba(140, 200, 140, 0.25);
  color: #e7f2e4;
  padding: 10px 12px;
  border-radius: 10px 20px 10px 20px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.esc-menu-action:hover {
  color: #eaffea;
  text-shadow: 0 0 6px rgba(140, 200, 140, 0.45);
}
.esc-pvp-toggle.is-on {
  background: rgba(80, 150, 95, 0.22);
  border-color: rgba(140, 200, 140, 0.65);
  color: #eaffea;
}
.esc-pvp-toggle.is-off {
  background: rgba(80, 110, 88, 0.2);
  border-color: rgba(120, 160, 120, 0.55);
  color: #d9f0d6;
}
.esc-tab-dock {
  min-height: 160px;
  background: rgba(6, 10, 8, 0.45);
  border: 1px solid rgba(140, 200, 140, 0.18);
  border-radius: 12px;
  padding: 0;
  overflow: auto;
  height: 100%;
}
.esc-tab-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.esc-tab-split.bank-active {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.esc-bank-dock.hidden {
  display: none;
}
.esc-menu-link.active {
  color: #eaffea;
  text-shadow: 0 0 6px rgba(140, 200, 140, 0.45);
}
.esc-docked {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  resize: none !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow: auto !important;
  transform: none !important;
}
.esc-docked .win-header {
  cursor: default;
}
.esc-docked .win-resize-handle {
  display: none;
}
#rankings-box.esc-docked {
  max-height: none !important;
  display: flex !important;
  flex-direction: column;
  padding: 12px;
  box-sizing: border-box;
}
#rankings-box.esc-docked .rankings-tabs {
  flex: 0 0 auto;
}
#rankings-box.esc-docked .rankings-panel {
  flex: 1 1 auto;
  max-height: none;
}
.esc-tab-dock > .game-window {
  width: 100% !important;
  max-width: 100% !important;
}
#rankings-box.esc-docked {
  width: 100% !important;
  height: 100% !important;
}
.esc-menu-list {
  grid-area: menu;
  display: grid;
  gap: 8px;
  margin: 0;
  height: 100%;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(140, 200, 140, 0.18);
  background: rgba(8, 14, 10, 0.6);
  border-radius: 14px;
}
.esc-menu-link {
  background: rgba(120, 160, 120, 0.12);
  border: 1px solid rgba(140, 200, 140, 0.22);
  color: #e7f2e4;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 10px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px 18px 10px 18px;
}
.esc-menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.esc-menu-text {
  white-space: nowrap;
}
.esc-menu-link[data-esc-tab="settings"] {
  display: block;
}
.esc-menu-link:hover {
  color: #eaffea;
  text-shadow: 0 0 6px rgba(140, 200, 140, 0.45);
}
.esc-menu-link:active {
  transform: translateX(2px);
}

.inv-slot.drag-hover {
  outline: 2px solid rgba(255, 209, 102, 0.8);
  outline-offset: -2px;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.4);
}

.mobile-hotkey.drag-hover {
  outline: 2px solid rgba(56, 189, 248, 0.9);
  outline-offset: -2px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.esc-menu-row {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 12px;
}
.esc-menu-row label {
  color: rgba(224, 244, 224, 0.75);
}
.esc-menu-buttons {
  display: flex;
  gap: 8px;
}
.esc-gfx-btn {
  flex: 1;
  background: rgba(120, 160, 120, 0.12);
  border: 1px solid rgba(140, 200, 140, 0.25);
  color: #e7f2e4;
  padding: 8px 10px;
  border-radius: 10px 18px 10px 18px;
  cursor: pointer;
  font-size: 12px;
}
.esc-gfx-btn.active {
  background: linear-gradient(135deg, #5e8b5e, #8abf86);
  color: #0f150f;
  border-color: rgba(0,0,0,0.35);
  font-weight: bold;
}
.esc-menu-close {
  width: 100%;
  background: linear-gradient(135deg, #5e8b5e, #8abf86);
  border: 1px solid rgba(0,0,0,0.35);
  color: #0f150f;
  font-weight: bold;
  padding: 10px 12px;
  border-radius: 12px 24px 12px 24px;
  cursor: pointer;
}
#esc-rankings-btn {
  display: none;
}

body.esc-open .mobile-controls,
body.esc-open .mobile-esc-btn,
body.esc-open .mobile-inventory-menu {
  display: none !important;
  pointer-events: none !important;
}

body.esc-classic .esc-menu-body {
  grid-template-columns: 1fr !important;
}
body.esc-classic .esc-menu-right {
  margin-top: 12px;
}
body.esc-classic .esc-tab-panel {
  display: none;
}
body.esc-classic .esc-tab-panel[data-esc-panel="settings"] {
  display: grid;
}

@media (max-width: 900px) {
  .esc-menu-card {
    padding: 10px;
  }

  .esc-menu-header {
    margin-bottom: 8px;
  }

  .esc-menu-title {
    font-size: 20px;
    letter-spacing: 0.4px;
  }

  .esc-menu-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "menu"
      "content";
    gap: 10px;
  }

  .esc-menu-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    background: linear-gradient(180deg, rgba(10, 16, 12, 0.9), rgba(6, 10, 8, 0.9));
    overflow-x: auto;
    overflow-y: hidden;
  }

  .esc-menu-link {
    background: rgba(120, 160, 120, 0.14);
    border: 1px solid rgba(140, 200, 140, 0.3);
    border-radius: 12px 18px 12px 18px;
    padding: 8px 10px;
    font-size: 12px;
    text-align: left;
    min-height: 40px;
    justify-content: flex-start;
  }

  .esc-menu-link.active {
    background: linear-gradient(135deg, rgba(120, 180, 120, 0.35), rgba(80, 140, 90, 0.25));
    border-color: rgba(140, 200, 140, 0.6);
    color: #eaffea;
  }

  .esc-menu-right {
    background: rgba(8, 12, 10, 0.4);
    border: 1px solid rgba(140, 200, 140, 0.18);
    border-radius: 12px;
    padding: 12px;
    gap: 12px;
    max-height: none;
    height: 100%;
  }

  .esc-tab-title {
    font-size: 15px;
  }

  .esc-menu-icon {
    font-size: 16px;
    width: auto;
  }

  .esc-menu-text {
    display: inline;
  }

  .esc-menu-action,
  .esc-gfx-btn,
  .esc-menu-close {
    font-size: 14px;
    padding: 12px 14px;
  }

  .esc-menu-close-top {
    padding: 8px 12px;
  }

  .esc-menu-buttons {
    gap: 10px;
  }

  .esc-tab-dock {
    min-height: 200px;
  }
}

@media (max-width: 900px) {
  #win-party {
    width: min(220px, 64vw);
    max-height: 45vh;
    top: 70px;
    right: 10px;
    --party-scale: 0.85;
  }
}
@media (max-width: 1024px) {
  .vip-offer-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 720px) {
  .vip-offer-overlay {
    align-items: flex-start;
    padding: 12px;
  }
  .vip-offer-grid {
    grid-template-columns: 1fr;
    width: min(360px, 90vw);
    max-height: 88vh;
    overflow-y: auto;
    padding: 6px 0;
  }
  .vip-offer-close {
    top: 6px;
    right: 6px;
  }
  .vip-offer-card {
    padding: 12px;
    border-radius: 10px;
    margin: 0 auto;
    width: min(100%, 340px);
    background: linear-gradient(165deg, rgba(14,18,28,0.98), rgba(4,6,12,0.98));
    box-shadow: 0 20px 34px rgba(0,0,0,0.55);
  }
  .vip-offer-badge {
    padding: 2px 10px;
    font-size: 11px;
  }
  .vip-offer-title {
    font-size: 18px;
  }
  .vip-offer-subtitle {
    font-size: 11px;
  }
  .vip-offer-price {
    font-size: 16px;
  }
  .vip-offer-list {
    max-height: 120px;
    font-size: 10px;
  }
  .vip-offer-buy {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
  }
}

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

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

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

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

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

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

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

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

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

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

/* Zone */
.zone-text{
  color: #e3f7de !important;
  text-shadow:
    0 14px 28px rgba(0,0,0,0.85),
    0 0 16px rgba(140,200,140,0.22) !important;
}


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


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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

.hud-bar{
    position: relative;
    height: 18px;
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(19,26,20,0.95), rgba(8,12,9,0.95));
    border: 1px solid rgba(140,200,140,0.28);
    overflow: hidden;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.06),
        inset 0 -2px 0 rgba(0,0,0,0.45),
        0 6px 14px rgba(0,0,0,0.45);
}

.hud-bar::before{
    content: '';
    position: absolute;
    inset: 2px 4px;
    border-radius: 4px;
    border: 1px solid rgba(140,200,140,0.12);
    opacity: 0.9;
    pointer-events: none;
}

.hud-bar::after{
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 4px, rgba(255,255,255,0.0) 4px 8px);
    mix-blend-mode: screen;
    opacity: 0.4;
    pointer-events: none;
}

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

.hud-bar.hud-hp .hud-bar-fill{
    background:
        linear-gradient(180deg, rgba(188,36,36,0.98), rgba(126,18,18,0.98)),
        linear-gradient(90deg, rgba(255,140,140,0.35), rgba(255,255,255,0.0));
    box-shadow:
        inset 0 0 10px rgba(0,0,0,0.35),
        0 0 16px rgba(188,36,36,0.32);
}

.hud-bar.hud-hp.poisoned .hud-bar-fill{
    background:
        linear-gradient(180deg, rgba(24,140,98,0.98), rgba(10,96,66,0.98)),
        linear-gradient(90deg, rgba(140,255,210,0.25), rgba(255,255,255,0.0));
    box-shadow:
        inset 0 0 10px rgba(0,0,0,0.35),
        0 0 16px rgba(16,185,129,0.35);
}

.hud-bar.hud-mp .hud-bar-fill{
    background:
        linear-gradient(180deg, rgba(46,110,122,0.98), rgba(18,70,78,0.98)),
        linear-gradient(90deg, rgba(120,220,210,0.28), rgba(255,255,255,0.0));
    box-shadow:
        inset 0 0 10px rgba(0,0,0,0.35),
        0 0 16px rgba(46,110,122,0.38);
}

.hud-bar .hud-bar-text{
    position: relative;
    z-index: 2;
    font-family: 'Cinzel', serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(210,238,210,0.95);
    text-shadow:
        1px 1px 0 rgba(0,0,0,0.9),
        0 0 6px rgba(140,200,140,0.25);
    text-align: center;
    line-height: 18px;
}

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

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

/* === NOVA IDENTIDADE DAS JANELAS (INV/EQP/HOTKEYS/SKILLS) === */
#win-inventory,
#win-skills,
#win-equipment,
#win-hotbar{
    background:
        linear-gradient(160deg, rgba(20,30,22,0.96), rgba(10,14,11,0.96)),
        repeating-linear-gradient(135deg, rgba(200,230,205,0.05) 0 2px, rgba(0,0,0,0.04) 2px 4px);
    border: 1px solid rgba(120,170,130,0.45);
    border-radius: 14px;
    box-shadow: 0 18px 28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(180,220,190,0.08);
    font-family: 'Cormorant Garamond', serif;
}

#win-inventory .win-header,
#win-skills .win-header,
#win-equipment .win-header,
#win-hotbar .win-header{
    background: linear-gradient(90deg, rgba(26,38,28,0.98), rgba(52,78,58,0.98), rgba(26,38,28,0.98));
    border-bottom: 1px solid rgba(120,170,130,0.45);
    border-radius: 12px 12px 6px 6px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0,0,0,0.9);
}

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

#win-inventory #inventory-grid{
    background: radial-gradient(circle at top, rgba(200,230,205,0.06), rgba(0,0,0,0) 60%);
}

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

#win-inventory .inv-slot:hover,
#win-hotbar .inv-slot:hover{
    border-color: rgba(140,200,140,0.9);
    background: radial-gradient(circle at 30% 25%, rgba(170,220,170,0.16), rgba(10,12,10,0.92));
}

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

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

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

#win-equipment .eq-grid{
    background: radial-gradient(circle at top, rgba(200,230,205,0.08), rgba(0,0,0,0.4));
    border: 1px dashed rgba(120,170,130,0.25);
    border-radius: 10px;
}

#win-equipment .eq-slot{
    background: radial-gradient(circle at 30% 25%, rgba(170,220,170,0.1), rgba(10,12,10,0.92));
    border: 1px solid rgba(120,170,130,0.55);
    border-radius: 10px;
}

#win-equipment .eq-slot:hover{
    border-color: rgba(140,200,140,0.9);
    background: radial-gradient(circle at 30% 25%, rgba(170,220,170,0.18), rgba(10,12,10,0.95));
}

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

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

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

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



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