:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --danger: #f72585;
  --warning: #f8961e;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --border-radius: 12px;
  --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.container {
  width: 100%;
  min-width: 1240px;
  max-width: 1540px;
  margin: 25px auto;
  line-height: 1.6;
  color: var(--dark);
  box-sizing: border-box;
}

.container * {
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

header p {
  font-size: 1.1rem;
  margin: 0 auto;
  color: var(--gray);
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.calculator-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: var(--transition);
}

.calculator-container:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.calculator-title , .result-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.tip-box{
  margin-top: 20px;
}

.tip-box h3{
  font-size: 1.2rem;
}

.tip-box p{
  margin-top: 10px;
  opacity: 0.75;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-container input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  transition: var(--transition);
}

.input-container input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.input-icon {
  position: absolute;
  left: 15px;
  font-size: 1.4rem;
  color: var(--primary);
}

.btn-calculate {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 15px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-calculate:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.result-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: var(--transition);
}

.result-container:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.bmi-value {
  text-align: center;
  margin: 20px 0;
}

.bmi-value h3 {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.bmi-number {
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin: 15px 0;
}

.bmi-category {
  font-size: 1.8rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 50px;
  display: inline-block;
  margin: 10px 0 20px;
}

.underweight {
  background: #a3bffa;
  color: #2b6cb0;
}

.normal {
  background: #c6f6d5;
  color: #276749;
}

.overweight {
  background: #fed7d7;
  color: #c53030;
}

.obese {
  background: #feb2b2;
  color: #9b2c2c;
}

.bmi-info {
  background: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 15px;
  margin: 15px 0;
  border: 1px solid #eee;
}

.bmi-info h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bmi-info ul {
  padding-left: 25px;
}

.bmi-info li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.bmi-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.bmi-table th {
  background: var(--gray);
  color: white;
  padding: 16px;
  text-align: left;
  font-weight: 600;
}

.bmi-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.bmi-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.bmi-table tr:hover {
  background-color: #edf2f7;
}

.underweight-row {
  background-color: rgba(163, 191, 250, 0.2) !important;
}

.normal-row {
  background-color: rgba(198, 246, 213, 0.2) !important;
}

.overweight-row {
  background-color: rgba(254, 215, 215, 0.2) !important;
}

.obese-row {
  background-color: rgba(254, 178, 178, 0.2) !important;
}

footer {
  text-align: center;
  color: var(--gray);
  font-size: 0.95rem;
}

footer p{
  margin-top: 10px;
}

.progress-container {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  margin: 25px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.ideal-weight {
  background: #f0f9ff;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-top: 25px;
  border-left: 4px solid var(--success);
}

.ideal-weight h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--dark);
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  header h1 {
    font-size: 2.2rem;
  }
}
