.overlay-keyboard {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  padding: 10px 16px 14px;
  pointer-events: none;
}

.overlay-keyboard[hidden] {
  display: none !important;
}

.overlay-keyboard-inner {
  width: min(1180px, 98vw);
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(170deg, rgba(46, 74, 118, 0.46), rgba(14, 25, 43, 0.88)),
    rgba(10, 17, 30, 0.9);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 10px;
}

.overlay-keyboard-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overlay-keyboard-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.overlay-keyboard-row.is-space-row {
  justify-content: center;
  padding-top: 2px;
}

.overlay-keyboard-key {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(60, 95, 143, 0.38), rgba(13, 24, 42, 0.84));
  color: var(--nebula-color-text);
  font-size: 13px;
  font-weight: 650;
  padding: 0 6px;
}

.overlay-keyboard-key[data-width="2"] {
  flex: 1.55 1 0;
}

.overlay-keyboard-key.is-space {
  flex: 0 1 70%;
  max-width: 760px;
  min-height: 42px;
}

.overlay-keyboard-key.is-modifier,
.overlay-keyboard-key.is-enter {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.overlay-keyboard-key.is-modifier.is-active {
  border-color: rgba(79, 216, 255, 0.55);
  background: linear-gradient(160deg, rgba(79, 216, 255, 0.28), rgba(13, 24, 42, 0.9));
  color: rgba(79, 216, 255, 0.95);
}

.overlay-keyboard.is-uppercase .overlay-keyboard-key.is-letter {
  color: rgba(220, 240, 255, 0.98);
}

.overlay-keyboard-key.is-enter {
  border-color: rgba(122, 255, 168, 0.46);
}

.overlay-keyboard-key.is-focused {
  box-shadow:
    0 0 0 2px rgba(79, 216, 255, 0.5),
    0 0 20px rgba(79, 216, 255, 0.22);
  transform: translateY(-1px);
}
