/* styling created with the help of chatgpt */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* main body */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #ffb347, #ffcc33, #ff6f61);
  background-size: 400% 400%;
  animation: bgShift 10s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 30px;
  color: #3a2e1f;
}

@keyframes bgShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* header */
header {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #ff7b00, #ffb300);
  padding: 10px 20px;
  border-radius: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* title */
h1 {
  font-size: 2rem;
  color: #8b0000;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* select + inputs */
select,
input {
  margin: 10px;
  padding: 10px 15px;
  border-radius: 12px;
  border: 2px solid #ff9e1b;
  font-size: 1rem;
  background: #fffaf2;
  color: #5a2a00;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

select:hover,
input:hover,
select:focus,
input:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: #ff6b35;
}

/* make number inputs larger and easier to read */
input[type="number"] {
  width: 220px;           /* gives enough room for placeholder text */
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid #ff6b35;
  border-radius: 8px;
  margin: 10px;
  outline: none;
  text-align: center;
  background-color: #fff8f0;
  transition: all 0.3s ease;
}

input[type="number"]:focus {
  border-color: #ffb347;
  box-shadow: 0 0 10px rgba(255, 179, 71, 0.5);
}

/* button */
button {
  background: linear-gradient(90deg, #ff5f6d, #ffc371);
  border: none;
  border-radius: 20px;
  color: #fff;
  padding: 12px 25px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:hover {
  transform: translateY(-3px) scale(1.05);
  background: linear-gradient(90deg, #ff784e, #ffd54f);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* output sections */
h2,
p,
h4 {
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 20px;
  border-radius: 15px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 600px;
}

h2 {
  color: #b22222;
  font-weight: 600;
}

p {
  color: #5a2a00;
  font-size: 1rem;
}

h4 {
  color: #ff6b35;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* festive animation: floating confetti dots */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 10% 20%,
      rgba(255, 255, 255, 0.25) 2px,
      transparent 2px
    ),
    radial-gradient(
      circle at 80% 40%,
      rgba(255, 255, 255, 0.25) 2px,
      transparent 2px
    ),
    radial-gradient(
      circle at 30% 80%,
      rgba(255, 255, 255, 0.25) 3px,
      transparent 3px
    );
  background-size: 300px 300px;
  animation: confetti 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes confetti {
  0% {
    background-position: 0 0, 50px 50px, 100px 100px;
  }
  100% {
    background-position: 0 300px, 50px 350px, 100px 400px;
  }
}

/* layer fix for content */
header,
h1,
select,
input,
button,
h2,
p,
h4 {
  position: relative;
  z-index: 1;
}

/* making sure it's responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 1.6rem;
  }
  button {
    font-size: 1rem;
    padding: 10px 20px;
  }
  select,
  input {
    width: 80%;
  }
}
