/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #060D14;
    color: #8FB5C9;
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === SCANNING LINE === */
#scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 200, 255, 0.2) 20%, rgba(0, 200, 255, 0.2) 80%, transparent 100%);
    z-index: 9999;
    animation: scanDown 8s linear infinite;
    pointer-events: none;
}

@keyframes scanDown {
    0% { top: 0; }
    100% { top: 100vh; }
}

/* === DOT GRID OVERLAY === */
#dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(26, 58, 80, 0.4) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#dot-grid.visible {
    opacity: 1;
}

/* === CROSSHAIR === */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.crosshair-h {
    position: absolute;
    width: 40px;
    height: 1px;
    background: rgba(0, 200, 255, 0.1);
    top: 0;
    left: -20px;
}

.crosshair-v {
    position: absolute;
    width: 1px;
    height: 40px;
    background: rgba(0, 200, 255, 0.1);
    top: -20px;
    left: 0;
}

/* === BOOT SCREEN === */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #060D14;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}

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

#boot-screen.hidden {
    display: none;
}

.boot-content {
    text-align: center;
}

.boot-brackets {
    position: relative;
    display: inline-block;
    padding: 20px 40px;
}

.bracket {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(0, 200, 255, 0.4);
    border-style: solid;
    border-width: 0;
}

.bracket-tl {
    top: 0;
    left: 0;
    border-top-width: 2px;
    border-left-width: 2px;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.bracket-tr {
    top: 0;
    right: 0;
    border-top-width: 2px;
    border-right-width: 2px;
    transform: scale(0);
    transition: transform 0.4s ease 0.1s;
}

.bracket-bl {
    bottom: 0;
    left: 0;
    border-bottom-width: 2px;
    border-left-width: 2px;
    transform: scale(0);
    transition: transform 0.4s ease 0.2s;
}

.bracket-br {
    bottom: 0;
    right: 0;
    border-bottom-width: 2px;
    border-right-width: 2px;
    transform: scale(0);
    transition: transform 0.4s ease 0.3s;
}

.boot-brackets.animate .bracket {
    transform: scale(1);
}

.boot-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 56px;
    color: #00C8FF;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
}

.boot-status {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #00FF88;
    letter-spacing: 0.04em;
    margin-top: 20px;
    min-height: 1.5em;
}

/* === TOP NAVIGATION BAR === */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(6, 13, 20, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 200, 255, 0.15);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#top-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-domain {
    color: #00C8FF;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.1em;
    margin-right: 20px;
}

.nav-timestamp {
    color: #00FF88;
    margin-right: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-sep {
    color: #1A3A50;
    margin: 0 10px;
}

.nav-link {
    color: #8FB5C9;
    text-decoration: none;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #00C8FF;
}

.nav-link.active {
    color: #00C8FF;
}

.nav-indicator {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-right: 4px;
    vertical-align: middle;
    transition: border-bottom-color 0.2s ease;
}

.nav-link.active .nav-indicator {
    border-bottom-color: #00C8FF;
}

/* === HUD LAYOUT === */
#hud-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    padding: 60px 20px 20px;
    min-height: 100vh;
    position: relative;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#hud-layout.visible {
    opacity: 1;
}

/* === SIDE PANELS === */
.side-panel {
    position: sticky;
    top: 60px;
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: none;
}

.side-panel::-webkit-scrollbar {
    display: none;
}

#left-panel {
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

#left-panel.visible {
    transform: translateX(0);
    opacity: 1;
}

#right-panel {
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

#right-panel.visible {
    transform: translateX(0);
    opacity: 1;
}

/* === HUD PANEL / WIDGET === */
.widget {
    background: rgba(10, 25, 40, 0.7);
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(0, 200, 255, 0.15);
    border-top: 1px solid rgba(0, 200, 255, 0.15);
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.widget:hover {
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
}

.widget-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-top: 2px solid rgba(0, 200, 255, 0.4);
    border-left: 2px solid rgba(0, 200, 255, 0.4);
}

.widget-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #00C8FF;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* === STATUS ITEMS === */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(26, 58, 80, 0.3);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: #8FB5C9;
    letter-spacing: 0.04em;
}

.status-value {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #00FF88;
    letter-spacing: 0.04em;
}

/* === DATA VALUE GLITCH HOVER === */
.data-value {
    cursor: default;
    transition: color 0.05s ease;
}

.data-value.glitch {
    color: #FFB800 !important;
}

/* === GAUGE === */
.gauge-container {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.gauge {
    width: 110px;
    height: 110px;
}

.gauge-bg {
    fill: none;
    stroke: #1A3A50;
    stroke-width: 6;
}

.gauge-fill {
    fill: none;
    stroke: #00C8FF;
    stroke-width: 6;
    stroke-linecap: butt;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1.2s ease-out;
}

.gauge-text {
    fill: #00C8FF;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 22px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.gauge-label {
    fill: #8FB5C9;
    font-family: 'Fira Code', monospace;
    font-size: 9px;
    text-anchor: middle;
    letter-spacing: 0.08em;
}

/* === WAVEFORM === */
.waveform-container {
    height: 60px;
    overflow: hidden;
}

.waveform {
    width: 100%;
    height: 100%;
}

.waveform-path {
    fill: none;
    stroke: #00FF88;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.waveform-2 .waveform-path {
    stroke: #00C8FF;
}

/* === THREAT LEVEL BAR === */
.threat-level {
    display: flex;
    align-items: center;
    gap: 12px;
}

.threat-bar {
    flex: 1;
    height: 6px;
    background: #1A3A50;
    position: relative;
    overflow: hidden;
}

.threat-fill {
    height: 100%;
    background: linear-gradient(90deg, #00FF88, #FFB800);
    width: 0%;
    transition: width 1.2s ease-out;
}

.threat-label {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* === CENTER CONTENT === */
#center-content {
    padding: 0 20px;
}

/* === CONTENT SECTION === */
.content-section {
    background: rgba(10, 25, 40, 0.7);
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(0, 200, 255, 0.15);
    border-top: 1px solid rgba(0, 200, 255, 0.15);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s ease;
}

.content-section.in-view {
    opacity: 1;
    transform: scale(1);
}

.content-section:hover {
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
}

/* === SECTION BRACKETS === */
.section-brackets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sec-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: rgba(0, 200, 255, 0.3);
    border-style: solid;
    border-width: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.content-section.in-view .sec-bracket {
    opacity: 1;
}

.sec-tl {
    top: -1px;
    left: -1px;
    border-top-width: 2px;
    border-left-width: 2px;
    transition-delay: 0s;
}

.sec-tr {
    top: -1px;
    right: -1px;
    border-top-width: 2px;
    border-right-width: 2px;
    transition-delay: 0.05s;
}

.sec-bl {
    bottom: -1px;
    left: -1px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    transition-delay: 0.1s;
}

.sec-br {
    bottom: -1px;
    right: -1px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    transition-delay: 0.15s;
}

/* === SECTION HEADER === */
.section-header {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #00C8FF;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-body {
    color: #8FB5C9;
    margin-bottom: 24px;
}

/* === DATA GRID (Overview cards) === */
.data-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.data-card {
    background: rgba(6, 13, 20, 0.6);
    border-left: 1px solid rgba(0, 200, 255, 0.1);
    border-top: 1px solid rgba(0, 200, 255, 0.1);
    padding: 16px;
    text-align: center;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.data-card:hover {
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.08);
}

.data-card-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-top: 1px solid rgba(0, 200, 255, 0.3);
    border-left: 1px solid rgba(0, 200, 255, 0.3);
}

.data-card-label {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: #8FB5C9;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.data-card-value {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 24px;
    color: #00FF88;
    letter-spacing: 0.04em;
}

/* === NETWORK GRAPH === */
.network-graph {
    margin: 20px 0;
    background: rgba(6, 13, 20, 0.4);
    border: 1px solid rgba(26, 58, 80, 0.3);
    padding: 10px;
}

.node-graph {
    width: 100%;
    height: 300px;
}

.network-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.net-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.net-stat-label {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: #8FB5C9;
    letter-spacing: 0.06em;
}

.net-stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 18px;
    color: #00FF88;
    letter-spacing: 0.04em;
}

/* === THREAT TABLE === */
.threat-table {
    margin-top: 8px;
}

.threat-row {
    display: grid;
    grid-template-columns: 100px 1fr 100px 120px;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 58, 80, 0.3);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    align-items: center;
}

.threat-header-row {
    color: #00C8FF;
    font-size: 11px;
    border-bottom: 1px solid rgba(0, 200, 255, 0.2);
}

.threat-col {
    color: #8FB5C9;
}

/* === ANALYTICS GAUGES === */
.analytics-gauges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    justify-items: center;
}

.analytics-gauge-item {
    text-align: center;
}

/* === PROTOCOL LIST === */
.protocol-list {
    margin-top: 8px;
}

.protocol-item {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 58, 80, 0.3);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    align-items: center;
}

.protocol-id {
    color: #00FF88;
}

.protocol-name {
    color: #8FB5C9;
}

.protocol-status {
    text-align: right;
}

/* === LOG ENTRIES === */
.log-entries {
    max-height: 240px;
    overflow: hidden;
}

.log-entry {
    display: flex;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(26, 58, 80, 0.2);
    font-size: 11px;
}

.log-time {
    font-family: 'Fira Code', monospace;
    color: #00FF88;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-size: 11px;
}

.log-msg {
    color: #8FB5C9;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === REGION LIST === */
.region-list {
    display: flex;
    flex-direction: column;
}

.region-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(26, 58, 80, 0.2);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.region-name {
    color: #8FB5C9;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    #hud-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: relative;
        top: 0;
        max-height: none;
    }

    #left-panel {
        order: 2;
        transform: translateX(0);
        opacity: 1;
    }

    #center-content {
        order: 1;
        padding: 0;
    }

    #right-panel {
        order: 3;
        transform: translateX(0);
        opacity: 1;
    }

    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .analytics-gauges {
        grid-template-columns: repeat(2, 1fr);
    }

    .threat-row {
        grid-template-columns: 80px 1fr 80px 100px;
        font-size: 11px;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 600px) {
    .data-grid {
        grid-template-columns: 1fr 1fr;
    }

    .analytics-gauges {
        grid-template-columns: 1fr 1fr;
    }

    .threat-row {
        grid-template-columns: 1fr 1fr;
    }

    .threat-row .threat-col:nth-child(2) {
        display: none;
    }
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #060D14;
}

::-webkit-scrollbar-thumb {
    background: #1A3A50;
}

::-webkit-scrollbar-thumb:hover {
    background: #00C8FF;
}
