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

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Poppins", sans-serif; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a98f7, #6c63ff, #8e44ad);
  background-size: 400% 400%;
  animation: gradientMove 8s infinite alternate;
  overflow: hidden;
}

.wrapper {
  padding: 30px 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  width: 90%;
  max-width: 400px;
  animation: fadeIn 1s ease-in-out;
  position: relative;
  z-index: 10;
}

header {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

.wrapper p { color: #f1f1f1; margin: 10px 0; }

.difficulty { margin-bottom: 15px; }
.difficulty select {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}

.input-field {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.input-field input,
.input-field button {
  height: 50px;
  border-radius: 10px;
  font-size: 18px;
}

.input-field input {
  width: 120px;
  text-align: center;
  border: 2px solid #aaa;
  transition: 0.3s;
}
.input-field input:focus { border-color: #4a98f7; }

.input-field button {
  padding: 0 20px;
  border: none;
  background: #4a98f7;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}
.input-field button:hover { background: #357ae8; transform: scale(1.05); }
.input-field button:active { transform: scale(0.95); }

#hintBtn {
  margin-top: 15px;
  padding: 12px 25px;
  background: #f39c12;
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
#hintBtn:hover { background: #e67e22; transform: scale(1.05); }

/* Confetti canvas overlay */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* buttons still clickable */
  z-index: 5;
}

@keyframes gradientMove {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}
.shake { animation: shake 0.5s; }

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

/* Responsive */
@media (max-width: 480px) {
  .wrapper { padding: 20px; }
  header { font-size: 20px; }
  .input-field { flex-direction: column; gap: 10px; }
  .input-field input, .input-field button { width: 100%; }
}