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

body {
  font-family: Inter, system-ui, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ── Nav ── */
.nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.nav a {
  font-size: 13px;
  font-weight: 600;
  color: #6366f1;
  text-decoration: none;
  padding: 6px 16px;
  border: 1.5px solid #c7d2fe;
  border-radius: 20px;
  transition: background .2s;
}
.nav a:hover { background: #ede9fe; }
.nav a.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
}

/* ── Header ── */
.badge {
  display: inline-block;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: .6px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 6px;
}

.trust {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 32px;
}

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 8px 24px rgba(99,102,241,.07);
  margin-bottom: 20px;
}

/* ── Form ── */
.field { margin-bottom: 20px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

input[type="date"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color .2s;
  outline: none;
  cursor: pointer;
}
input[type="date"]:focus { border-color: #6366f1; background: #fff; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) { .two-col { grid-template-columns: 1fr; } }

/* ── Button ── */
.btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow .2s, transform .1s;
  letter-spacing: .2px;
}
.btn:hover { box-shadow: 0 6px 20px rgba(99,102,241,.45); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }

.hint {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 10px;
}

/* ── Result (fade-in) ── */
.result {
  display: none;
}
.result.show {
  display: block;
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Age Calculator result ── */
.result-main {
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #ede9fe;
  line-height: 1.3;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: #f5f3ff;
  border-radius: 10px;
  padding: 14px 16px;
  border-left: 3px solid #8b5cf6;
}
.stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4f46e5;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-lbl {
  font-size: 12px;
  color: #64748b;
}

.extra {
  font-size: 14px;
  color: #475569;
  line-height: 2;
}
.extra strong { color: #4f46e5; font-weight: 700; }

/* ── Age Difference result ── */
.diff-main {
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #ede9fe;
}

.diff-notes {
  font-size: 14px;
  color: #475569;
  line-height: 2;
  margin-bottom: 16px;
}
.diff-notes strong { color: #4f46e5; font-weight: 700; }

.verdict {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 16px;
}

/* ── Share button ── */
.btn-share {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #6366f1;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #6366f1;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-share:hover { background: #6366f1; color: #fff; }

/* ── SEO footer ── */
.seo {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.75;
}
.seo h2 {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
  background: none;
  -webkit-text-fill-color: #374151;
}
