/* =========================================
   NASA-Punk Observatory : Server Telemetry (Restored Balance)
   ========================================= */

:root {
    --bg-navy: #0e141f;
    --line-color: #3b4e6b;
    --const-red: #c82337;
    --const-orange: #e06236;
    --const-yellow: #d7ab61;
    --const-blue: #2f4c79;
    --text-white: #e8e8e8;
    --text-dim: #6d7d8c;
    --sun-glow: #fff5cc;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-navy);
    font-family: 'Jura', 'Segoe UI', sans-serif;
    color: var(--text-white);
    cursor: crosshair;
    user-select: none;
}

/* --- 背景与边缘条 --- */
.brand-stripe {
    position: absolute;
    right: 40px;
    top: 0;
    bottom: 0;
    width: 12px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.stripe-seg {
    width: 100%;
    height: 25%;
}

.s-1 {
    background: var(--const-red);
}

.s-2 {
    background: var(--const-orange);
}

.s-3 {
    background: var(--const-yellow);
}

.s-4 {
    background: var(--const-blue);
}

#topo-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

/* =========================================
   灵魂右上角 (绝对定位，不参与排版流)
   ========================================= */
.right-dock {
    position: absolute;
    top: 60px;
    right: 112px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 5;
}

.header-block {
    border-right: 3px solid var(--const-orange);
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

h1 {
    font-size: 48px;
    letter-spacing: 6px;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-white);
}

.sub-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--const-yellow);
    letter-spacing: 1px;
    margin-top: 10px;
    white-space: nowrap;
}

.sub-text b {
    color: var(--text-white);
}

/* =========================================
   左上数据台：横向并排 Flex
   ========================================= */
.dashboard-stage {
    position: absolute;
    top: 60px;
    left: 60px;
    display: flex;
    flex-direction: row;
    /* 横向排列，填补中央空白 */
    gap: 80px;
    /* 两个面板之间的宽松间距 */
    z-index: 5;
    pointer-events: none;
}

/* 通用面板修饰 */
.panel-section {
    border-left: 3px solid var(--const-blue);
    padding-left: 25px;
    width: 400px;
}

.panel-title {
    font-family: 'Jura', sans-serif;
    font-size: 18px;
    color: var(--text-white);
    letter-spacing: 3px;
    margin: 0 0 35px 0;
    text-transform: uppercase;
}

/* --- 硬件数据区 --- */
.metric-group {
    margin-bottom: 40px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.metric-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 3px;
}

.metric-val {
    font-family: 'Jura', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 0.8;
}

.metric-val .unit {
    font-size: 20px;
    font-weight: 500;
    margin-left: 5px;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 1px;
    background: var(--line-color);
}

.progress-fill {
    position: absolute;
    top: -2px;
    left: 0;
    height: 5px;
    transition: width 0.5s ease-out;
}

/* 恢复赛博发光管 (仅此处使用 shadow) */
.progress-fill.s-2 {
    background: var(--const-orange);
    box-shadow: 0 0 15px 2px rgba(224, 98, 54, 0.8);
}

.progress-fill.s-4 {
    background: var(--const-blue);
    box-shadow: 0 0 15px 2px rgba(47, 76, 121, 0.8);
}

.progress-fill.s-3 {
    background: var(--const-yellow);
    box-shadow: 0 0 15px 2px rgba(215, 171, 97, 0.8);
}

.zoom-ticks {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
    padding: 0 6px;
    box-sizing: border-box;
}

.tick {
    width: 1px;
    height: 8px;
    background: var(--text-dim);
}

.tick-sub {
    width: 1px;
    height: 4px;
    background: var(--text-dim);
    opacity: 0.3;
}

/* --- 网络与服务区 --- */
.network-stats {
    display: flex;
    flex-direction: column;
}

.net-box {
    display: flex;
    flex-direction: column;
}

.net-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.net-val {
    font-family: 'Jura', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.net-val .unit {
    font-size: 16px;
    font-weight: 500;
    margin-left: 5px;
    color: var(--text-dim);
}

.data-block {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 2.6;
    color: var(--text-dim);
}

.data-row span {
    color: var(--text-white);
    font-weight: 500;
}

.data-row .alert {
    color: var(--const-orange);
    font-weight: 700;
}

.service-list {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 2.6;
    color: var(--text-white);
    width: 100%;
}

.service-list .data-row {
    display: flex;
    justify-content: space-between;
}

.status-badge {
    font-weight: bold;
}

.status-badge.s-blue {
    color: var(--const-blue);
    text-shadow: 0 0 8px rgba(47, 76, 121, 0.8);
}

.status-badge.s-orange {
    color: var(--const-red);
    text-shadow: 0 0 8px rgba(200, 35, 55, 0.8);
}

.status-badge.s-yellow {
    color: var(--const-yellow);
    text-shadow: 0 0 8px rgba(215, 171, 97, 0.8);
}

/* =========================================
   底部：终端卡片矩阵 (严格遵守 60px 约束)
   ========================================= */
.terminal-matrix {
    position: absolute;
    bottom: 60px;
    left: 60px;
    right: 112px;
    height: 500px;
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 5;
    pointer-events: auto;
}

.terminal-matrix::-webkit-scrollbar {
    display: none;
}

.term-card {
    background: rgba(14, 20, 31, 0.8);
    border: 1px solid var(--line-color);
    border-top: 3px solid var(--const-orange);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 精确四等分亚像素补偿 */
    box-sizing: border-box;
    flex: 1 0 calc((100% - 60px) / 4 - 1px);
    scroll-snap-align: start;
}

.term-card:nth-child(even) {
    border-top-color: var(--const-blue);
}

.term-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    font-family: 'Jura', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 2px;
    border-bottom: 1px dashed var(--line-color);
    display: flex;
    justify-content: space-between;
}

.term-header .status-dot {
    color: var(--const-yellow);
    animation: blink 2s infinite;
}

.term-body {
    flex: 1;
    padding: 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    line-height: 1.6;
    color: var(--text-dim);
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.term-body::-webkit-scrollbar {
    width: 4px;
}

.term-body::-webkit-scrollbar-track {
    background: transparent;
}

.term-body::-webkit-scrollbar-thumb {
    background: var(--line-color);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}