* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f7f9;
  color: #333;
  line-height: 1.6;
}

.calculator-container {
  max-width: 800px; /* Increased width to accommodate two columns */
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  color: #2c3e50;
}

h2 {
  font-size: 1.5rem;
  color: #2980b9;
  margin-bottom: 1rem;
}

p {
  font-size: 1rem;
  color: #7f8c8d;
}

.calculator-form {
  display: grid;
  gap: 1.5rem;
}

.input-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #34495e;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
  outline: none;
}

.button-group {
  display: flex;
  gap: 1rem;
}

.calculate-btn,
.clear-btn,
.share-btn,
.download-btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.calculate-btn {
  background-color: #2ecc71;
}

.calculate-btn:hover {
  background-color: #27ae60;
  transform: translateY(-2px);
}

.clear-btn {
  background-color: #e74c3c;
}

.clear-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.share-btn {
  background-color: #3498db;
}

.share-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.download-btn {
  background-color: #9b59b6;
}

.download-btn:hover {
  background-color: #8e44ad;
  transform: translateY(-2px);
}

.result,
.ai-tips {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #ecf0f1;
  border-radius: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  gap: 1rem;
  align-items: start;
}

.result-numbers p,
.ai-tips p {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.result-numbers span {
  font-weight: bold;
  color: #2c3e50;
}

.chart-container {
  max-width: 100%;
  height: 300px;
}

.result-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.error-message {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 600px) {
  .calculator-container {
    margin: 1rem;
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .button-group,
  .result-actions {
    flex-direction: column;
  }

  .result-grid {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
  }

  .chart-container {
    height: 250px;
  }
}