/* ========= AGE CALCULATOR – MOBILE OPTIMIZED ========= */
#age-app {
  --primary: #2563EB;
  --primary-dark: #1E3A8A;
  --accent: #10B981;
  --bg: #F9FAFB;
  --text: #111827;
  --border: #E5E7EB;
  --white: #ffffff;
  --soft: #F3F4F6;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 500px;
  margin: 20px auto;
  padding: 0 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 18px;
}

.title {
  text-align: center;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

/* ===== Input Section ===== */
.row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.label {
  font-weight: 600;
  font-size: 1rem;
}

/* ✅ Slim, clean, centered date input */
.input {
  width: 70%;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Fix for iOS/Android date picker icon alignment */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  margin-left: 4px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ===== Buttons ===== */
.btn,
.btn-outline {
  width: 70%;
  max-width: 240px;
  text-align: center;
  border-radius: 10px;
  padding: 10px 0;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}
.btn:hover {
  background: var(--primary-dark);
}
.btn:active {
  transform: translateY(1px);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover {
  background: var(--soft);
}

/* Center buttons side by side on mobile (clean layout) */
.btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* ===== Results ===== */
.result-header {
  margin-top: 16px;
  text-align: center;
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
}

.result-body {
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.age-line {
  font-weight: 700;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.or {
  color: var(--accent);
  font-weight: 800;
  margin-right: 4px;
}

.note {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  color: #6b7280;
}

/* ===== Responsive (just to tighten layout on larger screens) ===== */
@media (min-width: 600px) {
  .row {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }
  .label {
    min-width: 120px;
    text-align: right;
  }
  .input {
    width: 180px;
  }
  .btn-group {
    justify-content: flex-start;
  }
}
