/* ============================================================
   SCAMSHIELD AI — Main Stylesheet
   Theme: Light SaaS · Glassmorphism · Cyber-security aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-base: #ECF7FB;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border: #e2e8f0;
  --border-glow: rgba(14, 165, 233, 0.35);

  --accent: #0ea5e9;
  --accent-dim: rgba(14, 165, 233, 0.08);
  --accent-glow: 0 4px 20px rgba(14, 165, 233, 0.25);
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --purple: #8b5cf6;

  --text-primary: #101111;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background grid texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ── Radial glow orbs ── */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(14, 165, 233, 0.08);
  top: -100px;
  left: -100px;
}

.glow-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.08);
  top: 200px;
  right: -80px;
}

/* ── Navbar ── */
.navbar-scam {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.navbar-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-text span {
  color: var(--accent);
}

.nav-link-custom {
  color: var(--text-secondary) !important;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
  padding: 6px 14px !important;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.nav-link-custom:hover {
  color: var(--text-primary) !important;
}

.nav-link-custom.active-nav {
  color: var(--accent) !important;
}

.btn-nav-cta {
  background: var(--accent);
  color: #ffffff !important;
  border: none;
  border-radius: 100px;
  padding: 8px 22px !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-nav-cta:hover {
  background: #0284c7;
  box-shadow: var(--accent-glow);
}

/* ── Header Brand Custom Styles ── */
.header-brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .header-brand-logo-img {
    height: 54px;
  }
}

.header-brand-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0054a6;
  /* Vietnamese Administrative Blue */
  line-height: 1.25;
  font-family: var(--font-main);
  max-width: 320px;
}

@media (min-width: 768px) {
  .header-brand-title {
    font-size: 0.85rem;
    max-width: 450px;
  }
}

.header-brand-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  color: #d32f2f;
  /* Administrative Red */
  line-height: 1.2;
  font-family: var(--font-main);
  letter-spacing: 0.3px;
  margin-top: 2px;
}

@media (min-width: 768px) {
  .header-brand-subtitle {
    font-size: 0.8rem;
  }
}

/* ── Hero Section ── */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 30px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 1.8s ease infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #00b4d8 50%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ── Scan Box ── */
.scan-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.03), 0 20px 40px -15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.scan-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.scan-box:focus-within {
  border-color: var(--border-glow);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.04), 0 25px 45px -15px rgba(14, 165, 233, 0.08);
}

.scan-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.scan-tab {
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.scan-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14, 165, 233, 0.03);
}

.scan-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.scan-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.scan-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: all var(--transition);
  outline: none;
}

select.scan-input option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.scan-input::placeholder {
  color: var(--text-muted);
}

.scan-input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.btn-scan {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #0284c7);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-scan::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-scan:hover::after {
  opacity: 1;
}

.btn-scan:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.35);
}

.btn-scan:active {
  transform: translateY(0);
}

.btn-scan.loading {
  pointer-events: none;
}

.btn-scan .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-scan.loading .spinner {
  display: inline-block;
}

.btn-scan.loading .btn-text {
  display: none;
}

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

.scan-notice {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

/* ── Stats Bar ── */
.stats-bar {
  padding: 32px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.stat-item {
  text-align: center;
  padding: 12px 0;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  display: block;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: #e2e8f0;
  margin: auto;
}

/* ── Features ── */
.features-section {
  padding: 90px 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
  transition: all var(--transition);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--transition);
}

.feature-card:hover {
  border-color: rgba(14, 165, 233, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.02), 0 0 20px rgba(14, 165, 233, 0.02);
}

.feature-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.icon-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.icon-green {
  background: #d1fae5;
  color: #059669;
}

.icon-amber {
  background: #fef3c7;
  color: #d97706;
}

.icon-purple {
  background: #f3e8ff;
  color: #7c3aed;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Risk Level Preview ── */
.risk-demo-section {
  padding: 60px 0 90px;
}

.risk-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
  transition: all var(--transition);
}

.risk-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

.risk-score-mini {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.rs-safe {
  background: #ecfdf5;
  color: #059669;
}

.rs-low {
  background: #f0f9ff;
  color: #0284c7;
}

.rs-medium {
  background: #fffbeb;
  color: #d97706;
}

.rs-high {
  background: #fef2f2;
  color: #dc2626;
}

.rs-dangerous {
  background: #fff1f2;
  color: #be123c;
}

.risk-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
}

.rb-safe {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.rb-low {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.rb-medium {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.rb-high {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.rb-dangerous {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

/* ── Recent Reports Table ── */
.reports-section {
  padding: 0 0 90px;
}

.glass-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
  overflow: hidden;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.glass-table thead th {
  background: #f8fafc;
  padding: 14px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.glass-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-secondary);
  vertical-align: middle;
}

.glass-table tbody tr:last-child td {
  border-bottom: none;
}

.glass-table tbody tr:hover td {
  background: #f8fafc;
  color: var(--text-primary);
}

.target-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary) !important;
}

/* ── AI Typing Effect ── */
.ai-typing-wrap {
  background: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 16px;
  display: none;
}

.ai-typing-wrap.visible {
  display: block;
}

.ai-typing-label {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.ai-typing-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

/* ── Footer ── */
.footer-section {
  border-top: 1px solid #e2e8f0;
  padding: 40px 0 30px;
  background: #eef4fb;
}

.footer-brand {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-links a {
  font-size: 0.83rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .scan-box {
    padding: 22px;
  }

  .stat-divider {
    display: none;
  }

  .glow-orb {
    display: none;
  }
}

@media (max-width: 576px) {
  .scan-type-tabs {
    gap: 6px;
  }

  .scan-tab {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}

/* ── Clean-ups for inline-styled dark remnants ── */
[style*="background:var(--bg-glass)"],
[style*="background: var(--bg-glass)"] {
  background: #ffffff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015) !important;
}

[style*="background:rgba(0,212,255,.04)"],
[style*="background: rgba(0,212,255,.04)"],
[style*="background:rgba(0,212,255,0.04)"],
[style*="background: rgba(0,212,255,0.04)"] {
  background: rgba(14, 165, 233, 0.03) !important;
  border-color: rgba(14, 165, 233, 0.15) !important;
}

[style*="border: 1px solid rgba(255,255,255,0.05)"],
[style*="border:1px solid rgba(255,255,255,0.05)"],
[style*="border-bottom:1px solid rgba(255,255,255,0.05)"],
[style*="border-bottom: 1px solid rgba(255,255,255,0.05)"] {
  border-color: #f1f5f9 !important;
}

[style*="border-bottom:1px solid rgba(255,255,255,.04)"],
[style*="border-bottom: 1px solid rgba(255,255,255,.04)"] {
  border-color: #f1f5f9 !important;
}

[style*="background:rgba(255,255,255,.05)"],
[style*="background: rgba(255,255,255,.05)"],
[style*="background:rgba(255,255,255,0.05)"],
[style*="background: rgba(255,255,255,0.05)"] {
  background: #ffffff !important;
}

[style*="background:rgba(255,255,255,.03)"],
[style*="background: rgba(255,255,255,.03)"],
[style*="background:rgba(255,255,255,0.03)"],
[style*="background: rgba(255,255,255,0.03)"] {
  background: #f8fafc !important;
}

[style*="rgba(255,255,255,.06)"],
[style*="rgba(255,255,255,0.06)"] {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

[style*="color:#080c14"],
[style*="color: #080c14"] {
  color: #ffffff !important;
}

/* ── Hiệu ứng hạt mạng lưới nền ── */
#network-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.56;
  pointer-events: none;
}

body>.modal,
body>.modal-backdrop {
  z-index: 1050 !important;
}

.navbar-scam {
  position: sticky !important;
  z-index: 1000 !important;
}