:root {
  --bg-color: #050b18;
  --text-color: #e2e8f0;
  --accent-1: #00ffb4;
  --accent-1-rgb: 0, 255, 180;
  --accent-2: #00bfff;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --subtitle-color: #64748b;
  --label-color: #475569;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.1);
  --header-badge-bg: rgba(0, 255, 180, 0.08);
  --header-badge-border: rgba(0, 255, 180, 0.2);
  --safe-color: #00ffb4;
  --safe-bg: rgba(0, 255, 180, 0.06);
  --safe-border: rgba(0, 255, 180, 0.2);
  --footer-bg: rgba(255, 255, 255, 0.02);
}

.light-mode {
  --bg-color: #f8fafc;
  --text-color: #000000;
  --accent-1: #f97316;
  --accent-1-rgb: 249, 115, 22;
  --accent-2: #ef4444;
  --card-bg: #ffffff;
  --card-border: rgba(249, 115, 22, 0.15);
  --subtitle-color: #000000;
  --label-color: #111111;
  --input-bg: #ffffff;
  --input-border: rgba(249, 115, 22, 0.25);
  --header-badge-bg: rgba(249, 115, 22, 0.08);
  --header-badge-border: rgba(249, 115, 22, 0.25);
  --safe-color: #f97316;
  --safe-bg: rgba(249, 115, 22, 0.06);
  --safe-border: rgba(249, 115, 22, 0.2);
  --footer-bg: #f1f5f9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,180,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,180,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.light-mode body::before {
  background-image:
    linear-gradient(rgba(249, 115, 22, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.05) 1px, transparent 1px);
}

.hidden { display: none !important; }

/* ════════════════════════════
   LOADER
════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.loader-ring {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-1);
  border-right-color: rgba(var(--accent-1-rgb, 0, 255, 180), 0.3);
  animation: spin 1s linear infinite;
}

.loader-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--header-badge-bg);
  border: 1px solid var(--header-badge-border);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,180,0.15); }
  50%       { box-shadow: 0 0 0 12px rgba(0,255,180,0); }
}

.loader-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 8px;
}

.loader-tagline {
  font-size: 13px;
  color: #475569;
  letter-spacing: 0.06em;
}

.loader-bar-wrap {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 100px;
  animation: loadBar 3s ease forwards;
}

@keyframes loadBar {
  0%   { width: 0%; }
  40%  { width: 60%; }
  80%  { width: 85%; }
  100% { width: 100%; }
}

#loader.fade-out {
  animation: loaderFade 0.5s ease forwards;
  pointer-events: none;
}

@keyframes loaderFade {
  to { opacity: 0; pointer-events: none; }
}

/* ════════════════════════════
   MAIN PAGE
════════════════════════════ */
#mainPage {
  animation: pageIn 0.6s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

/* ── Theme Toggle ── */
#themeToggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

#themeToggle:hover {
  transform: scale(1.1);
  border-color: var(--accent-1);
  box-shadow: 0 0 16px rgba(var(--accent-1-rgb), 0.25);
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 52px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--header-badge-bg);
  border: 1px solid var(--header-badge-border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 24px;
}

.logo-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 10px var(--accent-1);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

h1 span {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 16px;
  color: var(--subtitle-color);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Scanner Card ── */
.scanner-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 48px;
  margin-bottom: 32px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.scanner-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-wrap {
  flex: 1;
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.4;
  color: var(--text-color);
}

input[type="text"] {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 16px 48px 16px 46px;
  font-size: 15px;
  color: var(--text-color);
  outline: none;
  transition: all 0.2s;
  font-family: 'Courier New', monospace;
}

input[type="text"]::placeholder { color: #475569; }

input[type="text"]:focus {
  border-color: var(--accent-1);
  background: var(--input-bg);
  box-shadow: 0 0 15px rgba(var(--accent-1-rgb), 0.1);
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}

.clear-btn:hover {
  background: rgba(255, 50, 50, 0.1);
  color: #f87171;
  border-color: rgba(255, 50, 50, 0.2);
}

input[type="text"].input-error {
  border-color: rgba(255, 70, 70, 0.7);
  background: rgba(255, 50, 50, 0.06);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-6px); }
  50%  { transform: translateX(6px); }
  75%  { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

#urlError {
  color: #f87171;
  font-size: 12px;
  margin-top: 8px;
  padding-left: 4px;
  letter-spacing: 0.02em;
}

.scan-btn {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border: none;
  border-radius: 12px;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none;
}

.scan-btn:hover  { transform: translateY(-1px); opacity: 0.92; }
.scan-btn:active { transform: translateY(0); }
.scan-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.dashboard-cta {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.dashboard-card h2 {
  margin-bottom: 16px;
}

.dashboard-card ul {
  padding-left: 20px;
  color: var(--subtitle-color);
  line-height: 1.8;
}

.chart-card {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 24px;
  padding: 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.chart-placeholder {
  width: 100%;
  min-height: 140px;
  border: 1px dashed var(--accent-1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--subtitle-color);
  font-size: 14px;
}

.dashboard-note {
  grid-column: span 2;
}

/* ── Example chips ── */
.examples {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.examples-label { font-size: 12px; color: #475569; }

.example-chip {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--subtitle-color);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Courier New', monospace;
  background: none;
  font-weight: inherit;
}

.example-chip:hover {
  background: var(--header-badge-bg);
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-1px);
}

.example-chip:focus {
  outline: 2px solid rgba(0,255,180,0.6);
  outline-offset: 2px;
  background: rgba(0,255,180,0.08);
  color: #00ffb4;
}

/* ── Result ── */
#result { margin-top: 24px; }

.result-card {
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-card.safe    { background: var(--safe-bg);  border: 1px solid var(--safe-border); }
.result-card.danger  { background: rgba(255,50,50,0.06);  border: 1px solid rgba(255,50,50,0.25); }
.result-card.loading { background: rgba(0,191,255,0.05);  border: 1px solid rgba(0,191,255,0.15); }
.result-card.error   { background: rgba(255,170,0,0.05);  border: 1px solid rgba(255,170,0,0.2); }

.result-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.result-card.safe    .result-icon { background: var(--safe-border); opacity: 0.8; }
.result-card.danger  .result-icon { background: rgba(255,50,50,0.12); }
.result-card.loading .result-icon { background: rgba(0,191,255,0.12); }
.result-card.error   .result-icon { background: rgba(255,170,0,0.12); }

.result-body { flex: 1; }

.result-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.result-card.safe    .result-title { color: var(--safe-color); }
.result-card.danger  .result-title { color: #f87171; }
.result-card.loading .result-title { color: #60bfff; }
.result-card.error   .result-title { color: #fbbf24; }

.result-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.result-url {
  margin-top: 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #475569;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 8px 12px;
  word-break: break-all;
}

.threat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.threat-tag {
  background: rgba(255,50,50,0.12);
  border: 1px solid rgba(255,50,50,0.2);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Risk Analysis ── */
.risk-analysis {
  margin-top: 24px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 20px;
}

.risk-header {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
}

.risk-stat {
  display: flex;
  flex-direction: column;
}

.risk-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.risk-stat-max {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.risk-stat-label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
  font-weight: 600;
}

.risk-meter-wrap {
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.light-mode .risk-meter-wrap {
  background: rgba(0, 0, 0, 0.08);
}

.risk-meter-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
  animation: progress-stripes 1s linear infinite;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

@keyframes progress-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

.risk-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-color);
  background: var(--card-bg);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}

.breakdown-item svg {
  flex-shrink: 0;
}

.breakdown-item.safe span { color: #94a3b8; }
.breakdown-item.warning span { color: #fbbf24; }
.breakdown-item.danger span { color: #f87171; }

.light-mode .breakdown-item.safe span { color: #475569; }
.light-mode .breakdown-item.warning span { color: #d97706; }
.light-mode .breakdown-item.danger span { color: #dc2626; }

/* ── Spinner ── */
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0,191,255,0.2);
  border-top-color: #00bfff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Scan Loading Animation ── */
.scan-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}

.scan-shield-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-shield-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent-1);
  border-right-color: rgba(var(--accent-1-rgb), 0.3);
  animation: spin 1s linear infinite;
}

.scan-shield-ring-outer {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--accent-2);
  border-left-color: rgba(0, 191, 255, 0.2);
  animation: spin 1.5s linear infinite reverse;
}

.scan-shield-icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--accent-1-rgb), 0.08);
  border: 1px solid rgba(var(--accent-1-rgb), 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-1-rgb), 0.2); }
  50%      { box-shadow: 0 0 0 10px rgba(var(--accent-1-rgb), 0); }
}

.scan-progress-wrap {
  width: 100%;
  max-width: 280px;
}

.scan-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.light-mode .scan-progress-bar {
  background: rgba(0, 0, 0, 0.08);
}

.scan-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 3px;
  animation: scanProgress 2.5s ease-in-out infinite;
}

@keyframes scanProgress {
  0%   { width: 0%; }
  50%  { width: 70%; }
  80%  { width: 90%; }
  100% { width: 100%; }
}

.scan-status-text {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.scan-status-step {
  font-size: 12px;
  color: var(--accent-1);
  font-weight: 600;
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Features ── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  transition: transform 0.2s;
}

.feature-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon { font-size: 20px; margin-bottom: 10px; }

.feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.feature-desc { font-size: 12px; color: var(--subtitle-color); line-height: 1.5; }

/* ════════════════════════════
   TEAM SECTION
════════════════════════════ */
.team-section {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--card-border);
}

.team-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-tag {
  display: inline-block;
  background: var(--header-badge-bg);
  border: 1px solid var(--header-badge-border);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 14px;
}

.team-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.team-sub {
  font-size: 14px;
  color: var(--subtitle-color);
}

/* Toggle button */
.team-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--header-badge-bg);
  border: 1px solid var(--header-badge-border);
  color: var(--accent-1);
  cursor: pointer;
  margin: 0 auto 24px;
  transition: background 0.2s, transform 0.3s;
}

.team-toggle:hover {
  background: var(--header-badge-border);
}

.team-toggle.open {
  transform: rotate(180deg);
}

/* Collapsible wrapper */
.team-grid-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease;
  opacity: 0;
}

.team-grid-wrap.open {
  max-height: 400px;
  opacity: 1;
}

/* Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding-bottom: 8px;
}

.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  transition: all 0.2s;
  width: 100%;
}

.member-card:hover {
  background: var(--header-badge-bg);
  border-color: var(--accent-1);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.member-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--header-badge-border);
  overflow: hidden;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent-1);
  transition: border-color 0.2s;
}

.member-card:hover .member-avatar {
  border-color: var(--accent-1);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  line-height: 1.4;
}

/* ── Main Footer ── */
.main-footer {
  margin-top: 100px;
  padding: 64px 0 32px;
  border-top: 1px solid var(--card-border);
  background: var(--footer-bg);
  border-radius: 40px 40px 0 0;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 80px;
  margin-bottom: 60px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.footer-brand .logo-badge {
  font-size: 14px;
  padding: 8px 20px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--subtitle-color);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.7;
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.footer-col a:hover {
  color: var(--accent-1);
  opacity: 1;
  transform: translateX(4px);
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.theme-toggle-btn.secondary { display: none; }

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--label-color);
  letter-spacing: 0.02em;
}

/* ── Export Buttons ── */
.export-btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.export-btn {
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
}

.export-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.export-btn-pdf {
  background: #00ffb4;
  color: #0f172a;
}

.export-btn-img {
  background: #3b82f6;
  color: #ffffff;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .wrapper { padding: 40px 24px; }
  .footer-content { gap: 40px; }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
    align-items: center;
  }

  .footer-col h4 {
    margin-bottom: 16px;
  }

  .footer-actions {
    justify-content: center;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features {
    grid-template-columns: 1fr;
  }
}

.breakdown {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-item {
  font-size: 0.9rem;
  color: #a0aec0;
}

@media (max-width: 600px) {
  .wrapper { padding: 40px 16px; }
  .dashboard-card { padding: 20px; }
  .header h1 { font-size: 32px; }
  .scanner-card { padding: 24px; }
  .result-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
  }
  .export-btns {
    flex-direction: column;
    width: 100%;
  }
  .export-btn {
    width: 100%;
  }
  .risk-header {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  .input-row {
    flex-direction: column;
    gap: 16px;
  }
  .scan-btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
  }
  .examples {
    justify-content: center;
    margin-top: 20px;
  }
  .examples-label {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
  }
  .example-chip {
    padding: 6px 14px;
    font-size: 13px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .member-avatar {
    width: 72px;
    height: 72px;
  }
  #themeToggle {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .team-grid-wrap.open {
    max-height: 2000px;
  }
}

@media (max-width: 380px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════
   TYPOSQUATTING FAMILY TREE SECTION
   ════════════════════════════ */
.tree-container svg {
  user-select: none;
}

.node circle {
  transition: r 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.15));
}

.node:hover circle {
  r: 12px !important;
  filter: drop-shadow(0 0 8px currentColor);
}

.node.category:hover circle {
  r: 9px !important;
}

.node.variant:hover circle {
  r: 7px !important;
}

.node text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  transition: fill 0.3s ease;
}

.link {
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.tree-tooltip {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  border-color: var(--card-border) !important;
  background: var(--card-bg) !important;
}

/* Light Mode Overrides for Family Tree */
.light-mode .node text {
  fill: #1e293b !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.light-mode .tree-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.light-mode .tree-tooltip div {
  color: #0f172a !important;
}

.light-mode .link {
  stroke: rgba(100, 116, 139, 0.4) !important;
}
