/* ================================================================
   DIGITAL FOOTPRINT SCANNER — Dedicated Styles
================================================================ */

/* === HERO === */
.dfs-hero {
  position: relative;
  padding: calc(var(--nav-height) + 3.5rem) 0 2.5rem;
  background: var(--bg-secondary);
  overflow: hidden;
  text-align: center;
}
.dfs-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(0,212,255,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 40%, rgba(139,92,246,0.07) 0%, transparent 55%);
  pointer-events: none;
}
.dfs-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--border-subtle);
}
.dfs-hero-content { position: relative; z-index: 1; }

.dfs-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.08);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  letter-spacing: 0.08em;
}
.dfs-hero-eyebrow i { font-size: 0.65rem; }

.dfs-hero-title {
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.dfs-title-word { display: inline-block; }
.dfs-title-word.accent { color: var(--accent); }
.dfs-title-word.accent2 { color: var(--accent-2); }

.dfs-hero-subtitle {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.dfs-hero-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.dfs-hero-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
}

/* === MAIN SECTION === */
.dfs-section {
  background: var(--bg-primary);
  padding: 3rem 0 5rem;
  min-height: 70vh;
}

/* === START SCREEN === */
.dfs-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
  padding: 2rem;
}

.dfs-radar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 2.5rem;
}
.dfs-radar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(0,212,255,0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dfs-radar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.15);
  animation: dfs-ring-pulse 2s ease-out infinite;
}
.dfs-radar-ring:nth-child(2) {
  inset: -22px;
  animation-delay: 0.5s;
}
.dfs-radar-ring:nth-child(3) {
  inset: -36px;
  animation-delay: 1s;
}
.dfs-radar-icon {
  font-size: 2.5rem;
  color: var(--accent);
  position: relative;
  z-index: 1;
}
.dfs-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(0,212,255,0.15) 30%, transparent 30.1%);
  animation: dfs-sweep 3s linear infinite;
}
@keyframes dfs-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes dfs-ring-pulse {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.15); }
}

.dfs-start h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.dfs-start-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 360px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.dfs-scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-primary);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  box-shadow: 0 0 24px rgba(0,212,255,0.35), 0 0 48px rgba(0,212,255,0.15);
  position: relative;
  overflow: hidden;
}
.dfs-scan-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}
.dfs-scan-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(0,212,255,0.55), 0 0 64px rgba(0,212,255,0.25);
}
.dfs-scan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.dfs-scan-btn i { font-size: 1rem; }

.dfs-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.dfs-disclaimer i { color: var(--accent-3); flex-shrink: 0; margin-top: 2px; }

/* === SCANNER LAYOUT === */
.dfs-layout {
  display: none;
  grid-template-columns: 40% 60%;
  gap: 1.5rem;
  align-items: start;
}
.dfs-layout.active { display: grid; }

/* === PROGRESS BAR === */
.dfs-progress-wrap {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dfs-progress-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.dfs-progress-track {
  flex: 1;
  height: 4px;
  background: var(--surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.dfs-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(0,212,255,0.5);
}
.dfs-progress-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* === TERMINAL PANEL === */
.dfs-terminal-panel {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}
.dfs-terminal {
  background: #050a12;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0,212,255,0.04);
}
.dfs-term-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
}
.dfs-term-dots { display: flex; gap: 6px; }
.dfs-term-dot { width: 12px; height: 12px; border-radius: 50%; }
.dfs-term-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 auto;
}

.dfs-term-output {
  height: 420px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.85;
  scroll-behavior: smooth;
}
.dfs-term-output::-webkit-scrollbar { width: 4px; }
.dfs-term-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Terminal line variants */
.dfs-tline {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  word-break: break-all;
}
.dfs-tline.visible {
  opacity: 1;
  transform: translateX(0);
}
.dfs-tline-init  { color: #94a3b8; }
.dfs-tline-sys   { color: #64748b; }
.dfs-tline-ok    { color: #10b981; }
.dfs-tline-ok::before { content: ''; }
.dfs-tline-sub   { color: #64748b; padding-left: 0.25rem; }
.dfs-tline-sub .dfs-val { color: #00d4ff; }
.dfs-tline-done  { color: #8b5cf6; font-weight: 600; }
.dfs-tline-blank { height: 0.5rem; }
.dfs-tline-divider { color: #1e3a5f; letter-spacing: 0.02em; }

/* Complete banner in terminal */
.dfs-tline-complete {
  color: #00d4ff;
  font-weight: 700;
  text-align: center;
}

/* === DASHBOARD === */
.dfs-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dfs-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.dfs-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.dfs-group-title i { color: var(--accent); font-size: 0.65rem; }

.dfs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}
.dfs-cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.dfs-cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* === INDIVIDUAL CARDS === */
.dfs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.dfs-card.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.dfs-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--card-accent, var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}
.dfs-card.revealed::before { opacity: 1; }

.dfs-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(0,212,255,0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.dfs-card-body { flex: 1; min-width: 0; }
.dfs-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.dfs-card-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}
.dfs-card-value.pending {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
}

/* Wide card (fingerprint) */
.dfs-card-wide {
  grid-column: 1 / -1;
}
.dfs-card-wide .dfs-card-value {
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* Card accent colours per group */
.dfs-group-net  .dfs-card { --card-accent: #00d4ff; }
.dfs-group-net  .dfs-card .dfs-card-icon { background: rgba(0,212,255,0.08); color: #00d4ff; }
.dfs-group-browser .dfs-card { --card-accent: #8b5cf6; }
.dfs-group-browser .dfs-card .dfs-card-icon { background: rgba(139,92,246,0.08); color: #8b5cf6; }
.dfs-group-system  .dfs-card { --card-accent: #f59e0b; }
.dfs-group-system  .dfs-card .dfs-card-icon { background: rgba(245,158,11,0.08); color: #f59e0b; }
.dfs-group-display .dfs-card { --card-accent: #10b981; }
.dfs-group-display .dfs-card .dfs-card-icon { background: rgba(16,185,129,0.08); color: #10b981; }
.dfs-group-session .dfs-card { --card-accent: #ef4444; }
.dfs-group-session .dfs-card .dfs-card-icon { background: rgba(239,68,68,0.08); color: #ef4444; }

/* === COMPLETE BADGE === */
.dfs-complete-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-md);
  color: #10b981;
  margin-top: 1.25rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.dfs-complete-badge.visible {
  opacity: 1;
  transform: translateY(0);
}
.dfs-complete-badge i { font-size: 1.25rem; flex-shrink: 0; }
.dfs-complete-title { font-weight: 700; font-size: 0.9rem; }
.dfs-complete-sub { font-size: 0.78rem; color: #10b98199; margin-top: 0.1rem; }

/* Rescan button */
.dfs-rescan-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;
  flex-shrink: 0;
}
.dfs-rescan-btn:hover { border-color: var(--accent); color: var(--accent); }

/* === ETHICAL NOTE === */
.dfs-ethical-note {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}
.dfs-ethical-icon {
  font-size: 1.5rem;
  color: var(--accent-3);
  margin-top: 2px;
}
.dfs-ethical-note h3 { font-size: 0.9rem; margin-bottom: 0.4rem; }
.dfs-ethical-note p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* === PROJECT PAGE — HERO BADGES === */
.dfs-page-hero {
  background: var(--bg-secondary);
}
.dfs-page-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.dfs-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.badge-cyan   { color: #00d4ff; background: rgba(0,212,255,0.1);  border: 1px solid rgba(0,212,255,0.25); }
.badge-green  { color: #10b981; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); }
.badge-purple { color: #8b5cf6; background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.25); }

/* === PROJECT PAGE — TAB STRIP === */
.dfs-strip {
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
  background: rgba(6, 11, 20, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border-subtle);
}
[data-theme="light"] .dfs-strip { background: rgba(255, 255, 255, 0.97); }
.dfs-strip .container { padding-top: 0; padding-bottom: 0; }
.dfs-strip-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.dfs-strip-tabs::-webkit-scrollbar { display: none; }
.dfs-strip-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  border-top: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
  font-family: var(--font-sans);
}
.dfs-strip-tab:hover { color: var(--text-primary); }
.dfs-strip-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(0, 212, 255, 0.05);
}
.dfs-strip-tab i { font-size: 0.8rem; }

/* === PROJECT PAGE — PANELS === */
.dfs-panel { display: none; }
.dfs-panel.active { display: block; }

.dfs-scanner-panel-wrap {
  padding: 2.5rem 0 4rem;
  background: var(--bg-primary);
}

/* === PROJECT PAGE — OVERVIEW EXTRAS === */
.dfs-overview-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.dfs-sidebar-stat {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.75rem 0;
}
.dfs-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}
.dfs-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* === HOMEPAGE SECTION === */
.dfs-home-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.dfs-home-footer {
  text-align: center;
  margin-top: 2.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .dfs-layout { grid-template-columns: 1fr; }
  .dfs-terminal-panel { position: static; }
  .dfs-term-output { height: 280px; }
}

@media (max-width: 600px) {
  .dfs-hero { padding: calc(var(--nav-height) + 1.75rem) 0 2rem; }
  .dfs-hero-title { font-size: clamp(1.4rem, 7vw, 2rem); }
  .dfs-cards-grid { grid-template-columns: 1fr 1fr; }
  .dfs-cards-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .dfs-scan-btn { padding: 0.85rem 2rem; font-size: 0.9rem; width: 100%; justify-content: center; }
  .dfs-term-output { height: 240px; font-size: 0.73rem; }
  .dfs-ethical-note { grid-template-columns: 1fr; }
  .dfs-complete-badge { flex-wrap: wrap; gap: 0.65rem; }
  .dfs-rescan-btn { margin-left: 0; width: 100%; justify-content: center; }
  .dfs-layout { gap: 1rem; }
  .dfs-start { padding: 1.5rem 1rem; }
  .dfs-start h2 { font-size: 1.25rem; }
}

@media (max-width: 400px) {
  .dfs-cards-grid { grid-template-columns: 1fr; }
  .dfs-cards-grid.cols-3 { grid-template-columns: 1fr; }
}
