* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
}

.content {
  padding: 40px 20px;
}

.form-section {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.form-section h2 {
  margin-bottom: 20px;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.input-with-unit {
  display: flex;
  gap: 10px;
}

.input-with-unit input {
  flex: 1;
}

.input-with-unit select {
  width: 100px;
}

.btn-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

.chart-section {
  margin-bottom: 40px;
}

.chart-section h2 {
  margin-bottom: 20px;
  color: #333;
}

#bmiChart {
  max-width: 100%;
  height: auto;
}

.data-section {
  margin-bottom: 40px;
}

.data-section h2 {
  margin-bottom: 20px;
  color: #333;
}

.data-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.data-card {
  background: #f8f9fa;
  border-left: 4px solid #667eea;
  padding: 20px;
  border-radius: 6px;
  position: relative;
}

.data-card h3 {
  color: #333;
  margin-bottom: 10px;
}

.data-card p {
  margin: 8px 0;
  color: #666;
}

.data-card .bmi-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #667eea;
  margin: 10px 0;
}

.data-card .category {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
}

.category {
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  color: white;
}

.category.underweight {
  background: #3498db;
}

.category.normal {
  background: #2ecc71;
}

.category.overweight {
  background: #f39c12;
}

.category.obese {
  background: #e74c3c;
}

.btn-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background 0.3s;
}

.btn-delete:hover {
  background: #c0392b;
}

.info-section {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
}

.info-section h3 {
  margin-bottom: 20px;
  color: #333;
}

.info-section ul {
  list-style: none;
}

.info-section li {
  margin: 10px 0;
  padding: 10px;
  background: white;
  border-radius: 4px;
  color: #555;
}

.info-section .category {
  display: inline-block;
  margin-right: 10px;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  header {
    padding: 20px 15px;
  }

  header h1 {
    font-size: 1.5em;
    margin-bottom: 5px;
  }

  header p {
    font-size: 0.9em;
  }

  .content {
    padding: 15px;
  }

  .form-section {
    padding: 15px;
    margin-bottom: 25px;
  }

  .form-section h2 {
    font-size: 1.2em;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .input-with-unit {
    flex-direction: column;
    gap: 8px;
  }

  .input-with-unit select {
    width: 100%;
  }

  .btn-submit {
    width: 100%;
  }

  .chart-section {
    margin-bottom: 25px;
  }

  .chart-section h2 {
    font-size: 1.2em;
  }

  #bmiChart {
    width: 100% !important;
  }

  .data-list {
    grid-template-columns: 1fr;
  }

  .data-card {
    padding: 15px;
  }

  .data-card h3 {
    font-size: 1.1em;
  }

  .data-card p {
    font-size: 0.9em;
  }

  .data-card .bmi-value {
    font-size: 1.3em;
  }

  .info-section {
    padding: 15px;
  }

  .info-section li {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px;
  }

  header {
    padding: 15px 10px;
  }

  header h1 {
    font-size: 1.3em;
  }

  header p {
    font-size: 0.8em;
  }

  .content {
    padding: 10px;
  }

  .form-section {
    padding: 12px;
    margin-bottom: 20px;
  }

  .form-section h2 {
    font-size: 1.1em;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-group label {
    font-size: 0.9em;
  }

  .form-group input,
  .form-group select {
    padding: 8px;
    font-size: 16px;
  }

  .btn-submit {
    padding: 12px 15px;
    font-size: 0.95em;
  }

  .data-card {
    padding: 12px;
  }

  .data-card h3 {
    font-size: 1em;
  }

  .data-card .bmi-value {
    font-size: 1.2em;
  }

  .category {
    padding: 3px 6px;
    font-size: 0.8em;
  }

  .btn-delete {
    padding: 4px 8px;
    font-size: 0.75em;
  }
}