* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #4f86f7, #2853a3);
  margin: 0;
  padding: 0;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  max-width: 450px;
  margin: 40px auto;
  background: #fff;
  padding: 30px 35px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

header {
  text-align: center;
  padding: 40px 20px 0 20px;
  color: #fff;
  user-select: none;
}

header h1 {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 2rem;
}

header p {
  font-weight: 400;
  font-size: 1.1rem;
  opacity: 0.85;
}

.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: #4f86f7;
  box-shadow: 0 0 8px rgba(79, 134, 247, 0.5);
}

button {
  width: 100%;
  padding: 14px;
  font-size: 1.2rem;
  background-color: #4f86f7;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
}

button:hover,
button:focus {
  background-color: #2853a3;
}

#resultado {
  margin-top: 30px;
  font-size: 1.2rem;
  font-weight: 600;
  min-height: 100px;
  border-radius: 10px;
  padding: 18px;
  background-color: #e7f0ff;
  color: #154273;
  user-select: text;
  box-shadow: 0 3px 8px rgba(21, 66, 115, 0.25);
  opacity: 0;
  transition: opacity 0.6s ease;
  position: relative;
}

#resultado.show {
  opacity: 1;
  transition: opacity 0.6s ease;
}

#resultado.erro {
  background-color: #fdecea;
  color: #b00020;
  box-shadow: 0 3px 8px rgba(176, 0, 32, 0.4);
}

footer {
  text-align: center;
  padding: 20px;
  color: #ddd;
  background-color: #1e2a55;
  font-size: 0.9rem;
  user-select: none;
}

@media (max-width: 500px) {
  main {
    margin: 20px;
    padding: 25px 20px;
  }

  header h1 {
    font-size: 1.6rem;
  }
}

#confetti-canvas {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: none;
}
