@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@200;400;700&display=swap');

html,
body {
  padding: 0 !important;
  margin: 0 !important;
  font-family: 'Roboto Mono', monospace;
  background: #000000;
  max-width: 100vw;
  overflow-x: hidden;
  color: #212121;
}

* {
  box-sizing: border-box;
}

/* Layout */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.main {
  width: 50%;
  min-width: 320px;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
}

.controls {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.consoleSection {
  margin-top: 30px;
}

/* Listen toggle */
.listenToggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  overflow: visible;
}

.listenToggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.switchTrack {
  position: relative;
  display: inline-block;
  width: 78px;
  height: 36px;
  border-radius: 24px;
  background: rgba(120, 120, 120, 0.5);
  overflow: visible;
}

.switchThumb {
  position: absolute;
  top: -3px;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #9e9e9e;
  box-shadow:
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 2px -2px rgba(0, 0, 0, 0.2),
    0 2px 4px 0 rgba(0, 0, 0, 0.12);
}

.listenToggle input:not(:checked) ~ .switchTrack .switchThumb {
  left: 0;
  right: auto;
}

.listenToggle input:checked ~ .switchTrack .switchThumb {
  left: auto;
  right: 0;
  background: #4caf50;
  box-shadow:
    0 3px 4px 0 rgba(0, 0, 0, 0.14),
    0 3px 3px -2px rgba(0, 0, 0, 0.2),
    0 1px 6px 0 rgba(0, 0, 0, 0.12);
}

.listenToggle input:checked ~ .switchTrack {
  background: rgba(76, 175, 80, 0.5);
}

/* Current keys box */
.currentKeysBox {
  width: 100%;
  min-width: 280px;
  min-height: 120px;
  margin-bottom: 32px;
  padding: 28px 32px;
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.currentKeysLabel {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.currentKeysKeys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: center;
  align-items: center;
  min-height: 48px;
}

.currentKeysKeys .keyWrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.currentKeysKeys .plus {
  color: #666;
  font-size: 1rem;
  font-weight: 500;
}

.currentKeysKeys .key {
  display: inline-block;
  padding: 12px 22px;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: inherit;
  background: #2d2d44;
  color: #e0e0e0;
  border-radius: 8px;
  border: 1px solid #444;
  box-shadow: 0 2px 0 #222;
}

.currentKeysKeys .empty {
  font-size: 1.1rem;
  color: #666;
  font-style: italic;
}

/* Console */
.consoleMenu {
  width: 100%;
  box-sizing: border-box;
  height: 25px;
  background-color: #bbb;
  margin: 0 auto;
  border-top-right-radius: 8px;
  border-top-left-radius: 8px;
}

.consoleMenu div {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  position: relative;
  top: 2px;
  left: 6px;
  display: inline-block;
}

.consoleMenu .close {
  background-color: #ff3b47;
}

.consoleMenu .minimize {
  left: 11px;
  background-color: #ffc100;
}

.consoleMenu .zoom {
  left: 16px;
  background-color: #00d742;
}

.consoleWrapper {
  position: relative;
  background-color: #151515;
  box-sizing: border-box;
  width: 100%;
  min-width: 280px;
  margin: 0 auto;
  padding: 20px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  color: wheat;
  min-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
}

.pausedOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #808080;
  opacity: 0.75;
  border-radius: inherit;
  pointer-events: none;
}

.pausedOverlay[aria-hidden="true"] {
  display: none;
}

.pausedX {
  font-size: 8rem;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
  user-select: none;
}

.consoleWrapper .row {
  font-size: 14px;
}

.consoleWrapper .row + .row {
  margin-top: 15px;
}

.consoleWrapper .interpretation {
  font-size: 14px;
  color: #00d742;
  margin-bottom: 8px;
  font-weight: 500;
}

.historySection {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.historyHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.historyTitle {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.copyButton {
  font-size: 12px;
  padding: 4px 10px;
  background: #333;
  color: #bbb;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.copyButton:hover {
  background: #444;
  color: #ddd;
}

.historyList {
  font-size: 13px;
  color: #bbb;
}

.historyRow {
  margin-top: 4px;
}

.historyIndex {
  color: #666;
  margin-right: 6px;
}
