* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: linear-gradient(160deg, #0a0b14 0%, #0f1029 40%, #140e2a 70%, #0a0b14 100%);
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #12132a; }
::-webkit-scrollbar-thumb { background: #2a2d5a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3d7a; }

.drop-zone {
  border: 2px dashed #2a2d5a;
  transition: border-color 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,240,255,0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: #00f0ff;
  background: rgba(0,240,255,0.03);
}
.drop-zone:hover::before, .drop-zone.drag-over::before { opacity: 1; }

.pipeline-card {
  background: linear-gradient(135deg, rgba(18,19,42,0.9) 0%, rgba(26,28,58,0.7) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: border-color 0.3s ease;
  overflow: hidden;
  will-change: auto;
}
.pipeline-card:hover {
  border-color: rgba(255,255,255,0.12);
}
.pipeline-card.expanded {
  border-color: rgba(255,255,255,0.1);
}

.hex-byte {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  display: inline-block;
  width: 22px;
  text-align: center;
  border-radius: 2px;
}
.hex-byte.highlighted {
  background: rgba(0,240,255,0.2);
  color: #00f0ff;
}

.quant-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: transform 0.15s;
}
.quant-cell:hover { transform: scale(1.2); z-index: 1; }

.progress-step {
  transition: opacity 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

.scan-effect::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,240,255,0.3), transparent);
  animation: scan-line 8s linear infinite;
  pointer-events: none;
  z-index: 1000;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 1px;
  transition: transform 0.1s;
}
.heatmap-cell:hover { transform: scale(2); z-index: 10; }

.nerd-stat {
  background: linear-gradient(135deg, rgba(18,19,42,0.6), rgba(26,28,58,0.4));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 12px 16px;
}

.sample-btn {
  transition: border-color 0.2s, transform 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
}
.sample-btn:hover {
  border-color: rgba(0,240,255,0.4);
  transform: translateY(-1px);
}

.marker-row:hover {
  background: rgba(0,240,255,0.05);
}

/* Progress bar fill animation */
.progress-fill {
  transition: width 0.3s ease;
}

/* MCU navigator */
.mcu-nav-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: border-color 0.2s;
}
.mcu-nav-btn:hover { border-color: rgba(0,240,255,0.5); }
.mcu-nav-btn.active {
  border-color: #b44dff;
  color: #b44dff;
  background: rgba(180,77,255,0.1);
}

@media (max-width: 768px) {
  .hex-byte { width: 18px; font-size: 9px; }
  .quant-cell { width: 26px; height: 26px; font-size: 8px; }
}