/**
 * jarvis.css — JARVIS/Iron Man HUD theme for FreakLabs.dev homepage.
 * Values extracted from status.freaklabs.dev reference implementation.
 */

/* ── CSS Custom Properties ──────────────────────────────────────────── */
:root {
    --jarvis-bg:          #0a0e17;
    --jarvis-bg-light:    #0d1117;
    --jarvis-blue:        #00d4ff;
    --jarvis-blue-dim:    #0ea5e9;
    --jarvis-amber:       #f59e0b;
    --jarvis-amber-light: #fbbf24;
    --jarvis-green:       #22c55e;
    --jarvis-red:         #ef4444;
    --jarvis-text:        #e2e8f0;
    --jarvis-text-dim:    #94a3b8;
    --jarvis-card-bg:     rgba(14, 165, 233, 0.06);
    --jarvis-card-border: rgba(14, 165, 233, 0.2);
    --font-hud:           'Rajdhani', sans-serif;
    --font-display:       'Orbitron', sans-serif;
    --font-mono:          'Share Tech Mono', monospace;
}

/* ── Base ────────────────────────────────────────────────────────────── */
.jarvis-page {
    font-family: var(--font-hud);
    background: var(--jarvis-bg);
    color: var(--jarvis-text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ── Scan Lines Overlay ─────────────────────────────────────────────── */
.jarvis-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.015) 2px,
        rgba(0, 212, 255, 0.015) 4px
    );
}

/* ── Grid Background ────────────────────────────────────────────────── */
.jarvis-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ── Scrollbar ──────────────────────────────────────────────────────── */
.jarvis-page ::-webkit-scrollbar { width: 6px; }
.jarvis-page ::-webkit-scrollbar-track { background: var(--jarvis-bg); }
.jarvis-page ::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 3px; }

/* ── Glow Effect ────────────────────────────────────────────────────── */
.glow-blue {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15),
                0 0 30px rgba(0, 212, 255, 0.05);
}

/* ── HUD Corners ────────────────────────────────────────────────────── */
.hud-corners {
    position: relative;
}
.hud-corners::before,
.hud-corners::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--jarvis-blue);
    border-style: solid;
    border-width: 0;
}
.hud-corners::before {
    top: -1px;
    left: -1px;
    border-top-width: 2px;
    border-left-width: 2px;
}
.hud-corners::after {
    bottom: -1px;
    right: -1px;
    border-bottom-width: 2px;
    border-right-width: 2px;
}

/* ── HUD Panel ──────────────────────────────────────────────────────── */
.hud-panel {
    background: var(--jarvis-card-bg);
    border: 1px solid var(--jarvis-card-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    position: relative;
}
.hud-panel.glow { box-shadow: 0 0 15px rgba(0, 212, 255, 0.15), 0 0 30px rgba(0, 212, 255, 0.05); }

/* ── Section Label ──────────────────────────────────────────────────── */
.hud-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--jarvis-blue);
    margin-bottom: 0.5rem;
}

/* ── HUD Title ──────────────────────────────────────────────────────── */
.hud-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--jarvis-text);
}
.hud-title-lg { font-size: 2rem; }
.hud-title-md { font-size: 1.25rem; }
.hud-title-sm { font-size: 1rem; }

/* ── Section Divider ────────────────────────────────────────────────── */
.hud-divider {
    border: none;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--jarvis-card-border) 20%,
        var(--jarvis-blue) 50%,
        var(--jarvis-card-border) 80%,
        transparent
    );
    margin: 2rem 0;
}

/* ── Status Dot ─────────────────────────────────────────────────────── */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-dot.online       { background: var(--jarvis-green); animation: pulse-online 2s infinite; }
.status-dot.known-issue  { background: var(--jarvis-amber); animation: pulse-known 2s infinite; }
.status-dot.offline      { background: var(--jarvis-red);   animation: pulse-offline 2s infinite; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn-hud {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.375rem;
    color: var(--jarvis-blue);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}
.btn-hud:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

/* ── News Category Badges ───────────────────────────────────────────── */
.news-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.news-badge-update       { background: rgba(0, 212, 255, 0.15); color: var(--jarvis-blue); border: 1px solid rgba(0, 212, 255, 0.3); }
.news-badge-project      { background: rgba(34, 197, 94, 0.15); color: var(--jarvis-green); border: 1px solid rgba(34, 197, 94, 0.3); }
.news-badge-announcement { background: rgba(245, 158, 11, 0.15); color: var(--jarvis-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.news-badge-maintenance  { background: rgba(239, 68, 68, 0.15); color: var(--jarvis-red); border: 1px solid rgba(239, 68, 68, 0.3); }

/* ── News Item ──────────────────────────────────────────────────────── */
.news-item {
    background: var(--jarvis-card-bg);
    border: 1px solid var(--jarvis-card-border);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}
.news-item:hover {
    border-color: rgba(14, 165, 233, 0.4);
}
.news-timestamp {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--jarvis-text-dim);
}

/* ── Project Card ───────────────────────────────────────────────────── */
.jarvis-project-card {
    background: var(--jarvis-card-bg);
    border: 1px solid var(--jarvis-card-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.jarvis-project-card:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

/* ── Arc Reactor Logo ───────────────────────────────────────────────── */
.arc-reactor {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.arc-reactor-ring {
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.6);
    animation: arc-spin 4s linear infinite;
}
.arc-reactor-core {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.4);
    animation: arc-pulse 2s ease-in-out infinite;
}

/* ── Status Banner ──────────────────────────────────────────────────── */
.status-banner {
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.status-banner.operational {
    border: 1px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
    color: var(--jarvis-green);
}
.status-banner.degraded {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
    color: var(--jarvis-red);
}

/* ── Roadmap Timeline ───────────────────────────────────────────────── */
.roadmap-timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 1px solid var(--jarvis-card-border);
}
.roadmap-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.roadmap-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.35rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--jarvis-blue);
    background: var(--jarvis-bg);
}
.roadmap-timeline-item.completed::before { background: var(--jarvis-green); border-color: var(--jarvis-green); }
.roadmap-timeline-item.in-progress::before { background: var(--jarvis-amber); border-color: var(--jarvis-amber); }

/* ── HUD Nav ────────────────────────────────────────────────────────── */
.jarvis-nav {
    border-bottom: 1px solid var(--jarvis-card-border);
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.jarvis-nav a {
    color: var(--jarvis-text-dim);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}
.jarvis-nav a:hover,
.jarvis-nav a.active { color: var(--jarvis-blue); }

/* ── HUD Footer ─────────────────────────────────────────────────────── */
.jarvis-footer {
    border-top: 1px solid var(--jarvis-card-border);
    padding: 1.5rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--jarvis-text-dim);
}

/* ── HUD Clock ──────────────────────────────────────────────────────── */
.hud-clock {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--jarvis-blue);
    letter-spacing: 0.05em;
}

/* ── Keyframes ──────────────────────────────────────────────────────── */
@keyframes pulse-online {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}
@keyframes pulse-offline {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
@keyframes pulse-known {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
@keyframes arc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes arc-pulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}
@keyframes hud-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Entrance Animation ─────────────────────────────────────────────── */
.hud-animate {
    animation: hud-fade-in 0.5s ease-out both;
}
.hud-delay-1 { animation-delay: 0.1s; }
.hud-delay-2 { animation-delay: 0.2s; }
.hud-delay-3 { animation-delay: 0.3s; }
.hud-delay-4 { animation-delay: 0.4s; }
.hud-delay-5 { animation-delay: 0.5s; }

/* ── Utility ────────────────────────────────────────────────────────── */
.text-jarvis-blue     { color: var(--jarvis-blue); }
.text-jarvis-dim      { color: var(--jarvis-text-dim); }
.text-jarvis-green    { color: var(--jarvis-green); }
.text-jarvis-red      { color: var(--jarvis-red); }
.text-jarvis-amber    { color: var(--jarvis-amber); }
.font-display         { font-family: var(--font-display); }
.font-mono            { font-family: var(--font-mono); }
.font-hud             { font-family: var(--font-hud); }
.tracking-hud         { letter-spacing: 0.15em; }

/* ── Flash Messages ────────────────────────────────────────────────── */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-hud);
    font-size: 0.85rem;
    font-weight: 500;
}
.flash-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--jarvis-green); }
.flash-error   { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--jarvis-red); }
.flash-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--jarvis-amber); }
.flash-info    { background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.3); color: var(--jarvis-blue); }

/* ── Admin Sidebar ─────────────────────────────────────────────────── */
.jarvis-sidebar {
    background: rgba(10, 14, 23, 0.5);
    border-right: 1px solid var(--jarvis-card-border);
}

/* ── Progress Bar ──────────────────────────────────────────────────── */
.jarvis-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 212, 255, 0.1);
}
.jarvis-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--jarvis-blue), var(--jarvis-green));
    transition: width 0.5s ease;
}

/* ── Admin Form Elements ─────────────────────────────────────────────── */
.jarvis-input {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid var(--jarvis-card-border);
    color: var(--jarvis-text);
    font-family: var(--font-hud);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.jarvis-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.jarvis-input::placeholder { color: var(--jarvis-text-dim); opacity: 0.5; }
.jarvis-input option { background: var(--jarvis-bg); color: var(--jarvis-text); }

/* ── Admin Tables ────────────────────────────────────────────────────── */
.jarvis-table { border-collapse: collapse; }
.jarvis-table thead tr { border-bottom: 1px solid var(--jarvis-card-border); }
.jarvis-table th {
    color: var(--jarvis-blue-dim);
    font-family: var(--font-display);
}
.jarvis-table tbody tr { border-bottom: 1px solid rgba(14, 165, 233, 0.06); }
.jarvis-table tbody tr:hover { background: rgba(0, 212, 255, 0.03); }

/* ── Admin Button Variants ───────────────────────────────────────────── */
.btn-jarvis-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.5rem;
    color: var(--jarvis-blue);
    font-family: var(--font-display);
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-jarvis-primary:hover {
    background: rgba(0, 212, 255, 0.25);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.btn-jarvis-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--jarvis-card-border);
    border-radius: 0.5rem;
    color: var(--jarvis-text-dim);
    font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-jarvis-ghost:hover {
    color: var(--jarvis-blue);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
}

.btn-jarvis-danger {
    display: inline-flex; align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    color: var(--jarvis-red);
    font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s;
}
.btn-jarvis-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-jarvis-success {
    display: inline-flex; align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.5rem;
    color: var(--jarvis-green);
    font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s;
}
.btn-jarvis-success:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

/* ── Admin Badges ────────────────────────────────────────────────────── */
.jarvis-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.6rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.jarvis-badge-blue   { color: var(--jarvis-blue);  background: rgba(0,212,255,0.15);  border: 1px solid rgba(0,212,255,0.3); }
.jarvis-badge-green  { color: var(--jarvis-green); background: rgba(34,197,94,0.15);  border: 1px solid rgba(34,197,94,0.3); }
.jarvis-badge-red    { color: var(--jarvis-red);   background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3); }
.jarvis-badge-amber  { color: var(--jarvis-amber); background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); }
.jarvis-badge-dim    { color: var(--jarvis-text-dim); background: rgba(148,163,184,0.1); border: 1px solid rgba(148,163,184,0.2); }

/* ── Category Pills ──────────────────────────────────────────────────── */
.jarvis-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--jarvis-text-dim);
    background: transparent;
    border: 1px solid var(--jarvis-card-border);
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.jarvis-pill:hover, .jarvis-pill.active {
    color: var(--jarvis-blue);
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.08);
}

/* ── Kanban Columns ──────────────────────────────────────────────────── */
.jarvis-kanban-col {
    background: rgba(0, 212, 255, 0.02);
    border: 1px solid var(--jarvis-card-border);
    border-radius: 0.75rem;
    padding: 1rem;
}
.jarvis-kanban-header {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--jarvis-card-border);
    font-family: var(--font-display);
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
}

/* ── Theme Swatch (Settings) ─────────────────────────────────────────── */
.jarvis-swatch {
    cursor: pointer;
    border: 2px solid var(--jarvis-card-border);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: none;
    text-align: left;
    width: 100%;
}
.jarvis-swatch.active,
.jarvis-swatch:hover {
    border-color: var(--jarvis-blue);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

/* ── Uptime Bar Segments (Admin) ─────────────────────────────────────── */
.jarvis-uptime-bar { display: flex; gap: 1px; align-items: center; height: 1.75rem; }
.jarvis-uptime-segment {
    flex: 1; height: 100%;
    border-radius: 2px;
}

/* ── Public Uptime History Bars ──────────────────────────────────────── */
.uptime-bar {
    display: flex;
    gap: 2px;
    height: 2rem;
    width: 100%;
}
.uptime-segment {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
    min-width: 1px;
}
.uptime-segment:hover {
    opacity: 0.75;
    transform: scaleY(1.15);
}
.uptime-segment.up { background: var(--jarvis-green); }
.uptime-segment.partial { background: var(--jarvis-amber); }
.uptime-segment.down { background: var(--jarvis-red); }
.uptime-segment.no-data { background: rgba(255,255,255,0.06); }

/* Uptime Tooltip */
.uptime-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    background: rgba(10, 14, 23, 0.95);
    border: 1px solid var(--jarvis-cyan-dim, rgba(0,212,255,0.2));
    color: var(--jarvis-text);
    font-family: var(--font-hud);
    font-size: 0.75rem;
    line-height: 1.4;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ── Incident Timeline ───────────────────────────────────────────────── */
.incident-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.incident-card {
    background: var(--jarvis-panel-bg, rgba(14, 165, 233, 0.04));
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-left: 3px solid var(--jarvis-amber);
    border-radius: 6px;
    padding: 1rem 1.25rem;
}
.incident-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
