/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0d0d1a;
  color: #e0e0ff;
  font-family: 'Segoe UI', 'Courier New', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* ===== Layout ===== */
#app {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
}

/* ===== Game Area ===== */
#game-area {
  position: relative;
}

#game-canvas {
  display: block;
  border: 2px solid #4a4a8a;
  border-radius: 4px;
  background: #0a0a14;
  box-shadow: 0 0 30px rgba(80, 80, 200, 0.3);
}

/* ===== Panels ===== */
#left-panel, #right-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 130px;
}

.panel-box {
  background: #12122a;
  border: 1px solid #2a2a5a;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.panel-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: #7070c0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

#score, #level, #lines {
  font-size: 28px;
  font-weight: bold;
  color: #c0c0ff;
  letter-spacing: 1px;
}

/* ===== Preview Canvases ===== */
#hold-canvas, #next-canvas {
  display: block;
  margin: 0 auto;
  background: transparent;
}

/* ===== Controls ===== */
.controls { font-size: 12px; }

.key-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
  color: #a0a0cc;
}

.key {
  background: #2a2a5a;
  border: 1px solid #4a4a8a;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
  color: #d0d0ff;
}

/* ===== Overlay ===== */
#overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(5, 5, 20, 0.85);
  border-radius: 4px;
  gap: 16px;
  backdrop-filter: blur(4px);
}

#overlay.hidden { display: none; }

#overlay-title {
  font-size: 42px;
  font-weight: bold;
  color: #a0a0ff;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(150, 150, 255, 0.8);
}

#overlay-sub {
  font-size: 14px;
  color: #8080c0;
  letter-spacing: 1px;
}

#overlay-btn {
  background: #2a2a8a;
  border: 2px solid #6060cc;
  border-radius: 6px;
  color: #d0d0ff;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 2px;
  padding: 10px 30px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}

#overlay-btn:hover {
  background: #3a3aaa;
  box-shadow: 0 0 15px rgba(100, 100, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  #app { gap: 8px; padding: 10px; }
  #left-panel, #right-panel { min-width: 90px; }
  .controls { display: none; }
  #score, #level, #lines { font-size: 20px; }
}
