html, body {
  margin: 0;
  padding: 0;
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.loading {
  text-align: center;
  font-size: 1.2rem;
  color: #888;
}

.emulator-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.toolbar select {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a3e;
  color: #e0e0e0;
  font-size: 0.9rem;
  min-width: 200px;
}

.toolbar button {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a3e;
  color: #e0e0e0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toolbar button:hover:not(:disabled) {
  background: #3a3a5e;
}

#chip8-canvas {
  width: 640px;
  height: 320px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid #444;
  border-radius: 4px;
}

.blazor-error-boundary {
  background: #b32121;
  padding: 1rem;
  color: white;
}