/* ThreatPulse UI — Fira Code + Fira Sans (Dashboard Data pairing) */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Fira Sans', system-ui, sans-serif;
}

.font-mono, code, kbd, pre {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-variant-ligatures: contextual;
}

/* Atmospheric layered background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(6, 182, 212, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 90%, rgba(0, 80, 200, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Subtle grid overlay for cybersecurity aesthetic */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(30, 41, 59, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.35) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Table row glassmorphism on hover */
tr:hover {
    backdrop-filter: blur(10px);
}

/* EKG pulse sweep on nav logo */
@keyframes ekg-sweep {
    from { stroke-dashoffset: 0.4; opacity: 0.25; }
    30%  { opacity: 1; }
    70%  { opacity: 1; }
    to   { stroke-dashoffset: -0.6; opacity: 0.25; }
}

.nav-ekg-path {
    stroke-dasharray: 0.4 0.6;
    stroke-dashoffset: 0.4;
    animation: ekg-sweep 2.5s linear infinite;
    filter: drop-shadow(0 0 2px rgba(6, 182, 212, 0.9));
}

/* Subtle ring glow pulse in sync with EKG */
@keyframes logo-ring-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(6, 182, 212, 0.08); }
    50%       { box-shadow: 0 0 22px rgba(6, 182, 212, 0.22), 0 0 8px rgba(6, 182, 212, 0.12) inset; }
}

.nav-logo-ring {
    animation: logo-ring-glow 2.5s ease-in-out infinite;
}

/* Severity proportion strip below nav */
#severity-strip {
    display: flex;
    height: 5px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.08);
}

/* Sync status bar */
#sync-bar {
    background: #080d18;
    border-bottom: 1px solid #1e293b;
    padding: 4px 16px;
    text-align: center;
    font-size: 10px;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.08em;
    color: #475569;
    min-height: 24px;
}

/* Glitch animation on ThreatPulse headings */
@keyframes glitch-auto {
    0%, 88%, 100% { transform: none; filter: none; }
    89% { transform: translate(-2px, 0); filter: hue-rotate(20deg) brightness(1.15); }
    90% { transform: translate(2px, 0); filter: hue-rotate(-20deg); }
    91% { transform: translate(-1px, 1px); filter: brightness(1.2); }
    92% { transform: none; filter: none; }
    94% { transform: translate(2px, -1px); filter: hue-rotate(10deg); }
    95% { transform: none; filter: none; }
}

.glitch-auto {
    animation: glitch-auto 9s steps(1) infinite;
}

/* Threat Heatmap calendar cells */
.heatmap-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 11px);
    gap: 3px;
    width: max-content;
}

.heatmap-cell {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    cursor: default;
    transition: transform 0.1s ease, filter 0.1s ease;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.5);
    filter: brightness(1.35);
    z-index: 10;
    cursor: pointer;
}

.heatmap-cell.selected {
    outline: 2px solid #06b6d4;
    outline-offset: 1px;
    z-index: 11;
}

#heatmap-tooltip {
    position: fixed;
    display: none;
    background: #0d1322;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 11px;
    font-family: 'Fira Code', monospace;
    color: #94a3b8;
    pointer-events: none;
    z-index: 99999;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(6,182,212,0.08);
    line-height: 1.7;
}
