/* ============================================================
   TB-123 — Static Stage Styles
   High-contrast, geometric minimalism. No animations, no
   transforms, no wobble. Every element snaps to the grid.
   ============================================================ */

:root {
  --bg:      #0a0a0c;
  --fg:      #e8e8e8;
  --accent:  #00ff9f;
  --danger:  #ff3c5f;
  --border:  #2a2a30;
  --step-dim:#16161a;
  --step-on: #00ff9f;
  --step-cur:#00b87c;
  --font:    'Courier New', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: none;
  overflow-x: hidden;
}

/* --- STAGE CONTAINER --- */
#stage {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- HEADER --- */
#header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

#title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent);
  text-transform: uppercase;
}

#subtitle {
  font-size: 11px;
  letter-spacing: 2px;
  color: #666;
  margin-top: 4px;
}

/* --- CONTROLS --- */
#controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.ctrl-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  text-transform: uppercase;
}

.ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ctrl-btn:active {
  background: var(--accent);
  color: var(--bg);
}

.ctrl-btn.playing {
  border-color: var(--accent);
  color: var(--accent);
}

.param-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.param-group label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #666;
  text-transform: uppercase;
  min-width: 48px;
}

.param-group input[type="range"] {
  width: 100px;
  height: 4px;
  background: var(--border);
  border: none;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.param-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.param-group input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.param-group span {
  font-size: 11px;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

/* --- GRID --- */
#grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  padding: 4px;
}

.grid-row {
  display: flex;
  gap: 2px;
}

/* Step header cells */
#gridHeader .step-header {
  width: calc((932px - 30px) / 16);
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #444;
  letter-spacing: 1px;
  border: 1px solid var(--border);
  background: transparent;
}

.step-header.beat {
  border-color: #3a3a40;
  color: #666;
}

/* Body cells */
.step-cell {
  width: calc((932px - 30px) / 16);
  height: 32px;
  border: 1px solid var(--border);
  background: var(--step-dim);
  cursor: pointer;
  position: relative;
}

.step-cell:hover {
  border-color: #4a4a50;
}

.step-cell.active {
  background: var(--step-on);
  border-color: var(--step-on);
}

.step-cell.cursor {
  border-color: var(--accent) !important;
}

.step-cell.active.cursor {
  background: var(--step-cur);
  border-color: var(--step-cur) !important;
  box-shadow: 0 0 6px rgba(0, 184, 124, 0.4);
}

/* Beat-bound cells get a subtle left-border accent */
.step-cell.beat-bound {
  border-left: 2px solid #3a3a40;
  margin-left: 2px;
}

/* Beat boundaries */
.step-cell.beat-bound {
  border-left: 2px solid #3a3a40;
}

/* --- ROW LABELS --- */
.note-row {
  display: flex;
  gap: 2px;
}

.note-label {
  width: 60px;
  min-width: 60px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 2px;
  color: #666;
  text-transform: uppercase;
}

/* --- FOOTER --- */
#footer {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #444;
  letter-spacing: 1px;
}
