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

body, input, button, textarea, select, h1, .word-box, .result-item, #wpmDisplay, .correct-overlay {
  font-family: 'Poppins', "Inter", Arial, sans-serif;
}

body {
  margin: 0;
  background-color: #0f0f0f;
  color: #f1f1f1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  width: 480px;
  text-align: center;
  background: linear-gradient(145deg, #151515, #1b1b1b);
  padding: 40px;
  border-radius: 0;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.container:hover {
  transform: translateY(-3px);
}

h1 {
  font-size: 2rem;
  margin-bottom: 25px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e0e0e0;
}

.word-box {
  height: 100px;
  background-color: #1e293b;
  border-radius: 0;
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.9rem;
  font-weight: 600;
  color: #ffffff;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease;
}

.word-box:hover {
  background-color: #253447;
}

.input-section {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
}

input[type="text"] {
  flex: 1;
  padding: 0 14px;
  border-radius: 0;
  border: none;
  font-size: 1.05rem;
  height: 45px;
  background-color: #1e293b;
  color: #f5f5f5;
  outline: none;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus {
  box-shadow: 0 0 0 2px #1f6feb;
  background-color: #22354c;
}

button {
  background-color: #1f6feb;
  color: #fff;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 0;
  cursor: pointer;
  padding: 0 25px;
  height: 45px;
  line-height: 45px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: #195bc8;
  transform: translateY(-1px);
}

button:active {
  transform: scale(0.97);
}

.result-item {
  background-color: #1e293b;
  margin: 6px 0;
  padding: 10px 14px;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.result-item:hover {
  background-color: #273b52;
}

.correct-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
  color: #1f6feb;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease forwards;
}

.input-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, #2f3c4d, transparent);
  margin: 10px 0;
  border-radius: 0;
}

/* updated buttons to match githubBtn alignment */
#howToPlayBtn,
#privacyBtn {
  position: absolute;
  top: 20px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  background-color: #1f6feb;
  color: white;
  border: none;
  border-radius: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#howToPlayBtn { left: 20px; }
#privacyBtn { left: 140px; }

#howToPlayBtn:hover,
#privacyBtn:hover {
  background-color: #195bc8;
  transform: translateY(-1px);
}

#howToPlayBtn:active,
#privacyBtn:active {
  transform: scale(0.97);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

#wpmDisplay {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #1f6feb;
  font-size: 18px;
  font-weight: 600;
  z-index: 1000;
}

/* Align the submit button SVG slightly lower */
#submitBtn svg {
  transform: translateY(2px);
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

/* fix spinning svg size + centering */
.word-box svg {
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#githubBtn {
  position: absolute;
  top: 20px;
  left: 280px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  background-color: #1f6feb;
  color: white;
  border: none;
  border-radius: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#githubBtn:hover {
  background-color: #195bc8;
  transform: translateY(-1px);
}

#githubBtn:active {
  transform: scale(0.97);
}

#githubBtn svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
  vertical-align: middle;
}

.announcement {
  position: absolute;
  top: 40px; /* pushes it just under the WPM display */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
  font-size: 13px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  z-index: 999;
  pointer-events: none;
}

#howToPlayPopup {
  position: absolute;
  background: #195bc8;
  color: white;
  padding: 15px;
  border-radius: 0;
  box-shadow: 0 0 15px rgba(25, 91, 200, 0.6);
  font-family: 'Poppins', sans-serif;
  width: 260px;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 10;
}

#howToPlayPopup.show {
  opacity: 1;
  transform: translateY(0);
}
