:root {
  --bg-dark: #1e1e1e;
  --bg-panel-left: #2c2c2c;
  --bg-panel-right: #333;
  --text-color: #ccc;
  --border-color: #444;
  --highlight: #fff;

  /* Basis Textgrößen für bessere Skalierung auf Mobile/Tablet/Desktop */
  font-size: 16px;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: var(--bg-dark);
  color: var(--text-color);
}

.container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
}

.mixer, .target {
  flex: 1;
  padding: 1.25rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.mixer {
  background: var(--bg-panel-left);
  border-right: 1px solid var(--border-color);
}

.target {
  background: var(--bg-panel-right);
}

h2, h3 {
  margin-top: 0;
  color: var(--highlight);
  font-size: 1.25rem;
}

.color-inputs {
  margin-bottom: 1.25rem;
}

.color-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.625rem;
}

.color-row label {
  width: 6rem;
  font-weight: bold;
  color: var(--highlight);
  font-size: 0.9rem;
}

.color-row input[type=range] {
  flex: 1;
  margin: 0 0.625rem;
}

.value {
  min-width: 3rem;
  text-align: right;
  font-family: monospace;
  color: var(--highlight);
  font-size: 0.9rem;
}

.mix-result, .match-info {
  margin-top: 1.25rem;
}

.color-box {
  width: 6.25rem;
  height: 6.25rem;
  border: 1px solid #555;
  margin-bottom: 0.625rem;
}

#targetHex {
  width: 7rem;
  margin-left: 0.625rem;
  background: #444;
  color: var(--highlight);
  border: 1px solid #555;
  padding: 0.25rem;
  font-size: 1rem;
}

#ratioResult {
  background: #444;
  padding: 0.625rem;
  border: 1px solid #555;
  margin-top: 0.625rem;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

/* Responsive Anpassungen */

/* Mobile: Schmale Bildschirme - Die Panels untereinander statt nebeneinander anzeigen */
@media (max-width: 600px) {
  .container {
    flex-direction: column;
    height: auto;
  }

  .color-row label {
    width: 5rem;
    font-size: 0.8rem;
  }

  h2, h3 {
    font-size: 1.1rem;
  }

  .color-box {
    width: 5rem;
    height: 5rem;
  }

  #targetHex {
    width: 6rem;
  }

  body {
    font-size: 14px;
  }
}

/* Tablet Portrait: etwa bis 900px - Panels können nebeneinander bleiben aber etwas kleiner Font */
@media (max-width: 900px) and (min-width: 601px) {
  body {
    font-size: 15px;
  }
}

/* Tablet Landscape oder kleine Desktop Bildschirme */
@media (min-width: 901px) and (max-width: 1200px) {
  body {
    font-size: 15px;
  }

  .color-row label {
    width: 5.5rem;
  }
}
