@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #0b1e38;
  color: #e6eaff;
  font-family: 'Roboto Mono', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #0a1a33; 
  padding: 10px 20px;
  display: flex;
  justify-content: flex-start;  
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
}


.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}


.keyboard-logo {
  width: 40px;
  height: 30px;
  background-color: white;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.key-row {
  display: flex;
  justify-content: space-between;
}

.key {
  width: 8px;
  height: 6px;
  background-color: #0a1a33;
  border-radius: 2px;
}

.spacebar {
  width: 80%;
  height: 5px;
  background-color: #0a1a33;
  border-radius: 2px;
  align-self: center;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  color: white;
  margin: 10px;
}


main {
  padding-top: 80px;
}

.container {
  background: #13294b;
  padding: 30px;
  border-radius: 14px;
  max-width: 850px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.settings {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.settings label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-right: 5px;
}

.settings select {
  background: #1b3a63;
  color: #fff;
  border: 1px solid #355c8c;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.test-header {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.metric p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.metric span {
  display: block;
  font-size: 1.8rem;
  margin-top: 5px;
  color: #5edfff;
}

#time {
  color: #ffb6b9;
}

.progress-bar {
  background: #1b3a63;
  height: 6px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 20px;
}

#progress {
  background: #5edfff;
  height: 100%;
  width: 100%;
  transition: width 1s linear;
}

.typing-area {
  background: #1b3a63;
  padding: 20px;
  border-radius: 10px;
  font-size: 1.2rem;
  line-height: 1.8rem;
  min-height: 100px;
  word-wrap: break-word;
  cursor: text;
}

.char {
  opacity: 0.7;
}

.correct {
  color: #5edfff;
  opacity: 1;
}

.incorrect {
  color: #ff5c5c;
  opacity: 1;
  text-decoration: underline;
}

#hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#reset-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  background: none;
  border: 1px solid #355c8c;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
}

#reset-btn:hover {
  background: #0f2342;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: #00aaff;
  vertical-align: bottom;
  animation: blink 1s step-end infinite;
  margin-right: -1px;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}
