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

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0C1222;
    color: #C8D6E5;
    overflow-x: hidden;
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0C1222;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

#boot-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.boot-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.boot-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #00E676;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.boot-line.visible {
    opacity: 1;
}

/* Sidebar */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: #141E33;
    border-right: 1px solid rgba(30, 144, 255, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(30, 144, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.system-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1E90FF;
}

.system-version {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: #2A3A5C;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
    color: #C8D6E5;
}

.nav-item:hover {
    background: rgba(30, 144, 255, 0.08);
}

.nav-item.active {
    background: rgba(30, 144, 255, 0.12);
    border-left: 2px solid #1E90FF;
}

.nav-icon {
    font-size: 0.6rem;
    color: #2A3A5C;
}

.nav-item.active .nav-icon {
    color: #1E90FF;
}

.nav-label {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(30, 144, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00E676;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: #00E676;
    letter-spacing: 0.1em;
}

/* Dashboard */
#dashboard {
    margin-left: 200px;
    min-height: 100vh;
    padding: 0;
}

/* Top Bar */
#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(30, 144, 255, 0.15);
    background: #141E33;
}

.dashboard-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #C8D6E5;
}

.location-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: #2A3A5C;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 0.2rem;
}

.bar-right {
    text-align: right;
}

.clock {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: #1E90FF;
    display: block;
}

.date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: #2A3A5C;
    display: block;
}

/* Panel Grid */
#panel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 1px;
    background: rgba(30, 144, 255, 0.08);
    padding: 1px;
}

.panel {
    background: #0C1222;
    overflow: hidden;
}

.panel-hero {
    grid-column: 1 / -1;
}

.panel-network {
    grid-column: span 2;
}

.panel-log {
    grid-column: span 2;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
}

.panel-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C8D6E5;
}

.panel-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    color: #00E676;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 2px;
}

.panel-body {
    padding: 1rem;
}

/* Cross Section SVG */
#cross-section-svg {
    width: 100%;
    height: auto;
    max-height: 300px;
}

/* Data Panels */
.data-readout {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.readout-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    color: #C8D6E5;
    line-height: 1;
}

.readout-unit {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    color: #2A3A5C;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-bar-container {
    height: 4px;
    background: rgba(42, 58, 92, 0.5);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.data-bar {
    height: 100%;
    width: var(--bar-width, 50%);
    background: var(--bar-color, #1E90FF);
    border-radius: 2px;
    transition: width 1s ease;
}

.data-range {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    color: #2A3A5C;
}

/* Network Panel */
.network-nodes {
    position: relative;
    height: 150px;
}

.node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2A3A5C;
    border: 1px solid #1E90FF;
    transition: all 0.3s ease;
}

.node.active {
    background: #1E90FF;
    box-shadow: 0 0 8px rgba(30, 144, 255, 0.4);
    animation: nodePulse 3s ease infinite;
    border-color: #00BCD4;
}

.panel-network .panel-header .panel-status {
    color: #FFB300;
    border-color: rgba(255, 179, 0, 0.2);
    background: rgba(255, 179, 0, 0.08);
}

@keyframes nodePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(30, 144, 255, 0.4); }
    50% { box-shadow: 0 0 16px rgba(30, 144, 255, 0.7); }
}

.node::after {
    content: attr(data-id);
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.5rem;
    color: #2A3A5C;
    white-space: nowrap;
}

/* Log Panel */
.log-entries {
    max-height: 150px;
    overflow-y: auto;
}

.log-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: #C8D6E5;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(30, 144, 255, 0.05);
    opacity: 0.7;
}

.log-time {
    color: #2A3A5C;
    margin-right: 0.75rem;
}

/* Scanline Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 999;
}

/* Responsive */
@media (max-width: 900px) {
    #sidebar {
        width: 60px;
    }

    .sidebar-header {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 0.5rem;
    }

    .system-name {
        font-size: 0.6rem;
        letter-spacing: 0;
    }

    .system-version {
        display: none;
    }

    .nav-label {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 0.75rem;
    }

    .nav-icon {
        font-size: 0.8rem;
    }

    .status-text {
        display: none;
    }

    #dashboard {
        margin-left: 60px;
    }

    #panel-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-hero {
        grid-column: 1 / -1;
    }

    .panel-network,
    .panel-log {
        grid-column: 1 / -1;
    }
}
