/* VK Terminal — Clean Terminal Style */

:root {
  --bg: #0a0a0a;
  --panel-bg: #000;
  --border: #444;
  --text: #d0d0d0;
  --text-muted: #888;
  --accent: #ffcc00;
  --active: #ffdd88;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  height: 100%;
  overflow: hidden;
}

/* Main container with 50px margin */
.frame {
  position: absolute;
  top: 50px;
  left: 50px;
  right: 50px;
  bottom: 50px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

/* Top bar */
.top-bar {
  height: 32px;
  background: #111;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 16px;
  font-size: 11px;
  flex-shrink: 0;
}

.top-bar .slot {
  color: var(--text-muted);
}

.top-bar .slot.ready {
  color: var(--accent);
}

.top-bar .status-main {
  margin-left: 50px;
  color: var(--text);
  flex-shrink: 0;
}

/* Speech recognition marquee */
.speech-marquee {
  margin-left: auto;
  margin-right: 50px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  max-width: 600px;
  min-width: 300px;
  height: 100%;
  display: flex;
  align-items: center;
}

.speech-marquee-track {
  position: absolute;
  left: 0;
  display: flex;
  gap: 0.4em;
  will-change: transform;
}

.speech-marquee .word {
  display: inline-block;
  flex-shrink: 0;
}

.speech-marquee .word.upcoming {
  color: #cc0000;
}

.speech-marquee .word.in-progress {
  color: #cccc00;
}

.speech-marquee .word.recognized {
  color: #22aa22;
  opacity: 0.25;
}

/* Bottom bar */
.bottom-bar {
  height: 32px;
  background: #111;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  font-size: 11px;
  flex-shrink: 0;
}

.bottom-bar .info {
  color: var(--text-muted);
}

.bottom-bar .info .value {
  color: var(--accent);
}

.bottom-bar .spacer {
  flex: 1;
}

/* Control buttons in bottom bar */
.ctrl-btn {
  padding: 4px 10px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
}

.ctrl-btn:hover {
  background: #222;
  border-color: #666;
  color: var(--text);
}

.ctrl-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Workspace (center area with panels) */
.workspace {
  flex: 1;
  background: #050505;
  position: relative;
  overflow: hidden;
}

/* Panels — fixed aspect ratios, scale to fit */
.panel {
  position: absolute;
  background: var(--panel-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel canvas,
.panel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.panel video {
  object-fit: cover;
}

.panel .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.panel .color-bars {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    #fff 0 14.28%,
    #ff0 14.28% 28.56%,
    #0ff 28.56% 42.84%,
    #0f0 42.84% 57.12%,
    #f0f 57.12% 71.4%,
    #f00 71.4% 85.68%,
    #00f 85.68% 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel .color-bars span {
  color: #000;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 3px;
}

/* Fullscreen panel (for dedicated displays) */
.fullscreen-panel {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-panel canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* VU Meters */
.vu-meter {
  position: absolute;
  display: flex;
  flex-direction: row;
  gap: 5px;
  background: #000;
}

.vu-segment {
  flex: 1;
  height: 100%;
}
