/* Prisili brskalnik, da vse ploščice zemljevida in glave igralcev ohrani ostro pikslaste */
.leaflet-container img, 
.leaflet-tile, 
.leaflet-tile-container, 
.leaflet-pane img, 
.leaflet-zoom-animated,
.leaflet-image-layer,
.pixelated-tiles,
.player-head {
    image-rendering: -moz-crisp-edges !important;         /* Firefox */
    image-rendering: -webkit-optimize-contrast !important; /* Safari */
    image-rendering: pixelated !important;                 /* Chrome, Edge, Opera */
    image-rendering: crisp-edges !important;                /* Splošna podpora */
    -ms-interpolation-mode: nearest-neighbor !important;   /* IE */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
    font-size: 12px;
    -webkit-font-smoothing: none;
    user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #008080;
}

#map {
    width: 100%;
    height: calc(100% - 28px);
    z-index: 1;
    background-color: #008080 !important;
}

.win95-window {
    position: absolute;
    z-index: 1000;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 2px;
    box-shadow: 1px 1px 0px #000000;
    width: 310px !important;
    display: flex;
    flex-direction: column;
}

/* POPRAVEK: Pravilno in čisto skrivanje okna */
.win95-window.minimized {
    display: none !important;
}

/* POPRAVEK: Prisilimo naslovno vrstico, da je VEDNO vodoravna in se ne zruši */
.win95-titlebar {
    background: linear-gradient(90deg, #000080 0%, #1080d0 100%);
    color: #ffffff;
    padding: 3px 4px;
    font-weight: bold;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    height: 20px;
}

.titlebar-controls {
    display: flex;
    gap: 2px;
}

.win95-titlebar-btn {
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: #000000;
    font-weight: bold;
    font-size: 9px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding-bottom: 2px;
}

.win95-titlebar-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding-top: 1px;
    padding-left: 1px;
}

.win95-content {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-bar {
    top: 40px;
    left: 10px;
}

.sidebar {
    top: 40px;
    right: 10px;
    width: 250px;
    max-height: calc(100% - 100px);
}

.win95-btn {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 4px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #000000;
}

.win95-btn:active, .win95-btn.active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #e0e0e0;
    padding: 5px 9px 3px 11px;
}

.world-switcher {
    display: flex;
    gap: 4px;
    background: transparent;
    padding: 0;
    border: none;
}

.world-btn {
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    background: #c0c0c0;
    color: #000000;
    padding: 4px 12px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
}

.world-btn:active, .world-btn.active {
    background: #d8d8d8;
    border-color: #808080 #ffffff #ffffff #808080;
}

.player-list-container {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    height: 200px;
    width: 100% !important;
    overflow-y: auto;
    padding: 2px;
}

.player-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    cursor: pointer;
}

.player-card:hover {
    background: #000080;
    color: #ffffff;
}

.player-head {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

.player-name {
    font-weight: bold;
    white-space: nowrap;
}

.win95-top-status {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
    z-index: 9999;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
}

.top-status-logo {
    width: 24px;
    height: 24px;
}

.top-status-title {
    font-weight: bold;
    font-size: 13px;
    color: #000000;
    margin-right: 6px;
}

.top-status-graphic {
    flex-grow: 1;
    height: 14px;
    background: linear-gradient(90deg, #000080 0%, #008080 100%);
    border: 1px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.win95-taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px;
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.start-btn {
    font-weight: bold;
    padding: 2px 8px;
}

.start-menu {
    display: none;
    position: absolute;
    bottom: 28px;
    left: 2px;
    width: 220px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    padding: 2px;
}

.start-menu.active {
    display: block;
}

.start-menu-content {
    margin-left: 0px;
}

.start-menu-item {
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    cursor: default;
    border-bottom: 1px dashed #808080;
}

.start-menu-item:last-child {
    border-bottom: none;
}

.start-menu-label {
    font-weight: bold;
    color: #000080;
    margin-bottom: 2px;
}

.start-menu-value {
    color: #000000;
}

.start-menu-value a {
    color: #0000ff;
    text-decoration: underline;
}

.copyable {
    cursor: pointer;
    text-decoration: underline;
    color: #0000ff !important;
}

.has-submenu {
    position: relative;
}

.submenu-arrow {
    float: right;
    font-size: 10px;
}

.start-submenu {
    display: none;
    position: absolute;
    left: 100%;
    bottom: 0;
    width: 240px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10005;
    padding: 2px;
}

.has-submenu:hover .start-submenu {
    display: block;
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-inset-box {
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 2px 6px;
    background: #c0c0c0;
    font-weight: bold;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#coordsDisplay {
    min-width: 110px;
}

#clockDisplay {
    min-width: 65px;
    background: #c0c0c0;
}

.taskbar-window-btn {
    display: none;
    padding: 2px 6px;
    font-weight: bold;
    height: 22px;
}

.taskbar-window-btn.visible {
    display: inline-flex;
}

/* Gumba za zoom */
.leaflet-bottom.leaflet-left {
    left: 10px !important;
    bottom: 44px !important;
}

.leaflet-control-zoom {
    border: none !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaflet-control-zoom-in, .leaflet-control-zoom-out {
    background: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    color: #000000 !important;
    border-radius: 0px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 20px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.leaflet-control-zoom-in:active, .leaflet-control-zoom-out:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
    background: #e0e0e0 !important;
}