/* Base styles */
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f8f9fa;
  padding: 20px;
  margin: 0;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8em;
  color: #2c3e50;
}

/* Section box */
.section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 20px;
  margin-bottom: 25px;
}

.section h2 {
  margin-top: 0;
  font-size: 1.2em;
  color: #34495e;
}

/* Entry rows */
.row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

input[type="text"],
input[type="number"] {
  flex: 1 1 45%;
  min-width: 130px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1em;
}

/* Buttons */
button {
  padding: 12px 18px;
  margin-top: 10px;
  background: #3498db;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s ease;
}

button:hover {
  background: #2980b9;
}

/* Summary display */
.summary {
  background: #ecf0f1;
  padding: 20px;
  border-radius: 10px;
  font-size: 1em;
  text-align: center;
}

.summary p {
  margin: 10px 0;
}

.balanced {
  color: green;
  font-weight: bold;
}

.unbalanced {
  color: red;
  font-weight: bold;
}

/* Responsive: Mobile tweaks */
@media (max-width: 600px) {
  .row {
    flex-direction: column;
  }

  input[type="text"],
  input[type="number"] {
    width: 100%;
  }

  button {
    width: 100%;
    margin-top: 8px;
  }

  .section h2 {
    font-size: 1em;
  }

  h1 {
    font-size: 1.5em;
  }
}
