* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  padding: 20px;
}

.container {
  max-width: 400px;
  background: white;
  padding: 20px;
  margin: 0 auto;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.form-control {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="number"] {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

button {
  width: 100%;
  padding: 10px;
  background: #5cb85c;
  border: none;
  color: white;
  font-size: 18px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #4cae4c;
}

#results {
  margin-top: 20px;
  padding: 15px;
  background: #e9ecef;
  border-radius: 5px;
}

.hidden {
  display: none;
}

.error {
  margin-top: 20px;
  color: white;
  background-color: #d9534f;
  padding: 10px;
  border-radius: 3px;
  text-align: center;
}

.animate-fade-in {
  animation: fadeIn 0.7s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.charts {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  gap: 15px;
  flex-wrap: wrap;
}

canvas {
  background: rgba(81, 70, 70, 0.396);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* Fade-in + slide-up for results */
.animate-fade-in {
  animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button hover scale */
button {
  transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
  background: #2397d5;
  transform: scale(1.05);
}

/* Smooth number transition */
.result-number {
  display: inline-block;
  min-width: 80px;
  font-weight: bold;
  transition: all 0.3s ease;
}
