:root {
  --bg: #111;
  --panel: #1a1a1a;
  --key: #333;
  --key-hover: #555;
  --lamp-off: #222;
  --lamp-on: yellow;
  --accent: #c0030d;
  --ok: #03df9d;
  --text: #eee;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

h1 {
  margin: 8px 0 12px;
  font-size: 20px;
}

.controls {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

textarea,
select,
input[type="number"] {
  width: 100%;
  max-width: 900px;
  margin: 0;
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #222;
  background: var(--panel);
  color: var(--text);
  box-sizing: border-box;
}

textarea {
  height: 90px;
  resize: vertical;
}

.row-controls {
  display: flex;
  flex-direction: row;
  align-items: left;
  gap: 8px;
  width: 100%;
}

.config {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 96%;
  align-items: center;
  margin: 1vw;
}

.buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-direction: row;

}

.rotor-config {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 8px;

  label {
    text-align: center;
  }
}



button {
  padding: 0.7vw;
  font-size: 17px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  color: var(--text);
  background: var(--key);
}

button:hover {
  background: var(--key-hover);
}

#translate_btn {
  background: var(--accent);
  color: #fff;
}

#copy_btn {
  background: var(--ok);
  color: #000;
}

.panels {
  display: flex;
  gap: 20px;
  margin-top: 18px;
  width: 100%;
  /* max-width: 1100px; */
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.keyboard-wrap,
.lamps-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.keyboard {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  padding: 6px;
}

.row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.key {
  background: var(--key);
  color: var(--text);
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  width: 6vw;
  height: 2vw;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.key:active {
  transform: translateY(1px);
}

.key:hover {
  background: var(--key-hover);
}

.lampboard {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.lamp-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.lamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--lamp-off);
  color: var(--text);
  width: 60px;
  height: 60px;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.6);
}

.lamp.on {
  background: var(--lamp-on);
  color: #000;
  box-shadow: 0 0 8px rgba(255, 200, 0, 0.6);
}

/* ------------------------------------------------------- */

@media (max-width: 768px) {

  h1 {
    font-size: 18px;
    text-align: center;
  }

  .lampboard {
    display: none;
  }

  .config {
    flex-direction: column-reverse;
  }

  textarea,
  select,
  input[type="number"] {
    font-size: 14px;
    padding: 8px;
  }

  .row-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 4vw 0;
  }

  .rotor-config {
    width: 100%;
  }

  .buttons {
    width: 100%;
    margin: 15vw 0;
  }

  .row {
    width: 100%;
  }

  button {
    width: 100%;
    font-size: 16px;
    padding: 12px;
  }

  .key {
    width: 42px;
    height: 42px;
    font-size: 14px;
    padding: 0;
  }

}