.results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 15, 15, 0.9);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 30px rgba(0, 150, 255, 0.3);
  max-width: 500px;
  width: 100%;
  margin: auto;
  position: relative;
  border: 1px solid rgba(0, 150, 255, 0.3);
  z-index: 3;
  max-height: min-content;
}

.results-container h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-align: center;
}

.wpm-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 80%;
}

.stats-row {
  display: flex;
  width: 100%;
}

.stat-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #aaccee;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: #aaccee;
  margin-top: 0.5rem;
  opacity: 0.8;
}

.high-scores {
  width: 100%;
}

.high-scores h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #aaccee;
  text-align: center;
}

.high-scores ul {
  list-style-type: none;
  padding-left: 0;
}

.high-scores li {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 150, 255, 0.1);
  border-radius: 4px;
  text-align: center;
  display: flex;
  justify-content: space-between;
}

.high-score-rank {
  font-weight: bold;
  color: #00aaff;
  flex: 0 0 40px;
  text-align: left;
}

.high-score-name {
  font-weight: bold;
  color: #ffffff;
  flex: 0 0 80px;
  text-align: center;
}

.high-score-points {
  font-weight: bold;
  color: #ffd700;
  flex: 0 0 90px;
}

.high-score-stats {
  color: #aaccee;
  flex: 1;
  text-align: right;
}

.high-scores p {
  color: #aaaaaa;
  text-align: center;
}

.results-footer {
  margin-top: 2.5rem;
  text-align: center;
}

.results-footer p {
  color: #aaaaaa;
  font-size: 0.9rem;
}

.results-footer kbd {
  background-color: #444;
  border-radius: 3px;
  border: 1px solid #666;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  color: #fff;
  display: inline-block;
  font-size: 0.9rem;
  font-family: "JuliaMono", monospace;
  line-height: 1;
  padding: 3px 6px;
  margin: 0 3px;
}

.results-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 20, 40, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 0 0;
}

.hidden {
  display: none !important;
}

.uncorrected-warning {
  margin-top: 0.8rem;
  margin-bottom: 1.2rem;
  color: #ffb347;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
  text-align: center;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.uncorrected-warning strong {
  color: #ffcc66;
  font-weight: bold;
}

@keyframes user-score-pulsate {
  0%, 100% {
    box-shadow: 0 0 10px #00ffd044, 0 0 20px #00ffd044;
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 24px #00ffd088, 0 0 40px #00ffd088;
    opacity: 0.85;
  }
}

.user-score {
  background-color: rgba(0, 255, 170, 0.22) !important;
  color: #00ffd0 !important;
  font-weight: bold;
  border: 2px solid #00ffd0;
  box-shadow: 0 0 10px #00ffd044, 0 0 20px #00ffd044;
  /* animation: user-score-pulsate 1.2s infinite cubic-bezier(0.4,0,0.2,1); */
}

.score-prominent {
  font-size: 5rem;
  font-weight: 900;
  text-align: center;
  margin: 0.5em 0 0.2em 0;
  color: #ffd700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px #000, 0 0 8px #fff8, 0 0 16px #ffd70088;
}

.editable-name {
  opacity: 0.7;
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.name-letter {
  position: relative;
  width: 1em;
  text-align: center;
}

.name-letter.inactive {
  opacity: 0.4;
}

.name-letter.active {
  opacity: 1;
  color: #00ffd0;
  text-shadow: 0 0 5px #00ffd088;
}

@keyframes cursor-blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0.5;
  }
}

.name-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 255, 170, 0.3);
  z-index: -1;
  animation: cursor-blink 0.6s infinite;
}

/* Loading scores animation styles */
.loading-scores {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  width: 100%;
}

.loading-scores p {
  color: #aaccee;
  margin-top: 1rem;
  font-size: 1.1rem;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-score-row {
  position: relative;
}

.skeleton-score-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, 
    rgba(0, 150, 255, 0.1),
    rgba(0, 150, 255, 0.2),
    rgba(0, 150, 255, 0.1)
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}