* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: 'Share Tech Mono', monospace; 
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input[type="text"] {
  user-select: text;
  -webkit-user-select: text;
  font-size: 16px;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: #191c20;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
}

/* MAIN CONTAINER */
.synth-container {
  background: #a4acb3;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 1150px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 10px auto;
}

/* MAIN ROW */
.synth-main-row {
  display: flex;
  gap: 32px;
  width: 100%;
}

/* LEFT PANEL */
.left-panel {
  width: 280px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 16px;
}

.header-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-box {
  background: #7bd855;
  padding: 6px 12px;
  border-radius: 4px;
}

.brand-title {
  font-size: 1.8rem;
  font-weight: bold;
  font-style: italic;
  color: #11200b;
  letter-spacing: 1px;
}

.power-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative; 
  width: 44px; 
  height: 24px; 
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #555; border-radius: 20px; transition: .3s;
}
.switch-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%; transition: .3s;
}
input:checked + .switch-slider { background-color: #7bd855; }
input:checked + .switch-slider:before { transform: translateX(20px); background-color: #000; }

.search-box {
  display: flex;
  background: #000;
  border-radius: 4px;
  padding: 4px 8px;
  flex: 1;
}

.search-box input {
  background: transparent;
  border: none;
  color: #7bd855;
  padding: 2px;
  width: 100%;
  outline: none;
  font-size: 0.85rem;
}

.search-box button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #7bd855;
}

.master-vol-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.master-label {
  font-size: 0.7rem;
  font-weight: bold;
  color: #222;
}

#master-slider {
  width: 100%;
  height: 20px;
  accent-color: #7bd855;
  cursor: pointer;
}

/* PRESET & FAVORITES 2-COLUMN LAYOUT */
.preset-section {
  display: flex;
  gap: 8px;
  width: 100%;
}

.koppen-col, .fav-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* BASE BUTTON STYLES */
.btn-preset {
  background: #3e444a;
  color: #7bd855;
  border: none;
  border-radius: 18px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  min-height: 40px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

/* Hover effect only when machine is powered ON */
.btn-preset:not(:disabled):hover {
  background: #4f565e;
}

/* Active clicked state */
.btn-preset:not(:disabled):active,
.btn-preset.active-fav { 
  background: #7bd855 !important; 
  color: #000 !important; 
}

/* DISABLED / POWER OFF STATE (Applies to all presets + RANDOM identically) */
.btn-preset:disabled,
#btn-random:disabled { 
  opacity: 0.35 !important; 
  cursor: not-allowed; 
  background: #2a2e33 !important;
  color: #4a5158 !important;
  pointer-events: none; /* Fixes buttons not being clickable when ON if disabled state stuck */
}

/* RIGHT PANEL */
.right-panel {
  flex: 1;
  width: 100%;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.channel-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.06);
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #7bd855;
}

.channel-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: #1a1c1f;
  letter-spacing: 1px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.param-label {
  font-size: 0.7rem;
  font-weight: bold;
  width: 24px;
  text-align: right;
}

.label-int { color: #11200b; }
.label-vol { color: #4a5158; }

.horiz-fader {
  flex: 1;
  height: 20px;
  cursor: pointer;
}

.int-fader { accent-color: #7bd855; }
.vol-fader { accent-color: #3e444a; }

/* LCD DISPLAY CONTAINER */
.lcd-display {
  background: #000;
  border-radius: 6px;
  padding: 10px 14px;
  min-height: 44px;
  height: auto;
  width: 100%;
  display: flex;
  align-items: center;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
}

/* STATUS TICKER TEXT */
.status-ticker {
  color: #7bd855;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  width: 100%;
}

/* =======================================================
   MOBILE BREAKPOINT
   ======================================================= */
@media screen and (max-width: 850px) {
  .synth-container {
    padding: 14px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .synth-main-row {
    flex-direction: column;
    gap: 16px;
  }

  .left-panel, .right-panel {
    width: 100%;
  }

  /* Keeps 2 neat columns on mobile matching desktop layout */
  .preset-section {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .koppen-col, .fav-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 1;
  }

  .btn-preset {
    font-size: 0.68rem; /* Slightly reduced font so labels like CONTINENTAL fit cleanly */
    min-height: 38px;
  }

  .controls-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status-ticker {
    font-size: 0.78rem;
    line-height: 1.35;
  }
}
