
:root {
  --bg-main: #003135;
  --zinc-950: #09090b;
  --zinc-900: #18181b;
  --zinc-800: #27272a;
  --zinc-700: #3f3f46;
  --zinc-600: #52525b;
  --axios-green: #86a646;
  --axios-amber: #fbbf24;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

body {
  margin: 0;
  padding: 12px 0 0 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: #fff;
  user-select: none;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-header {
  max-width: 1280px;
  margin: 0 auto 12px auto;
  width: 100%;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(24, 24, 27, 0.3);
  border-radius: 4px;
  box-sizing: border-box;
}

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

.logo-brand {
  font-size: 18px;
  font-weight: 900;
  color: #f4f4f5;
  font-style: italic;
  letter-spacing: -0.05em;
}

.logo-highlight {
  color: #86a646;
}

.project-tag {
  font-size: 7px;
  font-weight: bold;
  color: #71717a;
  background: #09090b;
  border: 1px solid #27272a;
  padding: 2px 4px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.header-right {
  font-size: 8px;
  font-weight: 900;
  color: #a1a1aa;
  letter-spacing: 0.1em;
}

.section-header {
  background: #003135;
  border-bottom: 2px solid #000;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-gate {
  background: #86a646;
  color: #fff;
  border: none;
  padding: 6px 32px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  cursor: default;
}

.btn-active {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 6px 32px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.btn-active.active {
  background: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.section-header-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.preset-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.preset-label {
  font-size: 7px;
  font-weight: bold;
  color: #ffffff;
  opacity: 0.5;
  text-transform: uppercase;
}

.btn-preset-square {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 2px 2px 0px #000;
  cursor: pointer;
  transition: all 0.1s;
}

.btn-preset-square:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.kik-color { background: #27272a; }
.kik-color:hover { background: #3f3f46; }
.should-color { background: #86a646; }
.should-color:hover { background: #97bb4f; }
.core-color { background: #2563eb; }
.core-color:hover { background: #3b82f6; }

.rack-layout {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-main);
  box-sizing: border-box;
}

.left-column {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plot-card {
  background: #000;
  border: 1.5px solid #27272a;
  padding: 4px;
  position: relative;
  border-radius: 4px;
}

canvas#gateCanvas {
  width: 310px;
  height: 310px;
  display: block;
  background: #000;
}

.gate-scales {
  position: absolute;
  bottom: -18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  font-weight: 900;
  color: #52525b;
}

.media-led-container {
  display: flex;
  gap: 8px;
  align-items: stretch;
  background: rgba(9, 9, 11, 0.8);
  border: 1.5px solid rgba(63, 63, 70, 0.5);
  padding: 8px;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0,0,0,0.4);
  margin-top: 16px;
}

.mini-led-rack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px;
  border-radius: 4px;
  border: 1px solid rgba(39, 39, 42, 0.8);
  width: 55px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.led-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 12px;
}

.led-light {
  width: 10px;
  height: 8px;
  border-radius: 2px;
  transition: opacity 0.1s;
  opacity: 0.1;
}

.led-red { background: #ef4444; }
.led-yellow { background: #fbbf24; }
.led-green { background: #22c55e; }

.led-active-red { opacity: 1 !important; box-shadow: 0 0 8px rgba(239, 68, 68, 0.8); }
.led-active-yellow { opacity: 1 !important; box-shadow: 0 0 8px rgba(250, 204, 21, 0.8); }
.led-active-green { opacity: 1 !important; box-shadow: 0 0 8px rgba(34, 197, 94, 0.8); }

.led-txt {
  font-size: 7px;
  font-weight: 900;
  color: #52525b;
}

.player-deck {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.player-display {
  background: rgba(0, 0, 0, 0.95);
  padding: 4px 6px;
  border-radius: 2px;
  border: 1px solid #09090b;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
  height: 24px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.track-name {
  font-size: 10px;
  font-weight: 900;
  color: #00ff00;
  font-family: monospace;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.player-button-row {
  display: flex;
  gap: 6px;
  height: 38px;
}

.player-btn {
  font-family: monospace;
  font-size: 10px;
  font-weight: 900;
  border-radius: 2px;
  border: 1.5px solid #27272a;
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-open {
  flex: 1.2;
  background: #2d2d2d;
  color: #d4d4d8;
  border: 1.5px solid #3f3f46;
}

.btn-open:hover { color: #fff; background: #3a3a3a; }
.btn-open:active { background: #202020; }
.btn-emoji { color: #00ff00; font-size: 11px; margin-right: 2px; }

.btn-play {
  flex: 1;
  padding: 0 10px;
  background: #2d2d2d;
  color: #d4d4d8;
}

.btn-play:hover { color: #fff; background: #3a3a3a; }
.btn-play.playing {
  background: #153a1c;
  color: #00ff00;
  box-shadow: inset 0 2px 4px rgba(0, 255, 0, 0.3);
  border-color: #00ff0055;
}

.play-indicator { color: #22c55e; margin-right: 2px; }
.playing .play-indicator { color: #ef4444; margin-right: 2px; }

.btn-loop {
  width: 36px;
  background: #2d2d2d;
  color: #71717a;
}

.btn-loop.active {
  background: #1a2d3e;
  color: #3b82f6;
  border-color: #3b82f6aa;
  box-shadow: inset 0 2px 4px rgba(59, 130, 246, 0.3);
}

.meters-col {
  height: 250px;
  display: flex;
  gap: 16px;
  padding: 0 24px;
  flex-shrink: 0;
}

.meter-wrapper {
  display: flex;
  align-items: flex-end;
  height: 100%;
  gap: 4px;
}

.scale-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 16px 0;
  font-size: 8px;
  font-weight: 900;
  color: #bef264;
  font-family: monospace;
  box-sizing: border-box;
}

.left-scale { text-align: right; width: 22px; }
.right-scale { text-align: left; width: 22px; }

.meter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 24px;
}

.meter-track {
  flex: 1;
  width: 24px;
  background: #000;
  border: 1.5px solid #27272a;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

.meter-bar {
  position: absolute;
  left: 0;
  right: 0;
  transition: height 0.075s;
  z-index: 10;
}

#meterInBar, #meterOutBar {
  bottom: 0;
  box-shadow: 0 0 15px rgba(134,166,70,0.4);
}

#meterThBar {
  top: 0;
  box-shadow: 0 0 15px rgba(234,179,8,0.4);
}

.meter-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 2px;
  pointer-events: none;
  opacity: 0.2;
  z-index: 20;
  box-sizing: border-box;
}

.meter-ticks div {
  height: 1px;
  background: #a1a1aa;
  width: 100%;
}

.th-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 955;
  color: #fff;
  letter-spacing: 0.4em;
  opacity: 0.1;
}

.meter-label {
  font-size: 9px;
  font-weight: 900;
  color: #71717a;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.controls-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 16px;
  box-sizing: border-box;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 32px;
  user-select: none;
}

.control-header {
  width: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}

.control-label {
  font-size: 10px;
  font-weight: bold;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  opacity: 0.8;
}

.control-value {
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  font-family: monospace;
}

.control-value .unit {
  font-size: 8px;
  opacity: 0.5;
}

.slider-container {
  flex: 1;
  height: 28px;
  background: #000;
  border-radius: 4px;
  border: 1.5px solid #3f3f46;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.slider-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 2px;
  opacity: 0.8;
}

.slider-grid {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  pointer-events: none;
  opacity: 0.3;
}

.slider-grid div {
  width: 1px;
  height: 100%;
  background: #3f3f46;
}

.slider-grid div.midpoint {
  background: #fff;
  opacity: 1;
  width: 2px;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  background: #e5e7eb;
  border-radius: 4px;
  border-left: 1px solid #a1a1aa;
  border-right: 1px solid #a1a1aa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 10;
  box-sizing: border-box;
}

.slider-handle .rib {
  width: 3px;
  height: 11px;
  background: #9ca3af;
  border-radius: 9999px;
}

.sync-badge {
  width: 48px;
  padding: 2px;
  background: #27272a;
  border: 1.5px solid #3f3f46;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  font-family: monospace;
  line-height: 1.1;
  box-sizing: border-box;
  text-align: center;
}

.timeline-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(63, 63, 70, 0.3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  font-weight: 900;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e4e4e7;
}

.activity-icon {
  stroke: #fbbf24;
}

.timeline-indicators {
  display: flex;
  gap: 8px;
}

.timeline-canvas-container {
  background: #000;
  border-radius: 4px;
  border: 1.5px solid #27272a;
  position: relative;
  overflow: hidden;
  height: 35px;
}

#timelineCanvas {
  width: 100%;
  height: 35px;
  display: block;
  opacity: 0.8;
}

.bottom-footer {
  height: 32px;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 10px;
  font-weight: bold;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-sizing: border-box;
  width: 100%;
  margin-top: auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
}

.dot-green { background: #22c55e; }
.shadow-green { box-shadow: 0 0 8px #22c55e; }
.dot-red { background: #ef4444; }
.shadow-red { box-shadow: 0 0 8px #ef4444; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-monitor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid #3f3f46;
  background: #27272a;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-monitor.active {
  background: #86a646;
  color: #fff;
  border-color: #86a646;
}

.monitor-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  transition: background 0.2s;
}

.bg-white { background: #fff; }
.shadow-white { box-shadow: 0 0 8px #fff; }
.bg-zinc-600 { background: #52525b; }

.footer-separator {
  height: 16px;
  width: 1px;
  background: #27272a;
  margin: 0 8px;
}

.mic-icon {
  width: 12px;
  height: 12px;
  stroke: #a1a1aa;
}

.footer-txt {
  font-weight: bold;
}
