/* =========================================
   HUD 面板组件
========================================= */
.hud-panel {
    background: var(--panel-bg);
    clip-path: polygon(
        15px 0, calc(100% - 15px) 0, 100% 15px,
        100% calc(100% - 15px), calc(100% - 15px) 100%,
        15px 100%, 0 calc(100% - 15px), 0 15px
    );
    border: 1px solid var(--neon-blue);
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    /* GPU加速 */
    transform: translateZ(0);
    will-change: contents;
}

/* 面板四角十字准星 */
.hud-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, var(--neon-blue) 10px, transparent 10px) 0 0,
        linear-gradient(180deg, var(--neon-blue) 10px, transparent 10px) 0 0,
        linear-gradient(-90deg, var(--neon-blue) 10px, transparent 10px) 100% 0,
        linear-gradient(180deg, var(--neon-blue) 10px, transparent 10px) 100% 0,
        linear-gradient(90deg, var(--neon-blue) 10px, transparent 10px) 0 100%,
        linear-gradient(-180deg, var(--neon-blue) 10px, transparent 10px) 0 100%,
        linear-gradient(-90deg, var(--neon-blue) 10px, transparent 10px) 100% 100%,
        linear-gradient(-180deg, var(--neon-blue) 10px, transparent 10px) 100% 100%;
    background-repeat: no-repeat;
    background-size: 2px 10px, 10px 2px;
    pointer-events: none;
    z-index: 5;
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 20px;
    margin: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 243, 255, 0.2) 0px,
        rgba(0, 243, 255, 0.2) 2px,
        transparent 2px,
        transparent 4px
    );
    border-bottom: 2px solid var(--neon-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hash-code {
    font-size: 10px;
    color: var(--neon-red);
    letter-spacing: 1px;
}

/* =========================================
   硬件监控组件
========================================= */
.panel-hw {
    flex: 0 0 300px;
}

.hw-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cpu-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.reactor-core {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reactor-core::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px dashed var(--neon-red);
    opacity: 0.8;
}

.reactor-core::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--neon-blue);
    border-bottom-color: var(--neon-blue);
}

.cpu-val {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-blue);
    z-index: 10;
}

.res-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-mono);
}

.res-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
}

.segmented-bar {
    display: flex;
    gap: 3px;
    width: 100%;
    height: 12px;
}

.seg {
    flex: 1;
    background: rgba(255,255,255,0.1);
    transform: skewX(-20deg);
}

.seg.active {
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}

.seg.warning {
    background: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow);
}

.seg.danger {
    background: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red);
}

/* =========================================
   进程列表组件
========================================= */
.panel-proc {
    flex: 1;
    overflow: hidden;
}

.proc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: left;
}

.proc-table thead {
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 243, 255, 0.15) 0px,
        rgba(0, 243, 255, 0.15) 2px,
        rgba(0, 243, 255, 0.05) 2px,
        rgba(0, 243, 255, 0.05) 4px
    );
}

.proc-table th {
    padding: 12px 10px;
    color: var(--neon-cyan);
    border-bottom: 2px solid var(--neon-blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 8px var(--neon-cyan);
    position: relative;
}

.proc-table th::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    animation: scan-line 2s linear infinite;
    will-change: opacity;
}

@keyframes scan-line {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.proc-table tbody tr {
    transition: background 0.15s ease, border-left-color 0.15s ease;
    border-left: 3px solid transparent;
}

.proc-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(0,243,255,0.15), rgba(0,243,255,0.05));
    border-left-color: var(--neon-cyan);
    transform: translateX(2px);
}

.proc-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(0,243,255,0.1);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ccc;
}

.proc-table td:first-child {
    color: var(--neon-yellow);
    font-weight: bold;
}

.proc-table td:nth-child(2) {
    color: var(--neon-green);
}

.proc-table td:nth-child(3) {
    font-weight: bold;
}

.proc-table td:last-child {
    color: #999;
    font-size: 12px;
    max-width: 300px;
}

.proc-danger {
    color: var(--neon-red) !important;
    text-shadow: 0 0 8px var(--neon-red);
    font-weight: 900;
    animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =========================================
   地图组件
========================================= */
.map-panel {
    flex: 1;
    position: relative;
    min-height: 400px;
}

.map-container {
    position: relative;
    width: 100%;
    height: calc(100% - 38px);
}

#attackMap {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.radar-scan {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(0, 243, 255, 0.1);
    background: conic-gradient(
        from 0deg,
        rgba(0,243,255,0.2) 0%,
        transparent 10%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 5;
}

/* =========================================
   网络监控组件
========================================= */
.network-panel {
    height: 220px;
    flex-shrink: 0;
    position: relative;
}

#networkChart {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    box-sizing: border-box;
}

/* =========================================
   服务节点组件
========================================= */
.panel-nodes {
    height: 260px;
    flex-shrink: 0;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    font-family: var(--font-mono);
}

.project-item {
    background: linear-gradient(90deg, rgba(0,243,255,0.1), transparent);
    border-left: 3px solid var(--neon-blue);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proj-name {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
}

.proj-port {
    font-size: 11px;
    color: var(--neon-blue);
    margin-top: 4px;
}

.status-dot {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 0 10px currentColor;
}

/* =========================================
   威胁日志终端
========================================= */
.terminal {
    background: #000;
    border: 1px solid var(--neon-red);
    flex: 1;
    padding: 15px;
    font-size: 11px;
    font-family: var(--font-mono);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 30px rgba(255, 42, 122, 0.2);
}

#logContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.log-row {
    color: var(--neon-red);
    text-shadow: 0 0 5px var(--neon-red);
    display: flex;
    flex-direction: column;
}

.log-header {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-weight: bold;
    margin-bottom: 2px;
}

.log-ip {
    background: var(--neon-red);
    color: #000;
    padding: 0 4px;
}
