/* ============================================================================
   SCANGUARD AI - MAIN STYLESHEET
   ============================================================================ */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --safe: #10b981;
  --safe-bg: #ecfdf5;
  --warn: #f59e0b;
  --warn-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --dark: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --bg-app: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* ==========================================
   NAVIGATION & HEADER
   ========================================== */

.app-navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-custom {
  font-weight: 500;
  color: var(--slate-600);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

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

/* ==========================================
   HERO & LANDING SECTION
   ========================================== */

.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.developer-avatar {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-light);
}

/* ==========================================
   CARDS & KPI STATS
   ========================================== */

.card-custom {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.kpi-stat-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpi-stat-card.safe { border-left: 4px solid var(--safe); }
.kpi-stat-card.warn { border-left: 4px solid var(--warn); }
.kpi-stat-card.danger { border-left: 4px solid var(--danger); }
.kpi-stat-card.primary { border-left: 4px solid var(--primary); }

.kpi-stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--dark);
}

/* ==========================================
   SCANNER INTERFACE
   ========================================== */

.scanner-container {
  max-width: 820px;
  margin: 0 auto;
}

.scanner-card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

.sample-chip {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  border: 1px dashed var(--slate-200);
  background: var(--slate-100);
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Radar Scan Animation */
.radar-scanner {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 3px solid rgba(37, 99, 235, 0.2);
  position: relative;
  display: grid;
  place-items: center;
}

.radar-scanner::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  animation: spinRadar 1.2s linear infinite;
}

@keyframes spinRadar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================
   RESULT CARD STYLES
   ========================================== */

.result-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.result-card-header {
  padding: 1.5rem 2rem;
  background: var(--slate-100);
  border-bottom: 1px solid var(--slate-200);
}

.text-safe { color: var(--safe) !important; }
.text-suspicious { color: var(--warn) !important; }
.text-scam { color: var(--danger) !important; }

.input-preview-box {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
  white-space: pre-wrap;
}

.risk-progress-bar {
  height: 12px;
  border-radius: 6px;
  background: var(--slate-200);
  overflow: hidden;
}

/* ==========================================
   TOAST & ALERTS
   ========================================== */

.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.custom-toast {
  min-width: 280px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
}

.cursor-pointer { cursor: pointer; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .scanner-card { padding: 1.25rem; }
  .kpi-stat-number { font-size: 1.5rem; }
}
