.title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 6px;
}

.title h4 {
  text-align: center;
  color: #e8edf5;
  font-size: 22px;
  letter-spacing: 1px;
}

.reset-img-btn {
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.reset-img-btn:hover {
  transform: rotate(180deg);
  background: rgba(0, 229, 160, 0.1);
}

.reset-img-btn img {
  width: 28px;
  height: 28px;
  filter: invert(1);
}

.keyboard {
  width: 1300px;
  margin: 0 auto;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.key-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin-bottom: 4px;
}

.key-item {
  height: 60px;
  line-height: 60px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 6px;
  flex-shrink: 0;
  font-weight: 500;
  background: #111b2e;
  color: #e8edf5;
  transition: all 0.15s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.key-item.pressed {
  background: #00e5a0 !important;
  color: #060b14 !important;
  border-color: #00e5a0;
  box-shadow: 0 0 20px rgba(0, 229, 160, 0.4);
}

.key-item .desc {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  font-size: 13px;
  color: #e8edf5;
}

.key-item .desc p {
  margin: 0;
  width: 100%;
}

.key-item .shift-key {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  line-height: 1.4;
}

.key-item .shift-key .shift {
  color: #8892a8;
  font-size: 11px;
}

.key-item .shift-key .key {
  color: #e8edf5;
  font-weight: 500;
}

.key-item .function-key {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.key-item .function-key .key {
  background: rgba(0, 229, 160, 0.15);
  color: #00e5a0;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.key-item .main {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.key-item .main p {
  margin: 0;
  font-size: 14px;
  color: #e8edf5;
}

.key-item .cap-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.key-item .cap-lock.active {
  background: #00e5a0;
  box-shadow: 0 0 8px rgba(0, 229, 160, 0.6);
}

.key-item.arrow-up,
.key-item.arrow-down,
.key-item.arrow-left,
.key-item.arrow-right {
  background: #162033;
  min-width: 60px;
}

.key-item.arrow-up.pressed,
.key-item.arrow-down.pressed,
.key-item.arrow-left.pressed,
.key-item.arrow-right.pressed {
  background: #00e5a0 !important;
  color: #060b14 !important;
}

/* Arrow keys grid - inverted T layout */
.key-arrow {
  margin: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-grid {
  display: grid;
  grid-template-columns: 60px 60px 60px;
  grid-template-rows: 60px 60px;
  gap: 6px;
}

.arrow-up {
  grid-column: 2;
  grid-row: 1;
}

.arrow-left {
  grid-column: 1;
  grid-row: 2;
}

.arrow-down {
  grid-column: 2;
  grid-row: 2;
}

.arrow-right {
  grid-column: 3;
  grid-row: 2;
}
