* {
  box-sizing: border-box;
}
@import url('https://fonts.googleapis.com/css2?family=Tomorrow&family=Rufina&display=swap');
body {
  margin: 0;
  font-family: 'Fira Code', monospace;
  background-color: #111;
  color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  text-align: center;
  max-width: 1250px;
  padding: 2rem;
}

h1 {
  color: #ffb400;
  font-size: 2.5rem;
}.keyboardIcon {
      font-size: .5rem;
      vertical-align: middle;
    }

.subheading {
  color: #c0c0c0;
  font-size: 1.1rem;
  margin-top: .3rem;
  margin-bottom: 1.5rem;
  
}

/* Style the nav bar */
nav.mode {
  text-align: center;
  margin: 20px 0;
  font-family: 'Press Start 2P', cursive;  /* Change font */
  font-size: 1.2rem; /* Adjust font size */
}

/* Style all links inside nav */
nav.mode a {
  color: #ffb400;       /* Text color */
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Hover effect */
nav.mode a:hover {
  color: #00c853;   /* Green when hovered */
}

/* Active link (if you want highlight one page) */
nav.mode a.active {
  border-bottom: 2px solid #af59ff;
}
nav.mode a {
  color: #af59ff;          /* default purple */
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
}

nav.mode a.active {
  color: #fff;             /* white when active */
  border-bottom: 2px solid #fff; /* optional underline highlight */
}


.word-display {
  font-size: 1.5rem;
  color: #888;
  line-height: 1.5rem;
  margin: 20px 0;
  word-wrap: break-word;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.word-display span.word {
  display: inline-flex;
}

.word-display span.char {
  opacity: 1;
}

.word-display .current .char {
  border-bottom: 0.5px solid #af59ff;
}
.word-display .current {
  color: #e4d7d7;
  opacity: 1;
  border-bottom: 0.5px solid #af59ff;
}

.word-display .correct {
  color: #00c853;
  opacity: 1;
}

.word-display .wrong {
  color: #ff7f7f;
  opacity: 1;
}

.correct-char {
  color: #7fff7f;
  opacity: 1;
}

.wrong-char {
  color: #ff7f7f;
  opacity: 1;
}

/* Make input hidden but functional */
#typingInput {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  color: #af59ff;
  font-family: 'Tomorrow', sans-serif;
  font-size: 1.3rem;  
}

.stats span {
  font-weight: bold;
  color: #af59ff;
}

/* Style for reset button to match time selector */
.reset-button {
  background: none;
  border: none;
  color: #af59ff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  display: flex;
  align-items: center;
}

.time-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.time-options button {
  background: none;
  border: none;
  color: #af59ff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
}

.time-options button.active {
  border-bottom: 2px solid #af59ff;
}

/* Modal Animation */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-in-out;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #222;
  padding: 2rem;
  border-radius: 10px;
  font-family: 'Tomorrow', sans-serif;
  text-align: center;
  font-size: 1.2rem;
  color: #00c853;
  animation: popUp 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popUp {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* pop up button style */
.button-9 {
  background-color: #773eac;
  border: 1px solid transparent;
  border-radius: .75rem;
  box-sizing: border-box;
  color: #FFFFFF;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: "Inter var",ui-sans-serif,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1rem;
  padding: .75rem 1.2rem;
  text-align: center;
  text-decoration: none #6B7280 solid;
  text-decoration-thickness: auto;
  transition-duration: .2s;
  transition-property: background-color,border-color,color,fill,stroke;
  transition-timing-function: cubic-bezier(.4, 0, 0.2, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: 15rem;
}

.button-9:hover {
  background-color: #374151;
}

.button-9:focus {
  box-shadow: none;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

@media (min-width: 1000px) {
  .button-9 {
    padding: .75rem 1.5rem;
  }
}