body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #222;
}

.header {
  background: linear-gradient(90deg, #4f8cff 0%, #6ee7b7 100%);
  color: #fff;
  padding: 1.2rem 1rem 0.7rem 1rem; /* Less height */
  text-align: center;
  border-radius: 0 0 1.2rem 1.2rem;
  box-shadow: 0 2px 12px rgba(44,108,223,0.13);
  position: relative;
}

.subtitle {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  color: #e0e7ff;
}

.main-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 700px;
  margin: 2rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(44,108,223,0.08);
}

@media (min-width: 768px) {
  .main-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem;
  }
  .output-section, .input-section {
    width: 48%;
  }
}

.output-section, .input-section {
  margin-bottom: 1rem;
}

.input-section h2, .output-section h2 {
  margin-top: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: 500;
  margin-bottom: 0.2rem;
}

input[type="number"], select {
  padding: 0.7rem;
  border: 1px solid #b3c6e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: #f7fafc;
  transition: border 0.2s;
}

input[type="number"]:focus, select:focus {
  border-color: #2d6cdf;
  outline: none;
}

.calculate-btn {
  background: #2d6cdf;
  color: #fff;
  border: none;
  padding: 0.9rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.calculate-btn:hover {
  background: #1b4fa0;
}

.chart-section {
  max-width: 700px;
  margin: 2rem auto;
  background: #f0f2f6;
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(44,108,223,0.08);
  padding: 1.5rem;
}

#budgetChart {
  width: 100% !important;
  height: 150px !important;
  max-height: 150px !important;
  display: block;
  margin: 0 auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(44,108,223,0.07);
}

/* Chart.js pie colors: more interactive and vibrant */
:root {
  --pie1: #4f8cff;
  --pie2: #6ee7b7;
  --pie3: #fbbf24;
  --pie4: #f472b6;
  --pie5: #818cf8;
  --pie6: #34d399;
  --pie7: #f87171;
  --pie8: #38bdf8;
  --pie9: #facc15;
  --pie10: #a78bfa;
  --pie11: #f472b6;
  --pie12: #64748b;
}

/* Optional: Add a hover effect for the chart container */
.chart-section:hover {
  box-shadow: 0 8px 32px rgba(44,108,223,0.18);
  transition: box-shadow 0.2s;
}

@media (max-width: 600px) {
  .main-container, .chart-section {
    padding: 0.5rem;
    border-radius: 0.8rem;
  }
  .header {
    padding: 1.2rem 0.5rem 0.7rem 0.5rem;
    border-radius: 0 0 1rem 1rem;
  }
  .output-section, .input-section {
    width: 100%;
  }
}
