body, html {
    margin: 0; padding: 0; height: 100%; width: 100%;
    font-family: 'Arial', sans-serif; overflow: hidden; background-color: #333;
}

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

#search-container {
    position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
    z-index: 1000; display: flex; flex-direction: column; gap: 8px; 
    background: rgba(15, 23, 42, 0.95); border: 1px solid #374151;
    padding: 12px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    width: 90%; max-width: 420px; transition: all 0.3s ease;
}

.search-row { display: flex; gap: 6px; width: 100%; }

#dest-input { 
    flex-grow: 1; padding: 12px; border: 1px solid #4b5563; 
    border-radius: 6px; font-size: 16px; background: #1f2937; color: white;
}
#dest-input:focus { outline: none; border-color: #00e5ff; }

#btn-open-shortcuts {
    width: 100%; padding: 12px; border: 1px solid #4b5563;
    border-radius: 6px; font-size: 15px; background: #1f2937; color: #00e5ff;
    font-weight: bold; cursor: pointer; text-align: left; transition: 0.2s;
}
#btn-open-shortcuts:active { background: #374151; }
#btn-route { background-color: #28a745; padding: 10px 20px; color: white; border: none; border-radius: 6px; font-weight: bold; font-size: 16px;}

/* HUD Layout */
#hud {
    position: absolute; top: 140px; left: 15px; z-index: 1000; pointer-events: none;
    display: flex; flex-direction: column; gap: 15px; transition: top 0.4s ease;
}

.tactical-box {
    background: rgba(10, 15, 25, 0.9); border: 2px solid #00e5ff;
    border-radius: 16px; padding: 15px 20px; color: white;
    box-shadow: 0 4px 20px rgba(0,229,255,0.3);
    display: flex; align-items: center; gap: 20px; min-width: 250px;
}

/* Pfeil-Container Skalierung & Glow */
.turn-icon { width: 75px; height: 75px; display: flex; align-items: center; justify-content: center; }
.turn-icon svg { width: 100%; height: 100%; filter: drop-shadow(0px 0px 6px rgba(0,229,255,0.8)); }

.distance-text { font-size: 42px; font-weight: 900; color: #00ff9d; font-family: monospace; line-height: 1; }
.instruction-text { font-size: 20px; color: #fff; margin-top: 8px; font-weight: bold; text-transform: uppercase; }

/* Verkehrsschilder-Leiste */
.signs-panel { display: flex; gap: 15px; }
.traffic-sign { box-shadow: 0 5px 15px rgba(0,0,0,0.4); display: flex; justify-content: center; align-items: center; }

.speed-sign {
    width: 75px; height: 75px; background: white; color: black; border: 8px solid #d3212c;
    border-radius: 50%; font-size: 28px; font-weight: 900; font-family: 'Arial Black', sans-serif;
}

/* Das neue, dunkle Gefahrenmodul-Gehäuse */
.hazard-sign-box {
    width: 85px; height: 85px; background: rgba(10, 15, 25, 0.95);
    border: 2px solid #374151; border-radius: 14px;
    flex-direction: column; padding: 5px; box-sizing: border-box;
}
.hazard-icon { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
.hazard-icon svg { width: 100%; height: 100%; }
.hazard-text { font-size: 9px; font-weight: 900; letter-spacing: 0.5px; margin-top: 3px; text-transform: uppercase; }

/* Buttons unten */
#controls { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; gap: 10px; width: 90%; justify-content: center; pointer-events: auto; }
button { padding: 12px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; font-weight: bold; }
button:active { background-color: #0056b3; }
.hidden { display: none !important; }

/* Overlay Popups */
#live-poi-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 3000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.live-poi-box { background: #111827; border: 2px solid #00e5ff; border-radius: 16px; padding: 20px; width: 90%; max-width: 380px; box-shadow: 0 0 30px rgba(0,229,255,0.2); }
.poi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.poi-cat-btn { background: #1f2937; border: 1px solid #374151; color: white; padding: 15px 10px; border-radius: 8px; font-size: 14px; text-align: center; transition: all 0.2s; }
.poi-cat-btn.active { background: #00e5ff; color: #000; border-color: #00e5ff; transform: scale(1.05); }
.poi-input { width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 6px; background: #374151; color: white; border: 1px solid #4b5563; font-size: 16px; box-sizing: border-box; }
.poi-input:focus { outline: none; border-color: #00ff9d; }

#shortcut-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 4000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.shortcut-box { background: #111827; border: 2px solid #00e5ff; border-radius: 16px; width: 90%; max-width: 400px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,229,255,0.2); overflow: hidden; }
.shortcut-header { padding: 15px 20px; background: #1f2937; border-bottom: 1px solid #374151; display: flex; justify-content: space-between; align-items: center; }
.shortcut-header h2 { margin: 0; color: #00ff9d; font-size: 18px; text-transform: uppercase; font-weight: 900;}
.btn-close-shortcuts { background: transparent; color: #ef4444; font-size: 24px; border: none; padding: 0; margin: 0; line-height: 1; cursor: pointer; }
.shortcut-list { padding: 15px; overflow-y: auto; flex-grow: 1; display: flex; flex-direction: column; gap: 10px; }
.shortcut-category { color: #9ca3af; font-size: 11px; text-transform: uppercase; border-bottom: 1px solid #374151; padding-bottom: 4px; margin-top: 10px; font-weight: bold; letter-spacing: 1px; }
.shortcut-category:first-child { margin-top: 0; }
.shortcut-item { background: #1f2937; border: 1px solid #374151; padding: 15px; border-radius: 8px; color: white; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.shortcut-item:active { background: #00e5ff; color: #000; border-color: #00e5ff; transform: scale(0.98); }

/* Hilfsklasse zum horizontalen Spiegeln rechter Pfeile */
.mirror-svg { transform: scaleX(-1); }