/* Bagley Cyber Sentinel - Custom Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #a855f7;
    --background: #020617;
    --surface: #0f172a;
    --surface-elevated: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.font-display {
    font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Matrix Rain Effect */
.matrix-rain {
    background: 
        linear-gradient(90deg, 
            transparent 0%, 
            rgba(16, 185, 129, 0.03) 50%, 
            transparent 100%
        );
    background-size: 100% 100%;
    animation: matrix-fade 3s ease-in-out infinite;
}

@keyframes matrix-fade {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.1; }
}

/* Floating Animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Glow Effects */
.glow-indigo {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.glow-emerald {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Glass Morphism */
.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Scan Line Effect */
.scan-line {
    position: relative;
    overflow: hidden;
}

.scan-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scan-line 2s linear infinite;
}

@keyframes scan-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* Terminal Cursor */
.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--secondary);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Code Block Styling */
.code-block {
    background: #0d1117;
    border-radius: 12px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-block .comment { color: #8b949e; }
.code-block .keyword { color: #ff7b72; }
.code-block .string { color: #a5d6ff; }
.code-block .function { color: #d2a8ff; }
.code-block .number { color: #79c0ff; }

/* Threat Level Indicators */
.threat-critical {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.threat-high {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.threat-medium {
    color: #eab308;
}

.threat-low {
    color: #10b981;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill.online {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-pill.online::before {
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

.status-pill.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-pill.offline::before {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Chat Message Animations */
.message-appear {
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Card Expand */
.result-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.result-expand.expanded {
    max-height: 1000px;
}

/* Toast Notifications */
.toast {
    transform: translateX(100%);
    animation: toastSlide 0.3s ease forwards;
}

@keyframes toastSlide {
    to { transform: translateX(0); }
}

.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* Focus Rings */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Network Graph Background */
.network-bg {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

/* Card Hover Lift */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Gradient Text Utilities */
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--surface-elevated);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 1rem;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}