/* ============================================
   SafeGuard AI - Main Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --primary-blue-light: #60a5fa;
    --navy-dark: #0f172a;
    --navy-medium: #1e293b;
    --navy-light: #334155;
    
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-orange: #f97316;
    --critical-red: #ef4444;
    
    --bg-white: #ffffff;
    --bg-off-white: #f8fafc;
    --bg-light-gray: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.2), 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    --perspective: 1000px;
    --rotate-x: 0deg;
    --rotate-y: 0deg;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-white: #0a0f1a;
    --bg-off-white: #1a1f2e;
    --bg-light-gray: #252b3d;
    --bg-gradient: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    --bg-gradient-blue: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #2d3748;
    --border-light: #3d4a5c;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.7), 0 10px 25px rgba(0, 0, 0, 0.6);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.8), 0 10px 20px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    perspective: var(--perspective);
    transition: background var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    transform-style: preserve-3d;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
}

body.dark-mode .navbar {
    background: rgba(10, 15, 26, 0.95);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
    transform: translateZ(20px);
}

.nav-logo:hover {
    transform: translateZ(30px) scale(1.05);
}

.nav-logo i {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transform: translateZ(10px);
}

.nav-link:hover {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: translateZ(20px);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-blue);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light-gray);
    border-radius: var(--radius-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-item i {
    color: var(--primary-blue);
}

.nav-history-btn,
.nav-theme-toggle,
.nav-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-history-btn:hover,
.nav-theme-toggle:hover,
.nav-mobile-toggle:hover {
    background-color: var(--bg-light-gray);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.nav-mobile-toggle {
    display: none;
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    transform: translateZ(0);
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    transform: translateZ(10px);
}

.mobile-history-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    transform: translateZ(0);
}

.mobile-history-btn:hover {
    background: var(--bg-off-white);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateZ(10px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   History Drawer
   ============================================ */

.history-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    transition: right var(--transition-normal), transform var(--transition-normal);
    box-shadow: var(--shadow-3d);
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
}

.history-drawer.open {
    right: 0;
    transform: translateZ(30px);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    transform-style: preserve-3d;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-header h2 i {
    color: var(--primary-blue);
}

.drawer-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.drawer-close:hover {
    background: var(--bg-light-gray);
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-history {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.history-item {
    padding: 1rem;
    background: var(--bg-light-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.history-item:hover {
    background: var(--bg-white);
    transform: translateZ(15px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.history-item-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-item-preview {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-score {
    font-weight: 600;
    color: var(--text-primary);
}

.history-risk {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.history-risk.low {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.history-risk.medium {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-yellow);
}

.history-risk.high {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--danger-orange);
}

.history-risk.critical {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--critical-red);
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.history-action-btn {
    flex: 1;
    padding: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-action-btn:hover {
    background-color: var(--bg-white);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.history-action-btn.delete:hover {
    border-color: var(--critical-red);
    color: var(--critical-red);
}

.drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--bg-gradient-blue);
    color: white;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.btn-primary:hover {
    transform: translateY(-4px) translateZ(10px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(-2px) translateZ(5px);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--bg-off-white);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-4px) translateZ(10px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
    transform-style: preserve-3d;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: var(--bg-gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateZ(30px);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.analysis-visual {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-3d);
    backdrop-filter: blur(20px);
    transform: rotateY(-10deg) rotateX(5deg) translateZ(50px);
    transition: transform var(--transition-slow);
}

.analysis-visual:hover {
    transform: rotateY(-5deg) rotateX(2deg) translateZ(70px);
}

.visual-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.visual-header i {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.visual-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.visual-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.visual-checks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.4s ease-out backwards;
}

.check-item:nth-child(1) { animation-delay: 0.3s; }
.check-item:nth-child(2) { animation-delay: 0.4s; }
.check-item:nth-child(3) { animation-delay: 0.5s; }
.check-item:nth-child(4) { animation-delay: 0.6s; }

.check-item i {
    color: var(--success-green);
}

/* ============================================
   Section Styles
   ============================================ */

section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
}

/* ============================================
   How It Works
   ============================================ */

.how-it-works {
    background: var(--bg-white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.step-card:hover {
    transform: translateY(-8px) translateZ(30px);
    box-shadow: var(--shadow-3d);
    border-color: var(--primary-blue);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    opacity: 0.2;
    margin-bottom: 1rem;
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   What We Detect
   ============================================ */

.what-we-detect {
    background: var(--bg-off-white);
}

.detect-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.detect-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.detect-card:hover {
    transform: translateY(-8px) translateZ(30px) rotateX(5deg);
    box-shadow: var(--shadow-3d);
    border-color: var(--primary-blue);
}

.detect-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient-blue);
    border-radius: var(--radius-xl);
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateZ(20px);
    transition: transform var(--transition-normal);
}

.detect-card:hover .detect-icon {
    transform: translateZ(30px) scale(1.1);
}

.detect-icon i {
    color: white;
    font-size: 1.75rem;
}

.detect-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.detect-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ============================================
   Quick Demo
   ============================================ */

.quick-demo {
    background: var(--bg-white);
}

.demo-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.demo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.demo-btn i {
    font-size: 1.5rem;
    color: var(--primary-blue);
    transform: translateZ(15px);
    transition: transform var(--transition-normal);
}

.demo-btn:hover {
    background: var(--bg-off-white);
    border-color: var(--primary-blue);
    transform: translateY(-6px) translateZ(20px) rotateX(5deg);
    box-shadow: var(--shadow-3d);
}

.demo-btn:hover i {
    transform: translateZ(25px) scale(1.1);
}

/* ============================================
   Trust Message
   ============================================ */

.trust-message {
    background: var(--bg-off-white);
    padding: 3rem 0;
}

.trust-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.trust-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient-blue);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transform: translateZ(20px);
    animation: float 3s ease-in-out infinite;
}

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

.trust-icon i {
    color: white;
    font-size: 2.5rem;
}

.trust-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.trust-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================
   Scanner Section
   ============================================ */

.scanner-section {
    padding: 3rem 0;
    background: var(--bg-off-white);
}

.scanner-header {
    text-align: center;
    margin-bottom: 3rem;
}

.scanner-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.scanner-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.scanner-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.scanner-main {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-3d);
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
}

.scanner-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    background: var(--bg-light-gray);
}

.tab-btn.active {
    background: var(--primary-blue);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.input-error {
    color: var(--critical-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-examples {
    padding: 1rem;
    background: var(--bg-light-gray);
    border-radius: var(--radius-md);
}

.form-examples p {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-examples code {
    display: block;
    padding: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.scanner-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateZ(10px);
    transition: all var(--transition-normal);
}

.side-card:hover {
    transform: translateZ(20px);
    box-shadow: var(--shadow-xl);
}

.side-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.side-card h3 i {
    color: var(--primary-blue);
}

.check-list {
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.check-list li i {
    color: var(--success-green);
}

.side-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ============================================
   Loading State
   ============================================ */

.loading-state {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

.loading-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInUp 0.3s ease-out forwards;
}

.loading-step:nth-child(1) { animation-delay: 0.2s; }
.loading-step:nth-child(2) { animation-delay: 0.4s; }
.loading-step:nth-child(3) { animation-delay: 0.6s; }
.loading-step:nth-child(4) { animation-delay: 0.8s; }
.loading-step:nth-child(5) { animation-delay: 1s; }

.loading-step i {
    color: var(--success-green);
}

/* ============================================
   Results Section
   ============================================ */

.results-section {
    padding: 3rem 0;
    background: var(--bg-off-white);
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.results-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.risk-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.score-circle {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 1.5rem;
    transform-style: preserve-3d;
    transform: translateZ(20px);
}

.score-circle svg {
    width: 100%;
    height: 100%;
}

.score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.score-total {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.risk-level {
    text-align: center;
}

.risk-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.risk-badge.low {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.risk-badge.medium {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-yellow);
}

.risk-badge.high {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--danger-orange);
}

.risk-badge.critical {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--critical-red);
}

.risk-message {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ============================================
   Findings Section
   ============================================ */

.findings-section,
.ai-explanation-section,
.action-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: all var(--transition-normal);
}

.findings-section:hover,
.ai-explanation-section:hover,
.action-section:hover {
    transform: translateZ(10px);
    box-shadow: var(--shadow-xl);
}

.findings-section h2,
.ai-explanation-section h2,
.action-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.findings-section h2 i,
.ai-explanation-section h2 i,
.action-section h2 i {
    color: var(--primary-blue);
}

.findings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.finding-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light-gray);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.finding-item.critical {
    border-left-color: var(--critical-red);
}

.finding-item.high {
    border-left-color: var(--danger-orange);
}

.finding-item.medium {
    border-left-color: var(--warning-yellow);
}

.finding-item.low {
    border-left-color: var(--success-green);
}

.finding-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.finding-icon.critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--critical-red);
}

.finding-icon.high {
    background: rgba(249, 115, 22, 0.1);
    color: var(--danger-orange);
}

.finding-icon.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-yellow);
}

.finding-icon.low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.finding-content {
    flex: 1;
}

.finding-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.finding-explanation {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.no-findings {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* ============================================
   Breakdown Section
   ============================================ */

.breakdown-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    transform-style: preserve-3d;
}

.breakdown-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.breakdown-section h2 i {
    color: var(--primary-blue);
}

.breakdown-card {
    background: var(--bg-light-gray);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transform: translateZ(10px);
}

.breakdown-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-weight: 600;
    color: var(--text-secondary);
    width: 120px;
    flex-shrink: 0;
}

.breakdown-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.breakdown-value.suspicious {
    color: var(--critical-red);
    font-weight: 600;
}

.breakdown-value.highlight {
    background: rgba(239, 68, 68, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
}

.breakdown-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   AI Explanation
   ============================================ */

.ai-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transform: translateZ(15px);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-header i {
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.ai-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.ai-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* ============================================
   Action Section
   ============================================ */

.action-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.action-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.action-icon.low-risk {
    background: rgba(16, 185, 129, 0.1);
}

.action-icon.low-risk i {
    color: var(--success-green);
    font-size: 1.5rem;
}

.action-icon.high-risk {
    background: rgba(239, 68, 68, 0.1);
}

.action-icon.high-risk i {
    color: var(--critical-red);
    font-size: 1.5rem;
}

.action-content h3 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.action-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ============================================
   Learn Page
   ============================================ */

.learn-hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-off-white) 0%, var(--bg-white) 100%);
    text-align: center;
}

.learn-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.learn-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.educational-cards {
    background: var(--bg-white);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.topic-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.topic-card:hover {
    transform: translateY(-8px) translateZ(30px) rotateX(5deg);
    box-shadow: var(--shadow-3d);
    border-color: var(--primary-blue);
}

.topic-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient-blue);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateZ(20px);
    transition: transform var(--transition-normal);
}

.topic-card:hover .topic-icon {
    transform: translateZ(30px) scale(1.1);
}

.topic-icon i {
    color: white;
    font-size: 1.75rem;
}

.topic-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.topic-card > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.topic-details {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.topic-details h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.topic-details ul {
    list-style: none;
    margin-bottom: 1rem;
}

.topic-details li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.topic-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
}

/* ============================================
   Safety Checklist
   ============================================ */

.safety-checklist {
    background: var(--bg-off-white);
}

.checklist-container {
    max-width: 600px;
    margin: 3rem auto 0;
}

.checklist-progress {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.checklist-item:hover {
    border-color: var(--primary-blue);
    transform: translateZ(10px);
    box-shadow: var(--shadow-md);
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-text {
    color: var(--text-primary);
    font-weight: 500;
}

.checklist-item input:checked + .checklist-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* ============================================
   What To Do Section
   ============================================ */

.what-to-do {
    background: var(--bg-white);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}

.action-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: all var(--transition-normal);
}

.action-step:hover {
    transform: translateZ(15px);
}

.step-number {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient-blue);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    transform: translateZ(20px);
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--bg-off-white) 0%, var(--bg-white) 100%);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    opacity: 0.5;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand i {
    color: var(--primary-blue);
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.footer-brand span {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-normal);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.footer-links a:hover {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}
