html, body { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; padding: 0; font-family: sans-serif; background: #02040b; }
#space-background {
    position: fixed;
    inset: -70%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: #02040b url('./space.svg') center / cover no-repeat;
    transform: translate3d(0, 0, 0) scale(1.05);
    transform-origin: center;
    transition: opacity 400ms ease;
    will-change: transform;
}
#space-background.visible { opacity: 1; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; z-index: 1; }

.coords {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.82); color: white;
    padding: 12px; border-radius: 5px;
    font-family: monospace; 
    font-size: 12px;
    z-index: 3; pointer-events: auto;
    line-height: 1.6;
    min-width: 220px;
}
.coords-header {
    font-weight: bold; font-size: 13px;
    color: #ffcc88; margin-bottom: 6px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none;
}
.coords-content {
    margin-top: 6px;
}
.coords.collapsed .coords-content {
    display: none;
}
.coords .rd-row { line-height: 1.6; }
.coords span { color: #ffddaa; }
.coords .coords-header span { color: #ffcc88; }

.info {
    position: absolute; bottom: 20px; left: 20px;
    background: rgba(0,0,0,0.75); color: white;
    padding: 10px 15px; border-radius: 5px;
    font-size: 12px; z-index: 1; pointer-events: none;
}
.legend {
    position: absolute; bottom: 20px; right: 20px;
    background: rgba(0,0,0,0.82); color: white;
    padding: 12px; border-radius: 5px;
    font-size: 11px; z-index: 1; pointer-events: none;
    line-height: 1.6;
    min-width: 130px;
}
.legend-title { 
    font-weight: bold; margin-bottom: 8px; font-size: 13px;
    color: #ffcc88;
}
.legend-item { 
    display: flex; align-items: center; gap: 8px; margin-bottom: 3px; 
}
.legend-color {
    width: 12px; height: 12px; border-radius: 2px;
    display: inline-block; border: 1px solid rgba(255,255,255,0.3);
}

.controls {
    position: absolute; 
    top: 10px;
    right: 55px;
    background: rgba(0,0,0,0.82); color: white;
    padding: 12px; border-radius: 5px;
    font-size: 12px; z-index: 2;
    width: 210px;
}
.controls-header {
    font-weight: bold; font-size: 13px;
    color: #ffcc88; margin-bottom: 6px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none;
    letter-spacing: 1px;
}
.controls-content {
    display: flex; flex-direction: column; gap: 6px;
}
.controls.collapsed .controls-content {
    display: none;
}
.controls.collapsed .controls-header {
    margin-bottom: 0;
}
.controls label {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; user-select: none;
}
.controls input[type="checkbox"] { cursor: pointer; }
.controls .title {
    font-weight: bold; margin-bottom: 4px; font-size: 13px;
    color: #ffcc88;
}