body {
    margin: 0;
    padding: 0;
}

#map {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

canvas {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;  /* Change back to none to allow map interaction */
    background: transparent;
    cursor: default;     /* Remove crosshair cursor */
}

#controlPanel {
    position: fixed;     /* Change to fixed positioning */
    top: 20px;
    right: 20px;
    z-index: 1000;       /* Highest z-index */
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    min-width: 150px;    /* Ensure minimum width */
}

#autoMode {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

#autoMode:hover {
    background: #2980b9;
}

#mapStyle {
    background: #333;
    color: white;
    border: 1px solid #666;
    padding: 5px;
}

#flightMode {
    margin-top: 10px;
    text-align: center;
    font-family: monospace;
    font-weight: bold;
}

#hud {
    position: fixed;     /* Change to fixed positioning */
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.hud-element {
    position: fixed;     /* Change to fixed positioning */
    border: 2px solid rgba(52, 152, 219, 0.8);
    background: rgba(0, 0, 0, 0.5);
    color: cyan;
    font-family: monospace;
    padding: 5px;
}

#attitude-indicator {
    left: 20px;
    bottom: 20px;  /* Change from top: 50% to bottom positioning */
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(52, 152, 219, 0.8);
}

#compass {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    background: rgba(0, 0, 0, 0.7);
}

#altitude-tape {
    right: 20px;
    top: 20px;
    width: 150px;  /* Match other elements width */
    height: 50px;  /* Match speed tape height */
    text-align: center;
    line-height: 25px;
    background: rgba(0, 0, 0, 0.7);
}

#speed-tape {
    left: 20px;
    top: 20px;     /* Move to top instead of center */
    width: 150px;  /* Match attitude indicator width */
    height: 50px;  /* Reduce height */
    text-align: center;
    line-height: 25px;
    background: rgba(0, 0, 0, 0.7);
}

.search-container {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

#locationSearch {
    flex: 1;
    padding: 5px;
    background: #333;
    border: 1px solid #666;
    color: white;
    border-radius: 4px;
}

#searchButton {
    padding: 5px 10px;
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

#searchButton:hover {
    background: #2980b9;
}