/* sbom.day - Software Bill of Materials - HUD Overlay */
/* Colors: #0C1222, #1E293B, #38BDF8, #94A3B8, #F1F5F9, #22C55E, #F59E0B, #EF4444 */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0C1222;
    color: #F1F5F9;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='34'%3E%3Cpath d='M30 0 L60 17 L30 34 L0 17 Z' fill='none' stroke='%231E293B' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 60px 34px;
}

/* Scan Line */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38BDF8 30%, #38BDF8 70%, transparent);
    z-index: 100;
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    transition: top 0.1s linear;
}

/* HUD Sections */
.hud-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 2rem;
}

/* HUD Panel */
.hud-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    padding: 2rem;
    position: relative;
    max-width: 800px;
    width: 100%;
}

.wide-panel {
    max-width: 900px;
}

.panel-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 4px;
}

.panel-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10px;
    width: 40px;
    height: 3px;
    background: #38BDF8;
}

.panel-border::after {
    content: '';
    position: absolute;
    top: 10px;
    left: -1px;
    width: 3px;
    height: 40px;
    background: #38BDF8;
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.hud-label {
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: #38BDF8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hud-status {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
}

.status-active {
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.1);
}

.status-warn {
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

/* Hero */
.hero-panel {
    text-align: center;
    padding: 4rem 3rem;
}

.hud-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #F1F5F9;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
}

.hud-dot {
    color: #38BDF8;
}

.hud-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #94A3B8;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.hud-desc {
    font-size: 1rem;
    color: #94A3B8;
    max-width: 500px;
    margin: 1.5rem auto 2rem;
    line-height: 1.7;
}

/* Scan Indicator */
.scan-indicator {
    max-width: 300px;
    margin: 0 auto;
}

.scan-bar {
    height: 4px;
    background: #1E293B;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.scan-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38BDF8, #22C55E);
    transition: width 0.3s ease;
}

.scan-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    color: #38BDF8;
    letter-spacing: 0.1em;
}

/* Dependency Network */
.dep-network {
    width: 100%;
    margin-bottom: 1.5rem;
}

.network-svg {
    width: 100%;
    height: auto;
    max-height: 300px;
}

.dep-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: #94A3B8;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Stats Grid */
.hud-panel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 800px;
    width: 100%;
}

.stat-panel {
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-value {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #F1F5F9;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-green { color: #22C55E; }
.stat-warn { color: #F59E0B; }
.stat-crit { color: #EF4444; }

.stat-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    color: #94A3B8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Vulnerability List */
.vuln-panel {
    max-width: 800px;
    width: 100%;
}

.vuln-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vuln-row {
    display: grid;
    grid-template-columns: 50px 140px 130px 1fr;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 2px;
    background: rgba(12, 18, 34, 0.5);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    align-items: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.vuln-row.revealed {
    opacity: 1;
    transform: translateX(0);
}

.vuln-sev {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    text-align: center;
}

.sev-crit { background: rgba(239, 68, 68, 0.2); color: #EF4444; }
.sev-warn { background: rgba(245, 158, 11, 0.2); color: #F59E0B; }

.vuln-pkg { color: #38BDF8; }
.vuln-id { color: #94A3B8; }
.vuln-desc { color: #F1F5F9; opacity: 0.7; }

/* Audit Section */
.audit-panel {
    max-width: 800px;
    width: 100%;
}

.audit-result {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.audit-score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.audit-score-ring svg {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #22C55E;
}

.score-ring {
    transition: stroke-dashoffset 1.5s ease;
}

.audit-summary {
    flex: 1;
    min-width: 250px;
}

.audit-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #F1F5F9;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.audit-desc {
    font-size: 0.95rem;
    color: #94A3B8;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.audit-timestamp {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: #94A3B8;
}

.ts-label { opacity: 0.6; }
.ts-value { color: #38BDF8; }

/* Responsive */
@media (max-width: 768px) {
    .hud-panel-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vuln-row {
        grid-template-columns: 50px 1fr;
        gap: 0.5rem;
    }

    .vuln-id, .vuln-desc {
        grid-column: 2;
    }

    .audit-result {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hud-section {
        padding: 3rem 1rem;
    }

    .dep-legend {
        flex-direction: column;
        gap: 0.5rem;
    }
}
