* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #1e293b;
  color: #f8fafc;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.container {
  max-width: 800px;
  width: 100%;
  background: #1e293b;
  padding: 30px;
  
  text-align: center;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: white;
}

.subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

button, .file-btn {
  background-color: black;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}


button:disabled {
  background-color: #475569;
  cursor: not-allowed;
  opacity: 0.6;
}

#stopBtn {
  background-color: #ef4444;
}



input[type="file"] {
  display: none;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  background: #0f172a;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.canvas-box {
  background: #0f172a;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvas-box h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: #e2e8f0;
}

canvas {
  border: 2px solid #334155;
  background: #000;
  width: 256px;
  height: 256px;
  image-rendering: pixelated; 
}

#outputCanvas {
  image-rendering: auto;
}

.canvas-box p {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
}