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

body {
  background: #0f1117;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Courier New', monospace;
  color: #e2e8f0;
}

#app {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Sidebar */
#sidebar {
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #818cf8;
  text-align: center;
}

.panel {
  background: #1e2235;
  border: 1px solid #2d3355;
  border-radius: 8px;
  padding: 10px 14px;
}

.label {
  font-size: 9px;
  letter-spacing: 2px;
  color: #64748b;
  margin-bottom: 4px;
}

#score, #level, #lines {
  font-size: 24px;
  font-weight: 700;
  color: #f1f5f9;
}

#next-canvas {
  display: block;
  margin: 6px auto 0;
}

#controls {
  font-size: 11px;
  color: #475569;
  line-height: 1.8;
}

kbd {
  background: #1e2235;
  border: 1px solid #334155;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  color: #94a3b8;
}

.key-row { margin-bottom: 2px; }

/* Game area */
#game-area {
  position: relative;
}

#game-canvas {
  display: block;
  border: 2px solid #2d3355;
  border-radius: 4px;
  background: #0a0c14;
}

/* Overlay */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 20, 0.88);
  border-radius: 4px;
  gap: 16px;
}

#overlay.hidden { display: none; }

#overlay-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #818cf8;
  text-shadow: 0 0 30px #6366f188;
}

#overlay-msg {
  font-size: 14px;
  color: #94a3b8;
  letter-spacing: 2px;
  animation: blink 1.2s ease-in-out infinite;
}

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