/* ===== ROOT VARIABLES (DARK MODE - DEFAULT) ===== */
:root {
    --bg-primary: #050816;
    --bg-secondary: #0a0f25;
    --bg-card: rgba(12, 18, 40, 0.85);
    --bg-card-hover: rgba(20, 30, 60, 0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #00d4ff;
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #00d4ff, #a855f7);
    --gradient-hot: linear-gradient(135deg, #ec4899, #f59e0b);
    --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
    --gradient-safe: linear-gradient(135deg, #22c55e, #06b6d4);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #d97706);
    --border-color: rgba(148, 163, 184, 0.08);
    --glow-blue: 0 0 30px rgba(0, 212, 255, 0.25), 0 0 60px rgba(0, 212, 255, 0.1);
    --glow-purple: 0 0 30px rgba(168, 85, 247, 0.25);
    --glow-red: 0 0 30px rgba(239, 68, 68, 0.25);
    --glow-green: 0 0 30px rgba(34, 197, 94, 0.25);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --input-bg: rgba(0, 0, 0, 0.35);
    --result-bg: rgba(0, 0, 0, 0.25);
    --detail-bg: rgba(0, 0, 0, 0.2);
    --nav-scrolled-bg: rgba(5, 8, 22, 0.92);
    --footer-bg: rgba(0, 0, 0, 0.4);
    --matrix-clear: rgba(5, 8, 22, 0.06);
    --matrix-color: #00d4ff;
    --marquee-bg: rgba(0, 212, 255, 0.03);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LIGHT MODE VARIABLES ===== */
body.light-mode {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-blue: #0284c7;
    --accent-cyan: #0891b2;
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    --accent-orange: #d97706;
    --gradient-primary: linear-gradient(135deg, #0284c7, #7c3aed);
    --gradient-hot: linear-gradient(135deg, #db2777, #d97706);
    --gradient-danger: linear-gradient(135deg, #dc2626, #b91c1c);
    --gradient-safe: linear-gradient(135deg, #16a34a, #0891b2);
    --gradient-warning: linear-gradient(135deg, #d97706, #b45309);
    --border-color: rgba(15, 23, 42, 0.08);
    --glow-blue: 0 4px 20px rgba(2, 132, 199, 0.15), 0 0 40px rgba(2, 132, 199, 0.05);
    --glow-purple: 0 4px 20px rgba(124, 58, 237, 0.15);
    --glow-red: 0 4px 20px rgba(220, 38, 38, 0.15);
    --glow-green: 0 4px 20px rgba(22, 163, 74, 0.15);
    --glass: rgba(15, 23, 42, 0.02);
    --glass-border: rgba(15, 23, 42, 0.08);
    --input-bg: rgba(241, 245, 249, 0.8);
    --result-bg: rgba(241, 245, 249, 0.6);
    --detail-bg: rgba(241, 245, 249, 0.5);
    --nav-scrolled-bg: rgba(240, 244, 248, 0.92);
    --footer-bg: rgba(226, 232, 240, 0.6);
    --matrix-clear: rgba(240, 244, 248, 0.12);
    --matrix-color: #0284c7;
    --marquee-bg: rgba(2, 132, 199, 0.04);
}

/* Light mode overrides for elements with hardcoded colors */
body.light-mode #matrixCanvas { opacity: 0.04 !important; }
body.light-mode .cyber-bg .particle:nth-child(odd) { background: var(--accent-blue); }
body.light-mode .cyber-bg .particle:nth-child(even) { background: var(--accent-purple); }
body.light-mode .grid-overlay {
    background-image:
        linear-gradient(rgba(2, 132, 199, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 132, 199, 0.04) 1px, transparent 1px);
}
body.light-mode .scan-line { background: linear-gradient(90deg, transparent, var(--accent-blue), transparent); opacity: 0.15; }
body.light-mode .navbar.scrolled {
    background: var(--nav-scrolled-bg);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom-color: rgba(2, 132, 199, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
body.light-mode .nav-logo { color: var(--text-primary); }
body.light-mode .hero-badge { background: rgba(2, 132, 199, 0.08); border-color: rgba(2, 132, 199, 0.15); }
body.light-mode .badge-sparkle { background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.15), transparent); }
body.light-mode .status-indicator { background: rgba(22, 163, 74, 0.06); border-color: rgba(22, 163, 74, 0.12); }
body.light-mode .feature-card,
body.light-mode .scanner-card,
body.light-mode .email-card,
body.light-mode .dash-card,
body.light-mode .chart-card,
body.light-mode .learn-card,
body.light-mode .quiz-card {
    background: var(--bg-card);
    border-color: var(--glass-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
body.light-mode .feature-card:hover,
body.light-mode .dash-card:hover,
body.light-mode .learn-card:hover {
    box-shadow: 0 8px 30px rgba(2, 132, 199, 0.12);
    border-color: rgba(2, 132, 199, 0.2);
}
body.light-mode .scanner-input-group {
    background: var(--input-bg);
    border-color: rgba(15, 23, 42, 0.12);
}
body.light-mode .scanner-input-group:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}
body.light-mode .scanner-input { color: var(--text-primary); }
body.light-mode .form-input,
body.light-mode .form-textarea {
    background: var(--input-bg);
    border-color: rgba(15, 23, 42, 0.1);
    color: var(--text-primary);
}
body.light-mode .form-input:focus,
body.light-mode .form-textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.08);
}
body.light-mode .result-panel {
    background: var(--result-bg);
    border-color: var(--glass-border);
}
body.light-mode .detail-item {
    background: var(--detail-bg);
    border-color: var(--glass-border);
}
body.light-mode .quick-test .test-btn {
    background: rgba(241, 245, 249, 0.6);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text-secondary);
}
body.light-mode .loader-step {
    background: rgba(241, 245, 249, 0.6);
    border-color: var(--glass-border);
}
body.light-mode .threat-bar { background: rgba(15, 23, 42, 0.05); }
body.light-mode .activity-item:hover { background: rgba(2, 132, 199, 0.04); }
body.light-mode .quiz-option {
    background: var(--input-bg);
    border-color: rgba(15, 23, 42, 0.1);
    color: var(--text-secondary);
}
body.light-mode .quiz-option:hover {
    border-color: var(--accent-blue);
    background: rgba(2, 132, 199, 0.05);
}
body.light-mode .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--glass-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
body.light-mode .section-badge {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.12);
}
body.light-mode .tag {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.1);
}
body.light-mode .footer {
    background: var(--footer-bg);
    border-top-color: var(--glass-border);
}
body.light-mode .footer-logo { color: var(--text-primary); }
body.light-mode .social-links a {
    background: rgba(241, 245, 249, 0.6);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text-secondary);
}
body.light-mode .social-links a:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(2, 132, 199, 0.08);
}
body.light-mode .back-to-top { box-shadow: 0 4px 15px rgba(2, 132, 199, 0.2); }
body.light-mode .threat-marquee {
    background: var(--marquee-bg);
    border-color: rgba(2, 132, 199, 0.08);
}
body.light-mode .hero-stat.glass-card {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(15, 23, 42, 0.06);
}
body.light-mode .hero-stat:hover {
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.12);
    border-color: rgba(2, 132, 199, 0.15);
}
body.light-mode .shield-ring { border-color: rgba(2, 132, 199, 0.15) !important; }
body.light-mode .orbit-item {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
body.light-mode .card-scan-line { background: linear-gradient(90deg, transparent, var(--accent-blue), transparent); opacity: 0.3; }
body.light-mode .glow-border::before { background: linear-gradient(45deg, transparent 30%, rgba(2, 132, 199, 0.1) 50%, transparent 70%); }
body.light-mode .dash-sparkline .spark-bar { background: var(--gradient-primary); opacity: 0.5; }
body.light-mode .dash-sparkline .spark-bar:hover { opacity: 0.8; }
body.light-mode .nav-link.active { box-shadow: 0 0 10px rgba(2, 132, 199, 0.1); }
body.light-mode ::-webkit-scrollbar-track { background: var(--bg-primary); }
body.light-mode ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #0284c7, #7c3aed); }
body.light-mode .theme-toggle { color: var(--accent-orange); }
body.light-mode .theme-toggle:hover { background: rgba(217, 119, 6, 0.1); border-color: var(--accent-orange); }
body.light-mode .feature-shine { background: radial-gradient(circle, rgba(2, 132, 199, 0.04) 0%, transparent 70%); }
body.light-mode .nav-links.active { background: rgba(240, 244, 248, 0.98); }

/* Smooth transition for theme switching */
body, body * {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
/* Exclude animations from theme transition */
.particle, .shield-ring, .orbit-item, .loader-progress, .threat-fill, .risk-fill, .btn-shine, .badge-sparkle, .scan-line, .card-scan-line, .marquee-track {
    transition: none !important;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection { background: rgba(0, 212, 255, 0.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00d4ff, #a855f7); border-radius: 4px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent-blue); }
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== MATRIX CANVAS ===== */
#matrixCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.07;
    pointer-events: none;
}

/* ===== ANIMATED BACKGROUND ===== */
.cyber-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: gridPulse 4s ease-in-out infinite;
}
@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.scan-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    animation: scanDown 6s ease-in-out infinite;
    opacity: 0.4;
}
@keyframes scanDown {
    0% { top: -2px; }
    100% { top: 100%; }
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite;
}
.particle:nth-child(odd) { width: 3px; height: 3px; background: var(--accent-blue); }
.particle:nth-child(even) { width: 2px; height: 2px; background: var(--accent-purple); }
.particle:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 12%; animation-delay: 0.5s; animation-duration: 9s; }
.particle:nth-child(3) { left: 22%; animation-delay: 1s; animation-duration: 6s; }
.particle:nth-child(4) { left: 35%; animation-delay: 1.5s; animation-duration: 8s; }
.particle:nth-child(5) { left: 45%; animation-delay: 2s; animation-duration: 10s; }
.particle:nth-child(6) { left: 58%; animation-delay: 0.8s; animation-duration: 7s; }
.particle:nth-child(7) { left: 68%; animation-delay: 2.5s; animation-duration: 9s; }
.particle:nth-child(8) { left: 78%; animation-delay: 0.3s; animation-duration: 6s; }
.particle:nth-child(9) { left: 85%; animation-delay: 1.8s; animation-duration: 8s; }
.particle:nth-child(10) { left: 92%; animation-delay: 3s; animation-duration: 11s; }
.particle:nth-child(11) { left: 30%; animation-delay: 3.5s; animation-duration: 7s; }
.particle:nth-child(12) { left: 55%; animation-delay: 4s; animation-duration: 9s; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ===== GLOW BORDER (reusable) ===== */
.glow-border {
    position: relative;
    overflow: hidden;
}
.glow-border::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    right: -1px; bottom: -1px;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 212, 255, 0.15) 50%, transparent 70%);
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}
@keyframes borderGlow {
    0%, 100% { opacity: 0.3; transform: rotate(0deg); }
    50% { opacity: 1; }
}

/* Card scan line effect */
.card-scan-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    animation: cardScan 3s ease-in-out infinite;
    z-index: 2;
}
@keyframes cardScan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Button shine effect */
.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btnShine 3s infinite;
}
@keyframes btnShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Feature shine */
.feature-shine {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.feature-card:hover .feature-shine { opacity: 1; }

/* Animate float */
.animate-float { animation: float 4s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Pulse icon */
.pulse-icon {
    animation: iconPulse 2s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(0, 212, 255, 0); }
}

/* Glass card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 90px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(20px);
    animation: toastIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.toast.safe { border-left: 3px solid var(--accent-green); }
.toast.danger { border-left: 3px solid var(--accent-red); }
.toast.warning { border-left: 3px solid var(--accent-orange); }
.toast.info { border-left: 3px solid var(--accent-blue); }
.toast i { font-size: 1.2rem; }
.toast.safe i { color: var(--accent-green); }
.toast.danger i { color: var(--accent-red); }
.toast.warning i { color: var(--accent-orange); }
.toast.info i { color: var(--accent-blue); }
.toast span { font-size: 0.85rem; color: var(--text-secondary); }
.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 14px 0;
    transition: var(--transition);
    background: transparent;
}
.navbar.scrolled {
    background: var(--nav-scrolled-bg);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}
.logo-icon-wrap {
    position: relative;
    font-size: 1.6rem;
}
.logo-icon-wrap i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-pulse-ring {
    position: absolute;
    top: -4px; left: -4px;
    right: -4px; bottom: -4px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    animation: logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0; }
}

.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link i { font-size: 0.75rem; }
.nav-link:hover, .nav-link.active {
    color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.08);
}
.nav-link.active {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--accent-green);
    background: rgba(34, 197, 94, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.15);
}
.pulse-dot {
    width: 8px; height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--accent-green);
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.5); }
}

.theme-toggle {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--accent-purple);
    width: 36px; height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.theme-toggle:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--accent-purple);
    transform: rotate(15deg);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
}

.hero-content { flex: 1; max-width: 620px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.82rem;
    color: var(--accent-blue);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.badge-sparkle {
    position: absolute;
    top: 0; left: -40%;
    width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    animation: sparkle 2.5s infinite;
}
@keyframes sparkle {
    0% { left: -40%; }
    100% { left: 140%; }
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 22px;
    letter-spacing: -2px;
}
.title-line { display: block; }
.title-line:nth-child(1) { animation: fadeSlideRight 0.8s ease both; }
.title-line:nth-child(2) { animation: fadeSlideRight 0.8s ease 0.15s both; }
.title-line:nth-child(3) { animation: fadeSlideRight 0.8s ease 0.3s both; }

@keyframes fadeSlideRight {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

.typing-text::after {
    content: '|';
    animation: blink 0.8s infinite;
    color: var(--accent-blue);
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 52px;
    animation: fadeInUp 0.8s ease 0.5s both;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--glow-blue);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.4), 0 0 100px rgba(0, 212, 255, 0.15);
}
.btn-cyber {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.btn-cyber:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
    transform: translateY(-3px);
    box-shadow: var(--glow-purple);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-3px);
}
.btn-glow { animation: glowPulse 2s ease-in-out infinite; }
@keyframes glowPulse {
    0%, 100% { box-shadow: var(--glow-blue); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.45), 0 0 80px rgba(168, 85, 247, 0.2); }
}

.hero-stats {
    display: flex;
    gap: 20px;
    animation: fadeInUp 0.8s ease 0.6s both;
}
.hero-stat {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
.hero-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow-blue);
    border-color: rgba(0, 212, 255, 0.2);
}
.stat-icon {
    font-size: 1.2rem;
    color: var(--accent-blue);
    margin-bottom: 4px;
}
.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease 0.3s both;
}

.shield-container {
    position: relative;
    width: 380px; height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shield-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid;
}
.ring-1 {
    width: 100%; height: 100%;
    border-color: rgba(0, 212, 255, 0.12);
    animation: rotateRing 25s linear infinite;
    border-style: dashed;
}
.ring-2 {
    width: 75%; height: 75%;
    border-color: rgba(168, 85, 247, 0.12);
    animation: rotateRing 18s linear infinite reverse;
}
.ring-3 {
    width: 50%; height: 50%;
    border-color: rgba(0, 212, 255, 0.18);
    animation: rotateRing 12s linear infinite;
    border-style: dotted;
}

.ring-dot {
    position: absolute;
    top: -4px; left: 50%;
    width: 8px; height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-blue);
}
.ring-2 .ring-dot { background: var(--accent-purple); box-shadow: 0 0 10px var(--accent-purple); }

@keyframes rotateRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hex-grid {
    position: absolute;
    width: 120px; height: 120px;
    opacity: 0.1;
}
.hex {
    position: absolute;
    width: 30px; height: 30px;
    background: var(--accent-blue);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: hexPulse 3s ease-in-out infinite;
}
.hex:nth-child(1) { top: 0; left: 20px; animation-delay: 0s; }
.hex:nth-child(2) { top: 0; left: 55px; animation-delay: 0.5s; }
.hex:nth-child(3) { top: 25px; left: 2px; animation-delay: 1s; }
.hex:nth-child(4) { top: 25px; left: 38px; animation-delay: 0.3s; }
.hex:nth-child(5) { top: 25px; left: 72px; animation-delay: 0.8s; }
.hex:nth-child(6) { top: 50px; left: 20px; animation-delay: 1.2s; }
@keyframes hexPulse {
    0%, 100% { opacity: 0.3; } 50% { opacity: 1; }
}

.shield-icon {
    font-size: 5.5rem;
    position: relative;
}
.shield-icon i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.5));
}
.shield-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: shieldGlow 3s ease-in-out infinite;
}
@keyframes shieldGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
}

.orbit-item {
    position: absolute;
    width: 42px; height: 42px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    animation: orbitFloat 4s ease-in-out infinite;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.orbit-1 { top: 2%; left: 50%; color: var(--accent-red); animation-delay: 0s; }
.orbit-2 { top: 25%; right: 2%; color: var(--accent-orange); animation-delay: 0.7s; }
.orbit-3 { bottom: 25%; right: 2%; color: var(--accent-red); animation-delay: 1.4s; }
.orbit-4 { bottom: 2%; left: 50%; color: var(--accent-green); animation-delay: 2.1s; }
.orbit-5 { top: 25%; left: 2%; color: var(--accent-purple); animation-delay: 2.8s; }
.orbit-6 { bottom: 25%; left: 2%; color: var(--accent-pink); animation-delay: 3.5s; }

@keyframes orbitFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.1); }
}

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

/* ===== THREAT MARQUEE ===== */
.threat-marquee {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: rgba(0, 212, 255, 0.03);
    border-top: 1px solid rgba(0, 212, 255, 0.08);
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
    padding: 14px 0;
}
.marquee-track {
    display: flex;
    gap: 60px;
    animation: marqueeScroll 30s linear infinite;
    white-space: nowrap;
    width: max-content;
}
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.marquee-item i {
    color: var(--accent-blue);
    font-size: 0.9rem;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== FEATURES ===== */
.features { position: relative; z-index: 1; padding: 80px 0 100px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: var(--glow-blue);
    background: var(--bg-card-hover);
}
.feature-icon {
    width: 64px; height: 64px;
    margin: 0 auto 22px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    transition: var(--transition);
}
.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 10px; font-weight: 700; }
.feature-card p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.7; }

/* ===== SECTION COMMON ===== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.12);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}
.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== SCANNER ===== */
.scanner-section, .email-section { position: relative; z-index: 1; padding: 100px 0; }

.scanner-card, .email-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 44px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.scanner-input-group {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px;
    transition: var(--transition);
}
.scanner-input-group:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.08), var(--glow-blue);
}

.input-icon { padding: 0 16px; color: var(--text-muted); font-size: 1.1rem; }

.scanner-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 14px 0;
}
.scanner-input::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; }

.scan-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.scan-btn:hover { transform: scale(1.03); box-shadow: var(--glow-blue); }
.scan-btn:active { transform: scale(0.97); }

.quick-test {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.test-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--glass);
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}
.test-btn i { font-size: 0.7rem; }
.test-btn:hover { transform: translateY(-2px); }
.test-btn.safe:hover { border-color: var(--accent-green); color: var(--accent-green); box-shadow: var(--glow-green); }
.test-btn.danger:hover { border-color: var(--accent-red); color: var(--accent-red); box-shadow: var(--glow-red); }
.test-btn.warning:hover { border-color: var(--accent-orange); color: var(--accent-orange); }

/* Loader */
.scan-loader { display: none; margin-top: 28px; padding: 20px; }
.scan-loader.active { display: block; }
.loader-bar {
    height: 3px;
    background: rgba(0, 212, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}
.loader-progress {
    height: 100%;
    width: 30%;
    background: var(--gradient-primary);
    border-radius: 4px;
    animation: loaderSlide 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
@keyframes loaderSlide {
    0% { transform: translateX(-100%); width: 30%; }
    50% { width: 60%; }
    100% { transform: translateX(400%); width: 30%; }
}

.loader-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.loader-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}
.loader-step.active {
    color: var(--accent-blue);
    border-color: rgba(0, 212, 255, 0.2);
    background: rgba(0, 212, 255, 0.05);
}
.loader-step i { font-size: 0.7rem; }

/* Result Panel */
.result-panel {
    display: none;
    margin-top: 28px;
    padding: 28px;
    background: var(--result-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    animation: resultReveal 0.6s cubic-bezier(0.68, -0.3, 0.27, 1.2);
}
.result-panel.active { display: block; }
@keyframes resultReveal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.result-status { display: flex; align-items: center; gap: 16px; }
.status-icon { font-size: 2.8rem; }
.result-panel.safe .status-icon { color: var(--accent-green); animation: iconBounce 0.6s ease; }
.result-panel.danger .status-icon { color: var(--accent-red); animation: iconShake 0.6s ease; }
.result-panel.warning .status-icon { color: var(--accent-orange); animation: iconBounce 0.6s ease; }

@keyframes iconBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
@keyframes iconShake {
    0% { transform: scale(0) rotate(0); }
    30% { transform: scale(1.2) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

.status-info h3 { font-size: 1.5rem; font-weight: 700; }
.result-panel.safe .status-info h3 { color: var(--accent-green); }
.result-panel.danger .status-info h3 { color: var(--accent-red); }
.result-panel.warning .status-info h3 { color: var(--accent-orange); }
.status-info p { font-size: 0.88rem; color: var(--text-secondary); }

/* Risk Score Circle */
.risk-score { position: relative; width: 95px; height: 95px; }
.risk-circle { width: 100%; height: 100%; transform: rotate(-90deg); }
.risk-bg { fill: none; stroke: rgba(255, 255, 255, 0.04); stroke-width: 5; }
.risk-fill {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1.5s ease, stroke 0.5s ease;
    filter: drop-shadow(0 0 6px currentColor);
}
.result-panel.danger .risk-fill { stroke: var(--accent-red); }
.result-panel.warning .risk-fill { stroke: var(--accent-orange); }

.risk-value {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.risk-value span {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}
.risk-value small {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Result Details */
.result-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-xs);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    animation: detailSlideIn 0.4s ease both;
}
.detail-item:hover {
    transform: translateX(4px);
    background: rgba(0, 0, 0, 0.3);
}
.detail-item i { font-size: 1rem; width: 20px; text-align: center; }
.detail-item.pass i { color: var(--accent-green); }
.detail-item.fail i { color: var(--accent-red); }
.detail-item.warn i { color: var(--accent-orange); }
.detail-item .detail-text { font-size: 0.85rem; }
.detail-item .detail-text strong { display: block; font-size: 0.82rem; color: var(--text-primary); }
.detail-item .detail-text span { font-size: 0.76rem; color: var(--text-secondary); }

@keyframes detailSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== EMAIL SECTION ===== */
.email-form { display: grid; gap: 20px; }
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.form-group label i { color: var(--accent-blue); font-size: 0.82rem; }
.form-input, .form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
}
.form-actions { display: flex; gap: 12px; }

/* ===== DASHBOARD ===== */
.dashboard-section { position: relative; z-index: 1; padding: 100px 0; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.dash-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-6px);
    box-shadow: var(--glow-blue);
}
.dash-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.dash-card-header i { color: var(--accent-blue); }
.dash-number {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.dash-trend {
    font-size: 0.76rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}
.dash-trend.up { color: var(--accent-red); }
.dash-trend.up.success { color: var(--accent-green); }
.dash-trend.down.success { color: var(--accent-green); }

/* Mini Sparkline */
.dash-sparkline {
    height: 30px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
}
.spark-bar {
    flex: 1;
    background: var(--gradient-primary);
    border-radius: 2px 2px 0 0;
    min-width: 4px;
    transition: height 1s ease;
    opacity: 0.6;
}
.spark-bar:hover { opacity: 1; }

.chart-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.chart-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}
.chart-card h3 i { color: var(--accent-blue); }

.threat-bars { display: flex; flex-direction: column; gap: 20px; }
.threat-bar-item { display: flex; align-items: center; gap: 14px; }
.threat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    min-width: 130px;
}
.threat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.threat-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 5px;
    overflow: hidden;
}
.threat-fill {
    height: 100%;
    border-radius: 5px;
    width: 0%;
    transition: width 1.5s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}
.threat-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    min-width: 35px;
}

.activity-feed { display: flex; flex-direction: column; gap: 4px; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}
.activity-item:hover { background: rgba(255, 255, 255, 0.03); transform: translateX(4px); }
.activity-item.safe i { color: var(--accent-green); }
.activity-item.danger i { color: var(--accent-red); }
.activity-item.warning i { color: var(--accent-orange); }
.activity-info { display: flex; flex-direction: column; }
.activity-info span {
    font-size: 0.86rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}
.activity-info small { font-size: 0.73rem; color: var(--text-muted); }

/* ===== LEARN SECTION ===== */
.learn-section { position: relative; z-index: 1; padding: 100px 0; }
.learn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 40px; }
.learn-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.learn-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-6px);
    box-shadow: var(--glow-blue);
}
.learn-card-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 20px;
}
.warning-bg { background: linear-gradient(135deg, #f59e0b, #d97706); }
.danger-bg { background: linear-gradient(135deg, #ef4444, #dc2626); }
.info-bg { background: linear-gradient(135deg, #00d4ff, #0099cc); }
.success-bg { background: linear-gradient(135deg, #22c55e, #16a34a); }
.learn-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.learn-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.learn-tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tag {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.73rem;
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 212, 255, 0.12);
}
.red-flags-list, .protection-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.red-flags-list li, .protection-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--text-secondary);
}
.red-flags-list li i { color: var(--accent-red); font-size: 0.7rem; }
.protection-list li i { color: var(--accent-green); }
.phishing-types { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.type-item strong { font-size: 0.88rem; color: var(--accent-blue); }
.type-item p { font-size: 0.8rem; margin-top: 2px; }

/* Quiz */
.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 44px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.quiz-header { margin-bottom: 28px; }
.quiz-header i {
    font-size: 2.2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    display: block;
}
.quiz-header h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.quiz-header p { color: var(--text-secondary); font-size: 0.92rem; }
.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}
.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}
.quiz-option:hover { border-color: var(--accent-blue); color: var(--text-primary); background: rgba(0, 212, 255, 0.05); transform: translateY(-2px); }
.quiz-option.correct { border-color: var(--accent-green); background: rgba(34, 197, 94, 0.1); color: var(--accent-green); }
.quiz-option.wrong { border-color: var(--accent-red); background: rgba(239, 68, 68, 0.1); color: var(--accent-red); }
.quiz-option:disabled { cursor: default; opacity: 0.7; }
.quiz-feedback {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius-xs);
    font-size: 0.88rem;
    display: none;
}
.quiz-feedback.show { display: block; animation: fadeInUp 0.4s ease; }
.quiz-feedback.correct { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.quiz-feedback.wrong { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.15); color: var(--accent-red); }

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
    background: var(--footer-bg);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-logo i { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.footer-brand p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}
.social-links a:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-4px) rotate(5deg);
    box-shadow: var(--glow-blue);
}
.footer-links h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-links a {
    display: block;
    font-size: 0.84rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 5px 0;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--accent-blue); padding-left: 6px; }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--glow-blue);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px) scale(1.05); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-section { grid-template-columns: 1fr; }
    .hero { flex-direction: column; text-align: center; padding: 120px 24px 60px; }
    .hero-content { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
    .hero-title { font-size: 3rem; }
    .title-line { animation: fadeInUp 0.8s ease both !important; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-actions { display: none; }
    .mobile-toggle { display: block; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0;
        width: 100%;
        background: rgba(5, 8, 22, 0.98);
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
        backdrop-filter: blur(20px);
    }
    .features-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .learn-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.4rem; letter-spacing: -1px; }
    .section-title { font-size: 1.8rem; }
    .scanner-card, .email-card { padding: 24px; }
    .scanner-input-group { flex-direction: column; gap: 10px; }
    .scan-btn { width: 100%; justify-content: center; }
    .quiz-options { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
    .result-header { flex-direction: column; gap: 20px; }
    .loader-steps { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.9rem; }
    .hero-stats { flex-direction: column; gap: 12px; align-items: center; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .nb-legend { flex-direction: column; gap: 12px; }
}

/* ===== SCROLL ANIMATIONS ===== */
.feature-card, .dash-card, .learn-card, .chart-card, .quiz-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card.visible, .dash-card.visible, .learn-card.visible, .chart-card.visible, .quiz-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== LANGUAGE TOGGLE BUTTON ===== */
.lang-toggle {
    width: 42px;
    height: 42px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lang-toggle:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--glow-blue);
}

/* ===== RTL SUPPORT (Arabic) ===== */
body.rtl {
    direction: rtl;
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
body.rtl .hero-title,
body.rtl .section-title,
body.rtl .nav-logo span,
body.rtl .footer-logo span {
    font-family: 'Cairo', 'Orbitron', sans-serif;
}
body.rtl .scanner-input,
body.rtl .form-input,
body.rtl .form-textarea {
    text-align: right;
    font-family: 'Cairo', 'JetBrains Mono', monospace;
}
body.rtl .quiz-option {
    text-align: right;
    font-family: 'Cairo', 'JetBrains Mono', monospace;
}
body.rtl .activity-info span {
    font-family: 'Cairo', 'JetBrains Mono', monospace;
}
body.rtl .footer-links a:hover {
    padding-left: 0;
    padding-right: 6px;
}
body.rtl .activity-item:hover {
    transform: translateX(-4px);
}
body.rtl .back-to-top {
    right: auto;
    left: 30px;
}
body.rtl .nav-links.active {
    left: auto;
    right: 0;
}
body.rtl .red-flags-list li i.fa-caret-right {
    transform: scaleX(-1);
}
body.rtl .social-links a:hover {
    transform: translateY(-4px) rotate(-5deg);
}
body.rtl .threat-marquee .marquee-track {
    animation-direction: reverse;
}
body.rtl .detail-item {
    text-align: right;
}
body.rtl .result-status {
    text-align: right;
}

/* Mobile: keep lang toggle + theme toggle visible */
@media (max-width: 768px) {
    .nav-actions {
        display: flex !important;
        gap: 8px;
        align-items: center;
    }
    .nav-actions .status-indicator {
        display: none;
    }
}

/* RTL mobile adjustments */
@media (max-width: 1024px) {
    body.rtl .hero {
        text-align: center;
    }
    body.rtl .hero-buttons {
        justify-content: center;
    }
}
