/* wwwroot/css/cybermap.css */

#cyber-map-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    background: #030d18;
    overflow: hidden;
    font-family: 'Courier New', 'Consolas', monospace;
}

#cyber-map-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── HUD overlay ── */
#cyber-map-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 20px 0;
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff9d;
    box-shadow: 0 0 10px #00ff9d;
    animation: cm-pulse 1.4s ease-in-out infinite;
}

@keyframes cm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.6); }
}

.hud-title {
    font-size: 10px;
    letter-spacing: 2.5px;
    color: #00cc7a;
    text-transform: uppercase;
}

.hud-stats {
    display: flex;
    gap: 24px;
}

.hud-stat {
    text-align: right;
}

.hud-stat-val {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #ff3b5c;
    letter-spacing: 1px;
    line-height: 1;
}

.hud-stat-lbl {
    display: block;
    font-size: 8px;
    color: #3a5a6a;
    letter-spacing: 1.5px;
    margin-top: 3px;
}

/* ── Detail list ── */
#cm-detail-list {
    pointer-events: auto;

    flex: 1;
    overflow-y: auto;
    padding: 4px 20px 0;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,157,0.15) transparent;
}
#cm-detail-list::-webkit-scrollbar { width: 4px; }
#cm-detail-list::-webkit-scrollbar-track { background: transparent; }
#cm-detail-list::-webkit-scrollbar-thumb { background: rgba(0,255,157,0.2); border-radius: 2px; }
.cm-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px;
    border-bottom: 1px solid rgba(0,255,157,0.06);
    font-size: 9px;
    color: #7a9a8a;
    letter-spacing: 0.5px;
    transition: background .15s;
    text-decoration: none;
}
.cm-detail-row:hover { background: rgba(0,255,157,0.05); }
.cm-det-pulse { display: inline-block; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cm-det-type { width: 65px; flex-shrink: 0; color: #b0d0c0; font-weight: 600; }
.cm-det-flag { width: 28px; flex-shrink: 0; text-align: center; color: #5a7a6a; font-weight: 700; }
.cm-det-ip  { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6a9a7a; }
.cm-det-mal { width: 80px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5a7a6a; }
.cm-det-sev { width: 32px; flex-shrink: 0; text-align: right; font-weight: 700; }

/* ── Legend ── */
#cm-legend {
    display: flex;
    gap: 14px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.cm-leg {
    font-size: 9px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.85;
}

.cm-leg[data-type="DDoS"]       { color: #ff3b5c; }
.cm-leg[data-type="BruteForce"] { color: #ff8c00; }
.cm-leg[data-type="Malware"]    { color: #00ff9d; }
.cm-leg[data-type="Phishing"]   { color: #00b4ff; }
.cm-leg[data-type="APT"]        { color: #cc44ff; }
.cm-leg[data-type="Exploit"]    { color: #ffdd00; }
.cm-leg[data-type="Scan"]       { color: #aaaaaa; }

/* ── Ticker ── */
#cm-ticker-bar {
    height: 26px;
    background: rgba(0, 255, 157, 0.04);
    border-top: 1px solid rgba(0, 255, 157, 0.10);
    display: flex;
    align-items: center;
    overflow: hidden;
}

#cm-ticker-inner {
    white-space: nowrap;
    font-size: 9px;
    color: #2a6a4a;
    letter-spacing: 1.8px;
    padding-left: 100%;
    animation: cm-scroll 120s linear infinite;
}

@keyframes cm-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* ── Scanline effect ── */
#cyber-map-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
}
