/**
 * SENTINEL - Main Stylesheet
 * Africa's Information Resilience Engine
 * 
 * Core styles for the entire application
 */

/* ============================================================
   IMPORT FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --sentinel-blue: #4a9eff;
    --sentinel-blue-dark: #2d7dd2;
    --sentinel-blue-light: rgba(74, 158, 255, 0.1);
    --sentinel-purple: #7b61ff;
    --sentinel-dark: #0a1628;
    --sentinel-dark-card: rgba(255, 255, 255, 0.04);
    --sentinel-border: rgba(255, 255, 255, 0.06);
    --sentinel-text: #ffffff;
    --sentinel-text-muted: rgba(255, 255, 255, 0.4);
    --sentinel-text-dim: rgba(255, 255, 255, 0.2);
    
    --risk-low: #34c759;
    --risk-medium: #ff9500;
    --risk-high: #ff3b30;
    --risk-critical: #ff2d2d;
    --risk-unknown: #8e8e93;
    
    --conclusion-supported: #34c759;
    --conclusion-contradicted: #ff3b30;
    --conclusion-misleading: #ff9500;
    --conclusion-unverified: #8e8e93;
    --conclusion-insufficient: #8e8e93;
    --conclusion-mixed: #4a9eff;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    
    --transition: all 0.3s ease;
}

/* ============================================================
   BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--sentinel-dark);
    color: var(--sentinel-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--sentinel-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--sentinel-blue-dark);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--sentinel-blue), var(--sentinel-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--sentinel-blue), var(--sentinel-blue-dark));
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.35);
    color: #fff;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-outline-primary {
    border: 1px solid rgba(74, 158, 255, 0.2);
    color: var(--sentinel-blue);
    border-radius: var(--radius-md);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    background: transparent;
}

.btn-outline-primary:hover {
    background: rgba(74, 158, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.3);
    color: var(--sentinel-blue);
}

.btn-outline-secondary {
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 10px 24px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    padding: 8px 20px;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   CARDS
   ============================================================ */
.card-sentinel {
    background: var(--sentinel-dark-card);
    border: 1px solid var(--sentinel-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card-sentinel:hover {
    border-color: rgba(74, 158, 255, 0.15);
}

/* ============================================================
   RISK BADGES
   ============================================================ */
.risk-low {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
}

.risk-medium {
    background: rgba(255, 149, 0, 0.12);
    color: #ff9500;
}

.risk-high {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
}

.risk-critical {
    background: rgba(255, 45, 45, 0.15);
    color: #ff2d2d;
}

.risk-unknown {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   CONCLUSION BADGES
   ============================================================ */
.conclusion-supported {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
}

.conclusion-contradicted {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
}

.conclusion-misleading {
    background: rgba(255, 149, 0, 0.12);
    color: #ff9500;
}

.conclusion-unverified {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
}

.conclusion-insufficient {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.3);
}

.conclusion-mixed {
    background: rgba(74, 158, 255, 0.12);
    color: #4a9eff;
}

/* ============================================================
   SKILL LEVELS
   ============================================================ */
.skill-advanced {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
}

.skill-proficient {
    background: rgba(74, 158, 255, 0.12);
    color: #4a9eff;
}

.skill-developing {
    background: rgba(255, 149, 0, 0.12);
    color: #ff9500;
}

.skill-beginning {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
}

.skill-not-started {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-control-sentinel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: #fff;
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control-sentinel:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--sentinel-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
    color: #fff;
    outline: none;
}

.form-control-sentinel::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-control-sentinel.is-invalid {
    border-color: #ff3b30;
}

.form-control-sentinel.is-valid {
    border-color: #34c759;
}

/* ============================================================
   LOADING
   ============================================================ */
.spinner-sentinel {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(74, 158, 255, 0.1);
    border-top-color: var(--sentinel-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.slide-in {
    animation: slideIn 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .card-sentinel {
        padding: 16px;
    }
    
    .btn-primary {
        padding: 8px 20px;
        font-size: 13px;
    }
}