:root {
    --bg-color: #050505;
    --primary-color: #ffb000;
    --dim-color: #594000;
    --alert-color: #ff3300;
    --font-main: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    text-transform: uppercase;
}

/* CRT Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
}

.scanline {
    width: 100%;
    height: 10px;
    background: rgba(255, 176, 0, 0.1);
    opacity: 0.1;
    position: fixed;
    animation: scanline 6s linear infinite;
    pointer-events: none;
    z-index: 998;
}

@keyframes scanline {
    0% { top: -10%; }
    100% { top: 110%; }
}

/* Layout */
#interface {
    display: grid;
    grid-template-rows: 60px 1fr;
    grid-template-columns: 1fr 300px;
    height: 100vh;
    border: 2px solid var(--dim-color);
    margin: 10px;
    position: relative;
    z-index: 10;
}

header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 2px solid var(--dim-color);
    background: rgba(255, 176, 0, 0.05);
}

h1 {
    font-size: 24px;
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--primary-color);
}

#clock {
    font-size: 20px;
}

#map-container {
    grid-column: 1 / 2;
    position: relative;
    border-right: 2px solid var(--dim-color);
}

#map {
    width: 100%;
    height: 100%;
    background: #000;
}

/* Map Customization */
.leaflet-tile-pane {
    filter: grayscale(100%) sepia(100%) hue-rotate(5deg) saturate(300%) contrast(1.2) brightness(0.7);
}

.leaflet-control-attribution {
    background: none !important;
    color: var(--dim-color) !important;
}

.leaflet-control-attribution a {
    color: var(--dim-color) !important;
}

/* Sidebar */
#telemetry {
    grid-column: 2 / 3;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.panel {
    border: 1px solid var(--primary-color);
    padding: 15px;
    box-shadow: 0 0 10px rgba(255, 176, 0, 0.1) inset;
}

h2 {
    font-size: 16px;
    border-bottom: 1px solid var(--dim-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.label {
    color: var(--dim-color);
}

.value {
    text-shadow: 0 0 2px var(--primary-color);
}

.log {
    font-size: 12px;
    color: var(--dim-color);
    line-height: 1.4;
    height: 150px;
    overflow-y: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    #interface {
        grid-template-columns: 1fr;
        grid-template-rows: 50px 1fr 200px;
    }
    
    #map-container {
        grid-column: 1 / -1;
        border-right: none;
        border-bottom: 2px solid var(--dim-color);
    }
    
    #telemetry {
        grid-column: 1 / -1;
        overflow-y: auto;
    }
}
