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

body {
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'JetBrains Mono', monospace;
  color: #c0c8e0;
  cursor: none;
  -webkit-user-select: none;
  user-select: none;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

#grid-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(0,245,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.glass-panel {
  position: fixed;
  z-index: 10;
  background: rgba(10, 12, 30, 0.82);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,245,255,0.02);
  min-width: 220px;
  transition: opacity 0.3s;
}

#hud-left {
  top: 16px;
  left: 16px;
}

#hud-right {
  top: 16px;
  right: 16px;
}

.hud-title {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #00f5ff;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(0,245,255,0.4);
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  gap: 12px;
}

.hud-label {
  color: #6b7394;
  font-weight: 200;
}

.hud-value {
  color: #e0e6ff;
  font-weight: 700;
  font-size: 12px;
  text-align: right;
}

.arch-val {
  font-size: 9px;
  color: #8890b0;
}

.ctrl-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 8px;
  color: #00f5ff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ctrl-btn:hover {
  background: rgba(0, 245, 255, 0.18);
  box-shadow: 0 0 15px rgba(0,245,255,0.15);
}

.ctrl-btn.active {
  background: rgba(255, 0, 170, 0.12);
  border-color: rgba(255, 0, 170, 0.3);
  color: #ff00aa;
}

.ctrl-btn.paused {
  background: rgba(255, 180, 0, 0.12);
  border-color: rgba(255, 180, 0, 0.3);
  color: #ffb400;
}

.slider-group {
  margin-top: 10px;
  margin-bottom: 6px;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #6b7394;
  margin-bottom: 4px;
  font-weight: 200;
}

.slider-group label span {
  color: #e0e6ff;
  font-weight: 700;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 245, 255, 0.15);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00f5ff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00f5ff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}

#bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(10, 12, 30, 0.75);
  border-top: 1px solid rgba(0,245,255,0.08);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  gap: 20px;
}

.info-text {
  font-size: 10px;
  font-weight: 200;
  color: #5a6180;
  line-height: 1.5;
}

.clr-actual { color: #00f5ff; font-weight: 700; }
.clr-prediction { color: #ff00aa; font-weight: 700; }

.remix-link {
  color: #3a3f5a;
  font-size: 10px;
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s;
}

.remix-link:hover {
  color: #00f5ff;
}

#fooled-flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 120px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: none;
  filter: drop-shadow(0 0 40px rgba(255,0,170,0.8));
}

#fooled-flash.show {
  animation: fooledAnim 0.8s ease-out forwards;
}

@keyframes fooledAnim {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.3); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

@media (max-width: 700px) {
  #hud-left, #hud-right {
    position: fixed;
    left: 8px;
    right: 8px;
    min-width: unset;
    font-size: 10px;
    padding: 10px 14px;
  }
  #hud-left { top: 8px; }
  #hud-right { top: auto; bottom: 50px; }
  .hud-row { font-size: 9px; }
  .hud-value { font-size: 10px; }
  #bottom-bar { padding: 8px 12px; }
  .info-text { font-size: 8px; }
}