/* Cornea-Guard — Accessible Dark-Mode Cybersecurity UI Styles */

:root {
    --bg-canvas: #060a14;
    --bg-surface: rgba(15, 23, 42, 0.84);
    --bg-surface-strong: #0f172a;
    --border-subtle: rgba(148, 163, 184, 0.18);
    --focus-ring: #38bdf8;
    --safe-color: #10b981;
    --warn-color: #f59e0b;
    --danger-color: #f43f5e;
}

html {
    background-color: var(--bg-canvas);
    color: #f1f5f9;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--bg-canvas);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(14, 165, 233, 0.14), transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(16, 185, 129, 0.1), transparent 36%),
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

.font-mono-code {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* WCAG 2.1 AA Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.75rem;
    z-index: 100;
    background: #0284c7;
    color: #ffffff;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
}

.skip-link:focus {
    left: 1rem;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* High-visibility keyboard focus indicator across all interactive controls */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.cyber-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
}

/* Dynamic SVG Risk Gauge */
.gauge-arc-progress {
    transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.3s ease;
}

/* Color-blind safe distinct border patterns paired with icons and bold badges */
.risk-banner-safe {
    background: rgba(16, 185, 129, 0.14);
    border: 2px solid #10b981;
    color: #a7f3d0;
}

.risk-banner-suspicious {
    background: rgba(245, 158, 11, 0.15);
    border: 2px dashed #f59e0b;
    color: #fde68a;
}

.risk-banner-high {
    background: rgba(244, 63, 94, 0.16);
    border: 2px solid #f43f5e;
    box-shadow: inset 0 0 0 2px rgba(244, 63, 94, 0.25);
    color: #fecdd3;
}

.risk-badge-safe {
    background: #064e3b;
    color: #ecfdf5;
    border: 1px solid #34d399;
}

.risk-badge-suspicious {
    background: #78350f;
    color: #fffbeb;
    border: 1px dashed #fbbf24;
}

.risk-badge-high {
    background: #881337;
    color: #fff1f2;
    border: 2px solid #fb7185;
}

.finding-high {
    border-left: 4px solid #f43f5e;
    background: rgba(136, 19, 55, 0.22);
}

.finding-medium {
    border-left: 4px dashed #f59e0b;
    background: rgba(120, 53, 15, 0.22);
}

.finding-low {
    border-left: 4px dotted #38bdf8;
    background: rgba(12, 74, 110, 0.22);
}

.finding-safe {
    border-left: 4px solid #10b981;
    background: rgba(6, 78, 59, 0.24);
}

/* Custom sleek scrollbar for scan history */
.scan-scroll::-webkit-scrollbar {
    width: 6px;
}

.scan-scroll::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}

.scan-scroll::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.5);
    border-radius: 9999px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .gauge-arc-progress {
        transition: none;
    }
}
