/* === Global Reset === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: 'Segoe UI', sans-serif;
  background: #121212;
  color: #f0f0f0;
  min-height: 100vh;
}

/* === Login/Signup Form === */
.container {
  background: #1e1e1e;
  padding: 30px;
  border-radius: 8px;
  width: 320px;
  margin: 100px auto;
  text-align: center;
  box-shadow: 0 0 12px rgba(255,255,255,0.1);
}
.container h2 { color: #ffd700; margin-bottom: 20px; }
input[type="text"], input[type="password"] {
  width: 90%;
  margin: 10px auto;
  padding: 10px;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
}
button {
  padding: 12px 24px;
  margin: 10px 0;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background: #444; }
.error { color: red; margin-top: 10px; }

/* === Quest Board Menu Styles === */
.menu-title {
  text-align: center;
  font-size: 2.5rem;
  margin-top: 40px;
  color: #f9eecb;
}
.menu-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin: 40px auto;
}
.menu-box {
  width: 260px;
  height: 180px;
  background: #1e1e1e;
  color: #ffd700;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(255,215,0,0.2);
  transition: transform 0.3s, background 0.3s;
}
.menu-box:hover { background: #292929; transform: scale(1.05); }

/* === Profile Icon & Popup === */
.profile-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 100;
}
.profile-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
  transition: transform 0.2s ease;
}
.profile-icon img:hover { transform: scale(1.1); }
.profile-popup {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #1f1f1f;
  padding: 20px;
  width: 250px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255,255,255,0.1);
  display: none;
  z-index: 101;
}
.profile-popup h3 { color: #f9eecb; margin-bottom: 10px; }
.profile-popup p { margin: 6px 0; font-size: 0.95rem; }
.profile-popup input[type="file"] { margin-top: 10px; font-size: 0.9rem; color: #ccc; }
.profile-popup button {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  background: #333;
  color: #f0f0f0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.profile-popup button:hover { background: #444; }

/* === Lesson & Typing Styles === */
.lesson-container {
  width: 90%;
  max-width: 1000px;
  margin: 60px auto;
  text-align: center;
  padding: 10px 20px;
  overflow-y: auto; /* Make it scrollable */
  max-height: 500px; /* Set a max height */
}
#userInput { position: absolute; opacity: 0; pointer-events: none; }
#targetDisplay {
  font-family: monospace;
  font-size: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  padding: 20px;
  background: #222;
  border-radius: 8px;
  margin-bottom: 30px;
  line-height: 2.5rem;
  word-break: keep-all;
  white-space: normal;
}
.word { display: inline-flex; }
.char {
  border-bottom: 2px solid #555;
  padding: 0 6px;
  min-width: 20px;
  text-align: center;
  color: gray;
  background: #1e1e1e;
  transition: all 0.2s ease;
}
.char.space { background: #181818; border-bottom: 2px dashed #777; }
.char.correct { color: #0f0; border-bottom-color: #0f0; background: #132b13; }
.char.incorrect { color: #f55; border-bottom-color: #f55; background: #2b1212; }

/* === XP Bar === */
#xpContainer {
  width: 100%;
  height: 25px;
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 20px;
}
#xpBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #0f0, #0b0);
  transition: width 0.3s ease;
}
#xpText {
  font-weight: bold;
  margin-top: 10px;
  color: #ccc;
}

/* === Level-up Animation === */
@keyframes levelUpPulse {
  0% { transform: scale(1); color: #fff; }
  50% { transform: scale(1.3); color: #0f0; }
  100% { transform: scale(1); color: #fff; }
}
.level-up { animation: levelUpPulse 1s ease-in-out; }

/* === VIZON Home Link === */
.vizon-home-link {
  position: fixed;
  top: 20px;
  left: 30px;
  text-decoration: none;
  font-size: 1.2em;
  color: #61dafb;
  font-weight: bold;
  background-color: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s;
  z-index: 1000;
}
.vizon-home-link:hover {
  background-color: #1b263b;
}
