* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}
body {
    background: #11161d;
    overflow: hidden;
    display: flex;
    height: 100vh;
    color: white;
}
.sidebar {
    width: 320px;
    background: #1b232d;
    border-right: 1px solid rgba(255,255,255,.05);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(25px);
    box-shadow: 0 0 30px rgba(0,0,0,.6);
    z-index: 10;
}
.logo {
    padding: 30px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo h1 {
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: 2px;
}
.logo button {
    width: 100%;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    background: #f7b500;
    color: #111;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    transition: .25s;
}
.logo button:hover {
    transform: translateY(-2px);
    background: #ffd54a;
}
#search {
    margin: 20px;
    padding: 14px;
    border: none;
    outline: none;
    border-radius: 10px;
    background: #2b3644;
    color: white;
    font-size: 16px;
}
#search::placeholder {
    color: #8892a3;
}
#mapList {
    overflow-y: auto;
    flex: 1;
}
#mapList::-webkit-scrollbar {
    width: 7px;
}
#mapList::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 20px;
}
.map {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: .25s;
    background: transparent;
}
.map:hover {
    background: #2d3948;
}
.map.active {
    background: #f7b500;
    color: black;
}
.map img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}
.map span {
    font-size: 18px;
    font-weight: 600;
}
.viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #0f141b;
}
.toolbar {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    background: #1b232d;
}
.toolbar button {
    border: none;
    cursor: pointer;
    background: #2b3644;
    color: white;
    padding: 12px 22px;
    border-radius: 10px;
    transition: .25s;
    font-size: 15px;
}
.toolbar button:hover {
    background: #f7b500;
    color: black;
}
#imageContainer {
    flex: 1;
    overflow: hidden;
    position: relative;
    cursor: grab;
    background: radial-gradient(circle at center, #29303b 0%, #151b22 70%);
}

/* ===== NEU: Gemeinsamer Layer für Bild + Marker ===== */
#mapLayer {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}
#mapLayer img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    pointer-events: none;
    user-select: none;
}
#markers {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}
.marker {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffb400;
    border: 3px solid white;
    box-shadow: 0 0 15px orange;
    transform: translate(-50%, -50%);
}
.markerText {
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 13px;
    transform: translate(-50%, 12px);
    text-shadow: 0 0 8px black;
    white-space: nowrap;
}

#grid {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 50px 50px;
}
#status {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    pointer-events: none;
    z-index: 200;
}
.leftTools, .rightTools {
    display: flex;
    gap: 10px;
}
.title {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.title h2 {
    font-size: 26px;
    letter-spacing: 2px;
    font-weight: 700;
    color: white;
}