/* ============================================================
   THREATLEY-ADDITIONS.CSS
   Zwevende scan-knop + verbeterd mobiel menu + hacking terminal
   ============================================================ */

/* ── ZWEVENDE SCAN KNOP (FAB) ─────────────────────────────── */
#scan-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9000;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scan-fab img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.3s ease,
              box-shadow 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.4));
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3),
              0 0 20px rgba(14, 165, 233, 0.2);
}

/* Pulse ring animatie */
#scan-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(14, 165, 233, 0.5);
  animation: fab-pulse 2s ease-in-out infinite;
}

#scan-fab::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.2);
  animation: fab-pulse 2s ease-in-out infinite 0.5s;
}

@keyframes fab-pulse {
  0%   { transform: scale(1); opacity: 0.8; }
  50%  { transform: scale(1.15); opacity: 0.3; }
  100% { transform: scale(1); opacity: 0.8; }
}

#scan-fab:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.9))
          drop-shadow(0 0 40px rgba(34, 211, 238, 0.5));
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.8),
              0 0 40px rgba(14, 165, 233, 0.6),
              0 0 80px rgba(14, 165, 233, 0.2);
}

#scan-fab:active img {
  transform: scale(0.95);
}

/* Tooltip */
#scan-fab-tooltip {
  position: fixed;
  bottom: 44px;
  right: 108px;
  background: rgba(6, 14, 22, 0.95);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #eef6ff;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

#scan-fab-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: rgba(14, 165, 233, 0.4);
}

#scan-fab:hover ~ #scan-fab-tooltip,
#scan-fab-tooltip.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── VERBETERD MOBIEL MENU ────────────────────────────────── */
.mobile-menu {
  background: rgba(3, 8, 13, 0.97) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

/* Scan knop in mobiel menu */
.mobile-menu-scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid rgba(14, 165, 233, 0.5);
  color: #0ea5e9;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.mobile-menu-scan-btn:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: #0ea5e9;
  color: #22d3ee;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.2);
}

.mobile-menu-scan-btn img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  filter: drop-shadow(0 0 4px rgba(14, 165, 233, 0.6));
}

/* Verbeterde mobile menu links met scanning effect */
.mobile-menu a {
  position: relative;
  overflow: hidden;
}

.mobile-menu a::after {
  content: '';
  position: absolute;
  left: -100%;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
  transition: left 0.4s ease;
}

.mobile-menu a:hover::after {
  left: 100%;
}

/* Mobile menu glitch effect op hover */
.mobile-menu a:hover {
  color: #0ea5e9 !important;
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.6),
               2px 0 0 rgba(244, 63, 94, 0.3),
               -2px 0 0 rgba(34, 211, 238, 0.3);
}

/* Divider lijn in mobile menu */
.mobile-menu-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.4), transparent);
  margin: 8px auto;
}

/* Mobile menu scan sectie label */
.mobile-menu-section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: rgba(14, 165, 233, 0.5);
  text-transform: uppercase;
  margin: 4px 0 2px;
}

/* ── HACKING TERMINAL DEMO ────────────────────────────────── */
.hack-demo-section {
  position: relative;
  padding: 100px 40px;
  background: #03080d;
  overflow: hidden;
}

.hack-demo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.03) 50%, transparent 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(14, 165, 233, 0.015) 2px,
      rgba(14, 165, 233, 0.015) 4px
    );
  pointer-events: none;
}

.hack-demo-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .hack-demo-inner { grid-template-columns: 1fr; }
}

.hack-demo-copy {}

.hack-demo-copy .label {
  margin-bottom: 16px;
}

.hack-demo-copy h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.05em;
  color: #eef6ff;
  line-height: 1;
  margin-bottom: 20px;
}

.hack-demo-copy h2 span {
  color: #0ea5e9;
}

.hack-demo-copy p {
  color: rgba(238, 246, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hack-demo-copy .hack-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.hack-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hack-stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: #0ea5e9;
  line-height: 1;
}

.hack-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(238, 246, 255, 0.4);
  text-transform: uppercase;
}

/* Terminal Window */
.terminal-window {
  background: #060e16;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(14, 165, 233, 0.1),
    0 24px 48px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(14, 165, 233, 0.1);
  position: relative;
}

.terminal-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
  opacity: 0.6;
}

.terminal-titlebar {
  background: rgba(9, 21, 32, 0.9);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red    { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.5); }
.terminal-dot.yellow { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.terminal-dot.green  { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }

.terminal-title {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(238, 246, 255, 0.4);
  letter-spacing: 0.1em;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.8;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}

/* Scanline effect */
.terminal-body::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(14, 165, 233, 0.04), transparent);
  animation: scanline 4s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  from { top: -40px; }
  to   { top: 100%; }
}

.t-line {
  display: block;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: pre;
  overflow: hidden;
}

.t-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.t-prompt   { color: #22d3ee; }
.t-cmd      { color: #eef6ff; }
.t-output   { color: rgba(238, 246, 255, 0.5); }
.t-success  { color: #22c55e; }
.t-warning  { color: #f59e0b; }
.t-danger   { color: #f43f5e; }
.t-info     { color: #0ea5e9; }
.t-muted    { color: rgba(238, 246, 255, 0.25); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #0ea5e9;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 6px rgba(14, 165, 233, 0.8);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Progress bar in terminal */
.t-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(238, 246, 255, 0.5);
}

.t-progress-bar {
  height: 4px;
  background: rgba(14, 165, 233, 0.15);
  border-radius: 2px;
  overflow: hidden;
  flex: 1;
  max-width: 200px;
}

.t-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #22d3ee);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

/* Terminal replay button */
.terminal-replay {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0ea5e9;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.terminal-replay:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: #0ea5e9;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3);
}

/* Attack type selector tabs */
.attack-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(14, 165, 233, 0.15);
  padding: 0 20px;
  background: rgba(9, 21, 32, 0.5);
  flex-wrap: wrap;
}

.attack-tab {
  padding: 10px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(238, 246, 255, 0.35);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}

.attack-tab.active {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
}

.attack-tab:hover:not(.active) {
  color: rgba(238, 246, 255, 0.6);
}

/* Live threat counter */
.live-threat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(244, 63, 94, 0.05);
  border-bottom: 1px solid rgba(244, 63, 94, 0.1);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f43f5e;
  animation: live-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.7);
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.live-label {
  color: #f43f5e;
  font-weight: 500;
}

.live-count {
  color: rgba(238, 246, 255, 0.4);
}

.live-count span {
  color: #f59e0b;
  font-weight: 500;
}

/* Glitch text effect voor section heading */
@keyframes glitch-1 {
  0%   { clip-path: inset(0 0 95% 0); transform: translate(-2px, 0); }
  20%  { clip-path: inset(30% 0 50% 0); transform: translate(2px, 0); }
  40%  { clip-path: inset(70% 0 10% 0); transform: translate(-1px, 0); }
  60%  { clip-path: inset(20% 0 70% 0); transform: translate(1px, 0); }
  80%  { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 0); }
  100% { clip-path: inset(95% 0 0% 0); transform: translate(0, 0); }
}

@keyframes glitch-2 {
  0%   { clip-path: inset(80% 0 5% 0); transform: translate(2px, 0); }
  25%  { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 0); }
  50%  { clip-path: inset(50% 0 30% 0); transform: translate(1px, 0); }
  75%  { clip-path: inset(5% 0 90% 0); transform: translate(-1px, 0); }
  100% { clip-path: inset(90% 0 2% 0); transform: translate(2px, 0); }
}

/* ── RESPONSIVE SCAN FAB ──────────────────────────────────── */
@media (max-width: 768px) {
  #scan-fab {
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
  }

  #scan-fab img {
    width: 56px;
    height: 56px;
  }

  #scan-fab-tooltip {
    display: none;
  }

  .hack-demo-section {
    padding: 60px 20px;
  }
}

/* ── HEADER BLAUW + THREATLEY LOGO ───────────────────────── */
.nav-logo-text .ley { color: var(--blue); }

.nav-links a,
.nav-links .nav-dropdown-trigger {
  color: var(--blue) !important;
}

.nav-links a:hover,
.nav-links .nav-dropdown-trigger:hover {
  color: var(--cyan) !important;
}
