/* ============================================
   GAMER DNA — CYBERPUNK INTERFACE v2.0
   ============================================ */

/* === GRID BACKGROUND === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
  pointer-events: none;
}

/* === SCANLINE OVERLAY === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 4px
  );
  z-index: 1;
  pointer-events: none;
}

/* === CANVAS BG === */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* === GLITCH OVERLAY === */
#glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  display: none;
}

#glitch-overlay.active {
  display: block;
  animation: glitchFlash 0.28s steps(1) forwards;
}

#glitch-overlay.active.strong {
  animation: glitchFlashStrong 0.5s steps(1) forwards;
}

@keyframes glitchFlashStrong {
  0%   { background: rgba(139, 92, 246, 0.30); clip-path: inset(0 0 80% 0); }
  12%  { background: rgba(6, 182, 212, 0.22);  clip-path: inset(30% 0 40% 0); }
  24%  { background: rgba(192, 38, 211, 0.28); clip-path: inset(60% 0 10% 0); }
  36%  { background: rgba(139, 92, 246, 0.20); clip-path: inset(5% 0 70% 0); }
  48%  { background: rgba(6, 182, 212, 0.18);  clip-path: inset(80% 0 5% 0); }
  60%  { background: rgba(192, 38, 211, 0.16); clip-path: inset(45% 0 25% 0); }
  72%  { background: rgba(139, 92, 246, 0.12); clip-path: inset(15% 0 60% 0); }
  84%  { background: rgba(6, 182, 212, 0.08);  clip-path: inset(55% 0 20% 0); }
  100% { background: transparent; clip-path: inset(0); }
}

@keyframes glitchFlash {
  0%   { background: rgba(139, 92, 246, 0.18); clip-path: inset(0 0 85% 0); }
  15%  { background: rgba(6, 182, 212, 0.12);  clip-path: inset(20% 0 50% 0); }
  30%  { background: rgba(192, 38, 211, 0.15); clip-path: inset(55% 0 15% 0); }
  45%  { background: rgba(139, 92, 246, 0.10); clip-path: inset(10% 0 65% 0); }
  60%  { background: rgba(6, 182, 212, 0.08);  clip-path: inset(75% 0 8% 0); }
  75%  { background: rgba(139, 92, 246, 0.06); clip-path: inset(40% 0 30% 0); }
  100% { background: transparent; clip-path: inset(0); }
}

/* === SYSTEM STATUS TOAST === */
#sys-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #8B5CF6;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 8px 20px;
  border-radius: 4px;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2), inset 0 0 10px rgba(139, 92, 246, 0.05);
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}

#sys-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === PROGRESS BAR SEGMENTS === */
.seg-bar {
  display: flex;
  gap: 3px;
  flex: 1;
}

.seg {
  flex: 1;
  height: 6px;
  border-radius: 1px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.seg.lit {
  background: linear-gradient(90deg, #8B5CF6, #06B6D4);
  border-color: transparent;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.7);
}

.seg.lit-partial {
  background: rgba(139, 92, 246, 0.35);
  border-color: rgba(139, 92, 246, 0.3);
}

/* === SLIDE-UP ANIMATION === */
.slide-up {
  animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(18px);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === CASCADE DELAYS === */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.19s; }
.delay-4 { animation-delay: 0.26s; }
.delay-5 { animation-delay: 0.33s; }

/* === OPTION CARDS === */
.option-card {
  transition: all 0.18s ease-out;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-left: 2px solid rgba(139, 92, 246, 0.25) !important;
}

.option-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 0;
}

.option-card::after {
  content: '▶';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-size: 10px;
  color: #8B5CF6;
  opacity: 0;
  transition: all 0.18s ease;
  font-family: 'Share Tech Mono', monospace;
}

.option-card:hover {
  transform: translateX(4px);
  border-left-color: #06B6D4 !important;
  border-color: rgba(139, 92, 246, 0.6) !important;
  box-shadow: 0 0 28px -2px rgba(139, 92, 246, 0.5), 0 0 2px rgba(6, 182, 212, 0.7), inset 0 0 22px rgba(139, 92, 246, 0.07) !important;
}

.option-card:hover::before { opacity: 1; }
.option-card:hover::after  { opacity: 1; transform: translateY(-50%) translateX(0); }

.option-card:active {
  transform: translateX(2px) scale(0.99);
}

.option-card.selected {
  border-left-color: #06B6D4 !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
  box-shadow: 0 0 24px -4px rgba(6, 182, 212, 0.3) !important;
  animation: selectedPulse 0.3s ease forwards;
}

@keyframes selectedPulse {
  0%   { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6); }
  100% { box-shadow: 0 0 24px -4px rgba(6, 182, 212, 0.3); }
}

.option-content {
  position: relative;
  z-index: 1;
}

/* === ICON BOX === */
.option-icon {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: border-color 0.18s, background 0.18s;
}

.option-card:hover .option-icon {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.15);
}

/* === BUTTON PULSE === */
.btn-pulse {
  animation: btnPulse 2.5s infinite;
}

@keyframes btnPulse {
  0%   { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* === BOOT SEQUENCE === */
.boot-text {
  font-family: 'Share Tech Mono', monospace;
  color: #8B5CF6;
  font-size: 11px;
  letter-spacing: 1.5px;
  opacity: 0.7;
}

.boot-cursor::after {
  content: '▮';
  animation: blink 0.8s step-end infinite;
  color: #06B6D4;
}

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

/* === NEON CARD CONTAINER === */
.cyber-card {
  background: rgba(16, 16, 28, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.05), inset 0 0 30px rgba(139, 92, 246, 0.02);
  backdrop-filter: blur(8px);
}

/* === CORNER ACCENTS === */
.cyber-corners {
  position: relative;
}

.cyber-corners::before,
.cyber-corners::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(139, 92, 246, 0.5);
  border-style: solid;
}

.cyber-corners::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
  border-radius: 3px 0 0 0;
}

.cyber-corners::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 3px 0;
}

/* === NEON TEXT GLOW === */
.neon-purple { color: #8B5CF6; text-shadow: 0 0 12px rgba(139, 92, 246, 0.6); }
.neon-cyan   { color: #06B6D4; text-shadow: 0 0 12px rgba(6, 182, 212, 0.6); }

/* === FORM INPUTS === */
input[type="text"], input[type="email"], input[type="tel"] {
  background-color: rgba(10, 10, 20, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.2s ease;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15), 0 0 12px rgba(139, 92, 246, 0.1);
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #070710; }
::-webkit-scrollbar-thumb { background: #3B1F6A; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8B5CF6; }

/* === RESULT BARS === */
.result-bar-glow {
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* === SCAN FILL (teaser parcial) === */
@keyframes scanFill {
  from { width: 0; }
  to   { width: var(--target, 60%); }
}
.scan-fill {
  animation: scanFill 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scanPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.scan-pulse { animation: scanPulse 1.2s ease-in-out infinite; }

/* === CYBER DIVIDER === */
.cyber-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
  margin: 24px 0;
}

/* === GLITCH TEXT (for profile result) === */
.glitch-title {
  position: relative;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.7;
}

.glitch-title::before {
  color: #06B6D4;
  animation: glitchA 3s infinite linear;
  clip-path: polygon(0 15%, 100% 15%, 100% 40%, 0 40%);
}

.glitch-title::after {
  color: #C026D3;
  animation: glitchB 3s infinite linear;
  clip-path: polygon(0 60%, 100% 60%, 100% 85%, 0 85%);
}

@keyframes glitchA {
  0%, 95%, 100% { transform: translate(0); }
  96%           { transform: translate(-2px, 1px); }
  97%           { transform: translate(2px, -1px); }
  98%           { transform: translate(-1px, 0); }
}

@keyframes glitchB {
  0%, 92%, 100% { transform: translate(0); }
  93%           { transform: translate(2px, 2px); }
  94%           { transform: translate(-2px, 0); }
  95%           { transform: translate(0, 1px); }
}

/* === SCENE BANNER (tema visual por pergunta) === */
.scene-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(139,92,246,0.16), rgba(6,182,212,0.05) 55%, transparent);
  border: 1px solid rgba(139,92,246,0.2);
  border-left: 3px solid #8B5CF6;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.45s cubic-bezier(0.16,1,0.3,1) forwards;
}

.scene-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.10) 2px, rgba(0,0,0,0.10) 3px);
  pointer-events: none;
  opacity: 0.5;
}

.scene-icon {
  font-size: 23px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(139,92,246,0.14);
  border: 1px solid rgba(139,92,246,0.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: sceneIconPulse 2.6s ease-in-out infinite;
}

@keyframes sceneIconPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(139,92,246,0.22); }
  50%      { box-shadow: 0 0 20px rgba(139,92,246,0.5); }
}

.scene-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: #a78bfa;
  position: relative;
  z-index: 1;
  line-height: 1.3;
}

.scene-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #6b7280;
  position: relative;
  z-index: 1;
}

/* === GLITCH AO SELECIONAR OPÇÃO === */
@keyframes cardGlitch {
  0%   { transform: translateX(4px); }
  20%  { transform: translateX(-3px) skewX(-1.2deg); box-shadow: -3px 0 0 rgba(192,38,211,0.55), 3px 0 0 rgba(6,182,212,0.55), 0 0 24px -4px rgba(6,182,212,0.4); }
  40%  { transform: translateX(3px) skewX(0.8deg); }
  60%  { transform: translateX(-2px); box-shadow: 3px 0 0 rgba(192,38,211,0.5), -3px 0 0 rgba(6,182,212,0.5), 0 0 24px -4px rgba(6,182,212,0.4); }
  80%  { transform: translateX(1px) skewX(-0.5deg); }
  100% { transform: translateX(4px); box-shadow: 0 0 24px -4px rgba(6,182,212,0.35); }
}

.option-card.glitching { animation: cardGlitch 0.24s steps(3) 1; }

/* === NUMERAÇÃO DE PERGUNTA === */
#q-counter {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #a78bfa;
  white-space: nowrap;
  flex-shrink: 0;
}

/* === SESSION TIMER (ambiente, sem urgência de venda) === */
#session-timer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #06B6D4;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.85;
  transition: color 0.4s ease;
}

#session-timer .timer-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  opacity: 0.65;
}

#session-timer.low {
  color: #f5a623;
  opacity: 1;
}

#session-timer.ended {
  color: #6b7280;
  opacity: 0.6;
}

/* === EDU STAT (número em destaque) === */
.edu-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  background: linear-gradient(90deg, #8B5CF6, #06B6D4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
}
