/* base.css — reset, the studio room, and shared hardware textures. */

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* --- The studio room (the wall viewport) --- */
.hw-wall {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(1200px 700px at 50% 30%, rgba(217, 155, 127, 0.07), transparent 60%),
    radial-gradient(1600px 900px at 80% 90%, rgba(79, 143, 147, 0.06), transparent 55%),
    var(--bg);
  scrollbar-color: var(--edge) var(--bg-deep);
}
.hw-wall::-webkit-scrollbar { width: 12px; height: 12px; }
.hw-wall::-webkit-scrollbar-track { background: var(--bg-deep); }
.hw-wall::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2A3E4A, #1B2C38);
  border-radius: 6px;
  border: 2px solid var(--bg-deep);
}

/* The world: one scaled layer holding every module. */
.hw-world {
  position: relative;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 64px);
  will-change: transform;
  transform: translateZ(0);
  contain: layout paint;
}
.hw-world.smooth { transition: transform 140ms ease-out; }
.hw-world .hw-module.dragging { will-change: transform; }

/* --- Per-module sizing (fixed dimensions so scroll/pan behave) --- */
.hw-world .hw-module[data-module="piano-roll"] { width: 300px; }
.hw-world .hw-module[data-module="playlist"] { width: 860px; }
.hw-world .hw-module[data-module="sequencer"] { width: 560px; }
.hw-world .hw-module[data-module="mixer"] { width: 560px; }
.hw-world .hw-module[data-module="fx-rack"] { width: 560px; }
.hw-world .hw-module[data-module="transport-files"] { width: 340px; }

/* --- HUD (zoom controls) --- */
.hw-hud {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  gap: 6px;
  align-items: center;
  background: linear-gradient(180deg, #163E4E, #102F3D);
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hw-hud-btn {
  width: 26px;
  height: 24px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: linear-gradient(180deg, #1B4A5C, #163E4E);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.hw-hud-btn:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.hw-hud-label {
  min-width: 42px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
}
