* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

header  p{
  font-size: 1rem;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
}

.calculator-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 20px;
  height: fit-content;
  margin-bottom: 25px;
}

.input-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 30px;
}

.input-row {
  display: flex;
  flex-direction: column;
}

.input-row label {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #2c3e50;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

input:invalid {
  border-color: #ff6b6b;
  background-color: #fff0f0;
}

.error-message {
  color: #ff6b6b;
  font-size: 0.8em;
  margin-top: 5px;
  display: none;
}

.gender-selector {
  display: flex;
  gap: 20px;
}

.gender-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4.75px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid #e0e6ed;
  font-size: 1.05rem;
  flex: 1;
  justify-content: center;
}

.gender-option:hover {
  background: #edf2f7;
  transform: translateY(-2px);
}

.gender-option.selected {
  background: #e3f2fd;
  border-color: #2196f3;
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.15);
}

.gender-emoji {
  font-size: 1.8rem;
}

input[type="number"] {
  padding: 15px 20px;
  font-size: 1.1rem;
  border: 2px solid #e0e6ed;
  border-radius: 12px;
  transition: all 0.3s ease;
  outline: none;
  background: #f8f9fa;
}

input[type="number"]:focus {
  border-color: #2196f3;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
}

.button-group {
  display: flex;
  gap: 25px;
}

.calc-btn {
  padding: 16px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary {
  background: linear-gradient(135deg, #2196f3 0%, #0d8aee 100%);
  color: white;
}

.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(33, 150, 243, 0.4);
}

.secondary {
  background: linear-gradient(135deg, #e0e6ed 0%, #d1d9e3 100%);
  color: #2c3e50;
}

.secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.result-section {
  background: #e3f2fd;
  border-radius: 16px;
  padding: 20px;
  margin-top: 25px;
  display: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.result-header {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.result-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.result-box {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.result-value {
  font-size: 3.8rem;
  font-weight: 800;
  color: #2196f3;
  text-align: center;
  margin: 15px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-category {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-top: 10px;
  padding: 12px 0;
  border-radius: 12px;
}

.category-underweight {
  color: #3498db;
  background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
}

.category-normal {
  color: #2ecc71;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.category-overweight {
  color: #f39c12;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.category-obese {
  color: #e74c3c;
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.tables-section {
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 20px;
  grid-column: 1 / -1;
  margin-bottom: 25px;
}

.section-title {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reference-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.table-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.table-title {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e6ed;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #e3f2fd;
  padding: 16px;
  text-align: center;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #bbdefb;
}

td {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid #e0e6ed;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background-color: #f5f9ff;
}

.highlight {
  background: #e3f2fd !important;
  font-weight: 700;
  position: relative;
}

.highlight::after {
  content: "⏺";
  position: absolute;
  left: 10px;
  color: #2196f3;
}

footer {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 20px;
  grid-column: 1 / -1;
}

.footer-title {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-content {
  line-height: 1.8;
  color: #555;
  margin-top: 20px;
}

.info-content p {
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #2196f3;
  margin-top: 15px;
}

.notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 18px 40px;
  border-radius: 10px;
  font-size: 1.1rem;
  z-index: 1000;
  display: none;
  animation: fadeIn 0.4s ease-in-out;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.signature {
  text-align: center;
  margin-top: 20px;
  color: #6c757d;
  font-size: 1rem;
}

.health-status {
  display: flex;
  justify-content: space-around;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #e9ecef;
}

.status-item {
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  width: 23%;
}

.status-item h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.status-underweight {
  background: #e1f5fe;
  color: #0288d1;
}

.status-normal {
  background: #e8f5e9;
  color: #388e3c;
}

.status-overweight {
  background: #fff8e1;
  color: #f57f17;
}

.status-obese {
  background: #ffebee;
  color: #d32f2f;
}
