:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #00ff41;
    /* Classic Terminal Green */
    --accent-secondary: #00f2ff;
    /* Electric Cyan */
    --dim-color: #555;
    --border-color: #333;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --scanline-color: rgba(0, 0, 0, 0.5);
    --crt-flicker: rgba(0, 255, 65, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    /* Force Monospace Everywhere */
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
}

/* CRT Scanline Effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    border-bottom: 1px dashed var(--dim-color);
    transition: all 0.2s;
}

a:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-color);
    border-bottom-style: solid;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    padding: 2rem;
    background: #0a0a0a;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.05);
}

/* Header / Branding */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    border-bottom: none;
    text-decoration: none;
    background: transparent;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.brand-logo:hover,
.brand-logo:active,
.brand-logo:focus,
.brand-logo:focus-visible {
    background: transparent;
    color: inherit;
    border-bottom: none;
    outline: none;
    box-shadow: none;
    transform: translateY(-1px) scale(1.02);
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.36));
}

.brand img {
    height: 96px;
    mix-blend-mode: screen;
    /* Keep the blending for the logo */
    filter: grayscale(100%) contrast(150%);
    /* Make it look more aggressive/retro */
}

.brand h1 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    color: var(--text-color);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-transform: uppercase;
}

.status-badge::before {
    content: "● ";
    animation: blink 2s infinite;
}

.kpi-panel {
    min-width: 280px;
    border: 1px solid var(--accent-color);
    padding: 0.5rem 0.6rem;
    background: rgba(0, 255, 65, 0.03);
}

.kpi-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.kpi-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    box-shadow: 0 0 6px #999;
}

.kpi-led.is-green {
    background: #00ff41;
    box-shadow: 0 0 8px #00ff41;
}

.kpi-led.is-yellow {
    background: #ffd900;
    box-shadow: 0 0 8px #ffd900;
}

.kpi-led.is-red {
    background: #ff4d4d;
    box-shadow: 0 0 8px #ff4d4d;
}

.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.8rem;
}

.kpi-item {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.kpi-key {
    font-size: 0.62rem;
    color: var(--dim-color);
    text-transform: uppercase;
}

.kpi-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #00ff41 !important;
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.72);
}

.kpi-val.is-live {
    color: #00ff41 !important;
    text-shadow: 0 0 14px rgba(0, 255, 65, 0.8);
    animation: kpi-value-pulse 2.2s infinite;
}

.kpi-val.is-degraded {
    color: #00ff41 !important;
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.7);
    animation: kpi-value-pulse 2.2s infinite;
}

.kpi-val.is-down {
    color: #00ff41 !important;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.62);
}

.kpi-foot {
    margin-top: 0.45rem;
    font-size: 0.62rem;
    color: #8aa6a8;
    text-transform: uppercase;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: normal;
    text-transform: uppercase;
    color: var(--text-color);
}

h2 {
    color: var(--accent-secondary);
    border-bottom: 1px solid var(--dim-color);
    padding-bottom: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

h2::before {
    content: "> ";
    color: var(--dim-color);
}

p {
    margin-bottom: 1.5rem;
    max-width: 70ch;
}

/* Code Blocks & Terminal */
.terminal-window {
    background: #000;
    border: 1px solid var(--dim-color);
    border-radius: 4px;
    padding: 1rem;
    margin: 2rem 0;
    font-family: var(--font-mono);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.terminal-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #222;
    padding-bottom: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--dim-color);
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.9rem;
}

code {
    color: var(--accent-color);
}

.cmd {
    color: var(--text-color);
}

.arg {
    color: var(--accent-secondary);
}

.flag {
    color: #ff00ff;
}

/* Magenta for flags */
.comment {
    color: var(--dim-color);
    display: block;
    margin-top: 0.5rem;
}

/* Keep terminal comments inline to avoid fake blank lines in code examples. */
.terminal-window .comment {
    display: inline;
    margin-top: 0;
}

/* Grid Layouts for Assets */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.asset-card {
    border: 1px solid var(--border-color);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.asset-card img {
    width: 100%;
    height: auto;
    border: 1px solid #222;
    margin-bottom: 1rem;
    filter: sepia(20%) contrast(110%) hue-rotate(180deg) saturate(80%);
    /* Cool blue tech filter */
    transition: filter 0.3s;
}

.asset-card:hover img {
    filter: none;
    /* Reveal true color on hover */
}

.asset-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--accent-secondary);
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.asset-card p {
    font-size: 0.85rem;
    color: var(--dim-color);
    margin: 0;
}

/* Metadata Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    margin: 2rem 0;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    color: var(--dim-color);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.data-table td {
    color: var(--accent-secondary);
}

.data-table tr:hover td {
    background: rgba(0, 242, 255, 0.05);
}

footer {
    margin-top: 4rem;
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--dim-color);
    font-size: 0.8rem;
    text-transform: uppercase;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes kpi-value-pulse {

    0%,
    100% {
        opacity: 0.78;
        filter: saturate(92%);
    }

    50% {
        opacity: 1;
        filter: saturate(120%);
    }
}

/* Utility */
.highlight {
    background-color: var(--accent-color);
    color: black;
    padding: 0 4px;
}

@media (max-width: 720px) {
    body {
        padding: 1rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .kpi-panel {
        width: 100%;
        min-width: 0;
    }
}
