/* Karakter profili: editordeki oyun paneli (dunya gorunumu + HUD + pencereler). --k = oyun UI olcegi (JS). */
.wl-profile {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--wl-topbar-h, 68px));
    height: calc(100dvh - var(--wl-topbar-h, 68px));
    min-height: 560px;
    max-width: 1920px;
    margin: 0 auto;
    padding: 12px 16px 16px;
    box-sizing: border-box;
}

.wl-profile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: var(--wl-surface, #151821);
    border: 1px solid var(--wl-line, rgba(255,255,255,.07));
    border-radius: 14px;
    box-sizing: border-box;
}

.wl-profile-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wl-profile-avatar {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px;
    background: rgba(216, 54, 27, .14); border: 1px solid rgba(216, 54, 27, .35);
}
.wl-profile-avatar.nation-2 { background: rgba(59, 130, 246, .14); border-color: rgba(59, 130, 246, .4); }
.wl-profile-avatar img { width: 28px; height: 28px; object-fit: contain; }
.wl-profile-id h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; line-height: 1.1; color: #fff; text-transform: none; }
.wl-profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--wl-muted, #8a90a2); font-size: 13px; }
.wl-profile-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.wl-profile-meta b { color: #fff; }
.wl-profile-meta a { color: var(--wl-gold, #e2b65c); }
.wl-profile-meta .fa { color: var(--wl-gold, #e2b65c); }

.wl-profile-keys { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; margin: 0; padding: 0; list-style: none; color: var(--wl-muted, #8a90a2); font-size: 12px; }
.wl-profile-keys li { display: inline-flex; align-items: center; gap: 6px; list-style: none; white-space: nowrap; }
.wl-profile-keys kbd {
    display: inline-flex; align-items: center; gap: 4px; min-width: 24px; height: 24px; padding: 0 7px; justify-content: center;
    border-radius: 6px; background: #1f2433; border: 1px solid rgba(255,255,255,.14); border-bottom-width: 2px;
    box-shadow: none; color: #fff; font: 600 11px/1 var(--wl-font, Inter, sans-serif);
}

/* Sahne: menu + profil seridi disinda kalan ekranin tamami. */
.wl-profile .inv-uif-game-panels {
    flex: 1 1 auto;
    height: auto;
    min-height: 360px;
    border-radius: 14px;
    border-color: rgba(226, 182, 92, .28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

@media (max-width: 1100px) {
    .wl-profile-bar { flex-direction: column; align-items: flex-start; }
    .wl-profile-keys { justify-content: flex-start; }
}
@media (max-width: 640px) {
    .wl-profile { padding: 10px 8px 12px; min-height: 480px; }
    .wl-profile-keys { display: none; }
    .wl-profile .inv-uif-game-panels { min-height: 300px; }
}

.inv-uif-game-panels {
    --k: 1;
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    min-height: 420px;
    /* Ustte durum cubugu (re_hpbar), altta taskbar (re_taskbar_main) icin oyundaki kadar bosluk. */
    padding: calc(104px * var(--k)) 0.5rem calc(64px * var(--k));
    border-radius: 0.4rem;
    background: #0e0c0a;
    border: 1px solid #5c4a30;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

    .inv-uif-game-panels .inv-uif-stage {
        position: relative;
        z-index: 1;
        flex: 0 0 auto;
    }

        .inv-uif-game-panels .inv-uif-stage:last-of-type {
            margin-left: auto;
        }

    /* Dunya gorunumu panelin tam arka plani; UI pencereleri ustunde (oyundaki gibi). */
    .inv-uif-game-panels .inv-world-stage {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

.inv-world-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.inv-hud-hpbar,
.inv-hud-taskbar {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.inv-hud-hpbar {
    top: 0;
    left: 6px;
}

/* Tiklanir (Character / Inventory butonlari); saydam ust kismi pencerelerin altinda kalir. */
.inv-hud-taskbar {
    z-index: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    pointer-events: auto;
}

/* Pencereler oyundaki gibi kapali baslar, taskbar butonlariyla acilir (yerlesim korunur). */
.inv-uif-game-panels .inv-uif-stage.inv-uif-closed {
    visibility: hidden;
}

.inv-uif-game-panels .inv-uif-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: default;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Oyunda VIP (re_cash_warehouse) ekranin sagina yasli, envanterden 37 px yukarida acilir. */
.inv-uif-game-panels .inv-vip-stage {
    position: absolute;
    top: calc(67px * var(--k));
    right: 0.5rem;
    z-index: 2;
}

.char-profile-note {
    position: absolute;
    left: 0;
    right: 0;
    top: 45%;
    z-index: 3;
    margin: 0;
    text-align: center;
    color: #fff;
    font: bold 14px Verdana, Tahoma, sans-serif;
    text-shadow: 0 1px 3px #000;
    pointer-events: none;
}

.char-profile-help {
    margin: 0.5em 0 0;
    text-align: center;
    color: #a89a78;
    font: 11px Verdana, Tahoma, sans-serif;
}
