body {
  background-color: #131313;
  background-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(242, 190, 140, 0.03) 0%,
    transparent 60%
  );
}

.key-correct {
  background-color: #97c459 !important;
  border-color: #639922 !important;
}

.key-wrong {
  background-color: #e24b4a !important;
  border-color: #a32d2d !important;
}

#texto {
  font-size: 24px;
  line-height: 1.8;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease-out;
}

@media (min-width: 768px) {
  #texto {
    font-size: 28px;
  }
}

#zonaTexto {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.kb-key {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #393939;
  border: 1px solid #50453b;
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 500;
  color: #e5e2e1;
  transition: all 0.1s;
  box-shadow: 0 4px 0 #353535;
  cursor: pointer;
  user-select: none;
}

.kb-key:hover {
  background: #50453b;
}

.kb-key-shift {
  width: 80px;
}

.kb-key-caps {
  width: 80px;
}

.kb-key-backspace {
  width: 80px;
}

.key-caps-active {
  background-color: #97c459 !important;
  border-color: #639922 !important;
  color: #131313 !important;
}

.kb-key-symbol {
  width: 58px;
}

.kb-space {
  flex: 1;
  max-width: 360px;
  height: 52px;
  background: #393939;
  border: 1px solid #50453b;
  border-radius: 12px;
  box-shadow: 0 4px 0 #353535;
}

.kb-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.kb-container {
  width: 100%;
  max-width: 920px;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  background: #1c1b1b;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #353535;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #20201f;
  border: 1px solid #353535;
  border-radius: 16px;
  padding: 32px 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: #9c8e82;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.modal-ppm {
  font-family: "JetBrains Mono", monospace;
  font-size: 56px;
  font-weight: 700;
  color: #f2be8c;
  line-height: 1;
}

.modal-ppm-label {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: #9c8e82;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

.modal-accuracy {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 700;
  color: #c1ce91;
  margin-top: 20px;
}

.modal-accuracy-label {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: #9c8e82;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

.modal-btn {
  margin-top: 28px;
  padding: 10px 28px;
  background: #f2be8c;
  color: #131313;
  border: none;
  border-radius: 9999px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-btn:hover {
  background: #ffdcbd;
}

.site-footer {
  text-align: center;
  padding: 20px;
  margin-top: auto;
  border-top: 1px solid rgba(80, 69, 59, 0.3);
  background: #1c1b1b;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: #9c8e82;
}

.site-footer a {
  color: #f2be8c;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #ffdcbd;
  text-decoration: underline;
}
