/* ÄLZZTHESCANNER v1.0 - Main Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@600;700;800&display=swap');

:root {
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #9CA3AF;
  --gray-600: #6B7280;
  --gray-700: #4B5563;
  --gray-800: #374151;
  --gray-900: #111827;

  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  --blue-900: #1E3A8A;

  --green-500: #10B981;
  --green-600: #059669;
  --red-500: #EF4444;
  --red-600: #DC2626;
  --orange-500: #F97316;
  --yellow-500: #F59E0B;
  --yellow-600: #D97706;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(0,0,0,0.04);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.25; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 18px;
  color: var(--gray-900); letter-spacing: -0.5px;
}
.nav-logo .shield { color: var(--blue-600); font-size: 22px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-xs); font-size: 14px;
  font-weight: 500; color: var(--gray-600); transition: all .15s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--blue-50); color: var(--blue-700);
}
.nav-cta {
  padding: 8px 18px; background: var(--blue-600); color: #fff !important;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: background .15s !important;
}
.nav-cta:hover { background: var(--blue-700) !important; color: #fff !important; }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--blue-600) 100%);
  padding: 80px 0 100px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.9);
  padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 500;
  margin-bottom: 24px; border: 1px solid rgba(255,255,255,.15);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800; color: #fff;
  letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 16px;
}
.hero h1 span { color: #93C5FD; }
.hero p {
  font-size: 18px; color: rgba(255,255,255,.8); margin-bottom: 40px;
  max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  margin-bottom: 48px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 28px; font-weight: 800; color: #fff; }
.hero-stat .lbl { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 2px; }

/* ── SCAN INPUT ──────────────────────────────────────────────────────────── */
.scan-box {
  background: var(--white); border-radius: var(--radius);
  padding: 8px 8px 8px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: flex; align-items: center; gap: 12px;
  max-width: 700px; margin: 0 auto;
}
.scan-box input {
  flex: 1; border: none; outline: none;
  font-size: 16px; color: var(--gray-900); font-family: 'Inter', sans-serif;
  background: transparent;
}
.scan-box input::placeholder { color: var(--gray-400); }
.btn-scan {
  padding: 12px 28px; background: var(--blue-600); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 15px;
  font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: all .15s; display: flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
}
.btn-scan:hover { background: var(--blue-700); transform: translateY(-1px); }
.btn-scan:active { transform: translateY(0); }
.btn-scan:disabled { background: var(--gray-400); cursor: not-allowed; transform: none; }

/* ── CARDS ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.card-body { padding: 24px; }

/* ── STAT CARDS ──────────────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-200);
  position: relative; overflow: hidden;
}
.stat-card .stat-num {
  font-size: 36px; font-weight: 800; line-height: 1;
  font-family: 'Poppins', sans-serif;
}
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 6px; font-weight: 500; }
.stat-card .stat-icon {
  position: absolute; right: 20px; top: 20px;
  font-size: 28px; opacity: .15;
}
.stat-total .stat-num { color: var(--gray-900); }
.stat-critical .stat-num { color: var(--red-600); }
.stat-high .stat-num { color: var(--orange-500); }
.stat-medium .stat-num { color: var(--yellow-600); }
.stat-low .stat-num { color: var(--green-600); }

/* ── PROGRESS BAR ────────────────────────────────────────────────────────── */
.scan-progress-wrap { margin: 32px 0; }
.scan-progress-bar {
  width: 100%; height: 8px; background: var(--gray-200);
  border-radius: 99px; overflow: hidden; margin-bottom: 12px;
}
.scan-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
  border-radius: 99px; transition: width .4s ease;
  position: relative; overflow: hidden;
}
.scan-progress-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { left: 100%; } }
.scan-progress-info {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--gray-600);
}
.scan-progress-pct { font-weight: 700; color: var(--blue-600); }

/* ── SEVERITY BADGES ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}
.badge-critical { background: #FEF2F2; color: var(--red-600); }
.badge-high { background: #FFF7ED; color: #C2410C; }
.badge-medium { background: #FFFBEB; color: var(--yellow-600); }
.badge-low { background: #F0FDF4; color: var(--green-600); }
.badge-info { background: var(--blue-50); color: var(--blue-700); }

/* ── TABLE ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--gray-50); }
thead th {
  padding: 12px 16px; text-align: left; font-size: 12px;
  font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background .1s; }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 14px 16px; font-size: 14px; color: var(--gray-700); }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: all .15s; font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: #FEF2F2; color: var(--red-600); }
.btn-danger:hover { background: #FEE2E2; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── SCAN LOG ────────────────────────────────────────────────────────────── */
.scan-log {
  background: #0F172A; border-radius: var(--radius); padding: 16px;
  max-height: 200px; overflow-y: auto; font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px; line-height: 1.6;
}
.log-line { display: flex; gap: 10px; padding: 2px 0; }
.log-time { color: #475569; flex-shrink: 0; }
.log-info { color: #94A3B8; }
.log-success { color: #4ADE80; }
.log-warning { color: #FCD34D; }
.log-error { color: #F87171; }

/* ── SCORE GAUGE ─────────────────────────────────────────────────────────── */
.score-gauge { position: relative; width: 160px; height: 160px; }
.score-gauge svg { transform: rotate(-90deg); }
.score-gauge .score-text {
  position: absolute; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
}
.score-gauge .score-num { font-size: 36px; font-weight: 800; font-family: 'Poppins', sans-serif; }
.score-gauge .score-sub { font-size: 12px; color: var(--gray-500); }

/* ── VULN DETAIL DRAWER ──────────────────────────────────────────────────── */
.detail-row {
  background: var(--blue-50); border-left: 3px solid var(--blue-600);
  padding: 16px 20px;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); }
.detail-item span { font-size: 14px; color: var(--gray-900); display: block; margin-top: 2px; }
.code-block {
  background: #0F172A; color: #E2E8F0;
  padding: 8px 12px; border-radius: var(--radius-xs);
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  word-break: break-all;
}

/* ── TABS ────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .15s; font-family: 'Inter', sans-serif;
}
.tab-btn.active { color: var(--blue-600); border-bottom-color: var(--blue-600); }
.tab-btn:hover:not(.active) { color: var(--gray-700); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── ALERTS ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}
.alert-info { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }
.alert-success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-error { background: #FEF2F2; color: var(--red-600); border: 1px solid #FECACA; }

/* ── SKELETON LOADING ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-xs);
}
@keyframes skeleton-wave { to { background-position: -200% 0; } }

/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--gray-900); }
.section-sub { font-size: 16px; color: var(--gray-500); margin-top: 8px; }

/* ── FEATURES GRID ───────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 40px; }
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); border: 1px solid var(--gray-200);
  transition: all .2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--blue-50); color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.feature-card h4 { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .4s ease both; }
.fade-in-1 { animation-delay: .1s; }
.fade-in-2 { animation-delay: .2s; }
.fade-in-3 { animation-delay: .3s; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.pulse { animation: pulse 2s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 60px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .scan-box { flex-direction: column; padding: 16px; }
  .btn-scan { width: 100%; justify-content: center; }
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 99px; }
