html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #050508;
    font-family: 'Segoe UI', 'Roboto', monospace;
    color: #e0e0e0;
}

#app {
    width: 100%;
    height: 100%;
}

#renderCanvas {
    width: 100%;
    height: 100%;
    touch-action: none;
    outline: none;
    display: block;
}

.hud-panel {
    background: rgba(10, 15, 30, 0.65); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 15px;
    pointer-events: auto; 
    transition: all 0.3s ease;
}

.hud-panel:hover {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
    display: grid;
    grid-template-columns: 300px 1fr 300px; 
    grid-template-rows: 80px 1fr 250px; 
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
}

.top-bar {
    grid-column: 1 / -1; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-container {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}
.stat-label {
    font-size: 0.7rem;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-panel {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
}
.detail-key { color: #8899aa; font-size: 0.9rem; }
.detail-val { color: #fff; font-weight: bold; font-family: monospace; font-size: 1rem; }

.radar-container {
    grid-column: 3;
    grid-row: 3;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px; 
    overflow: hidden;
    background-color: rgba(0, 10, 20, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    aspect-ratio: 1 / 1;
    margin: auto;
}

.radar-grid {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 5% 5%;
    z-index: 0;
}

.map-shelf {
    position: absolute;
    background-color: rgba(100, 110, 130, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.map-zone {
    position: absolute;
    border: 2px solid; 
    background-color: rgba(0,0,0,0.5);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.radar-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid white;
    box-shadow: 0 0 8px currentColor;
    z-index: 10; 
    transition: all 0.1s linear;
}

.loading-progress {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.mode-btn {
    width: 100%;
    padding: 10px;
    font-family: 'Segoe UI', monospace;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.btn-auto {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    color: #00ffff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.2);
}

.btn-auto:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px #00ffff;
    text-shadow: 0 0 5px #fff;
}

.btn-manual {
    background: rgba(255, 100, 0, 0.1);
    border: 1px solid #ff6600;
    color: #ff6600;
    box-shadow: 0 0 5px rgba(255, 100, 0, 0.2);
}

.btn-manual:hover {
    background: rgba(255, 100, 0, 0.3);
    box-shadow: 0 0 15px #ff6600;
    text-shadow: 0 0 5px #fff;
}