:root {
  --bg: radial-gradient(1200px 600px at 10% 10%, #ffe6f0 0%, #ffffff 40%, #fefefe 100%);
  --calc-ar: 5 / 7;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
}

html body {
  padding-top: 0;
}

.calc-wrap {
  aspect-ratio: var(--calc-ar);
  width: min(100vw, calc(100vh * var(--calc-ar)));
  height: auto;
}

.card, .card-body {
  height: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.form-container {
  flex: 1;
}

.age-display {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.5rem;
  color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.age-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.age-number {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  font-family: 'Courier New', monospace;
}

.age-unit {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 5px;
}

.age-secondary {
  font-size: 1.1rem;
  margin-top: 15px;
  opacity: 0.95;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.info-card {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 0.375rem;
  text-align: center;
  border: 2px solid #e9ecef;
}

.info-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d6efd;
  font-family: 'Courier New', monospace;
}

.info-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 5px;
}

.birthday-box, .facts-box {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 0.375rem;
  border-left: 4px solid #0d6efd;
}

.birthday-box h6, .facts-box h6 {
  color: #495057;
  font-weight: 600;
}

.fact-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #dee2e6;
}

.fact-item:last-child {
  border-bottom: none;
}

.fact-label {
  color: #6c757d;
}

.fact-value {
  font-weight: 600;
  color: #212529;
}

@media (max-width: 575.98px) {
  .calc-wrap {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
  }

  .age-number {
    font-size: 3rem;
  }

  .age-unit {
    font-size: 1.2rem;
  }

  .age-secondary {
    font-size: 1rem;
  }

  .info-value {
    font-size: 1.2rem;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  :root { 
    --calc-ar: 6 / 8; 
  }
}

@media (min-width: 992px) {
  :root { 
    --calc-ar: 5 / 7; 
  }
}
