
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 30px;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  color: #1a1a1a;
  line-height: 1.6;
}

h1 {
  text-align: center;
  color: #2c3e50;
  font-size: 2.5em;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-container, .charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto 40px;
}

.data-box, .status-box, .chart-box, .gauge-box {
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: slideIn 0.5s forwards;
}

.data-box:hover, .status-box:hover, .chart-box:hover, .gauge-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.data-box h2, .status-box h2, .chart-box h2, .gauge-box h2 {
  color: #34495e;
  font-size: 1.6em;
  margin-bottom: 20px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

.data-box p, .status-box p {
  margin: 15px 0;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-box p span, .status-box p span {
  font-weight: 600;
  color: #2980b9;
  background: #e6f3ff;
  padding: 6px 12px;
  border-radius: 6px;
}

.chart-box canvas {
  max-width: 100%;
  height: auto;
}

.gauge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#monthsAfterBirthGauge {
  width: 220px;
  height: 220px;
}

.status-box #suggestions {
  margin-top: 25px;
  padding: 20px;
  background: #fdfafa;
  border-radius: 10px;
  border-left: 5px solid #e74c3c;
}

.status-box #suggestions h3 {
  color: #c0392b;
  font-size: 1.3em;
  margin-bottom: 15px;
}

.status-box #suggestions ul {
  list-style-type: disc;
  padding-left: 25px;
  margin: 0;
}

.status-box #suggestions li {
  margin: 10px 0;
  font-size: 1.1em;
  color: #2c3e50;
}

#logArea {
  margin: 40px auto;
  padding: 20px;
  background: #2c3e50;
  color: #ecf0f1;
  border-radius: 16px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  max-width: 1400px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Status Indicators */
.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 12px;
  transition: background 0.3s ease;
}

.status-normal { background: #27ae60; }
.status-warning { background: #f1c40f; }
.status-critical { background: #c0392b; }

/* Controls (if enabled) */
.controls {
  margin: 40px auto;
  text-align: center;
  max-width: 600px;
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.controls h2 {
  color: #34495e;
  font-size: 1.6em;
  margin-bottom: 20px;
}

.controls input {
  padding: 14px;
  width: 280px;
  border: 1px solid #bdc3c7;
  border-radius: 10px;
  font-size: 1.1em;
  margin-right: 15px;
  transition: border-color 0.3s ease;
}

.controls input:focus {
  border-color: #3498db;
  outline: none;
}

.controls button {
  padding: 14px 35px;
  background: #3498db;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.controls button:hover {
  background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .top-container, .charts-container {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .controls input {
    width: 100%;
    margin-bottom: 15px;
  }

  .controls button {
    width: 100%;
  }

  .data-box p {
    flex-direction: column;
    align-items: flex-start;
  }

  .data-box p span {
    margin-top: 5px;
  }
}

/* Animations */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.data-box p.updated, .status-box p.updated {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
