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

:root {
  --primary: #2B6CB0;
  --primary-light: #EBF4FF;
  --accent: #81E6D9;
  --accent-red: #FC8181;
  --text: #1A202C;
  --text-muted: #4A5568;
  --bg: #FFFFFF;
  --bg-alt: #F7FAFC;
  --border: #E2E8F0;
  --radius: 12px;
  --max-width: 1080px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.logo { border-radius: 8px; }

nav { display: flex; gap: 1.5rem; }
nav a { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
nav a:hover { color: var(--primary); text-decoration: none; }

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 60%);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text { flex: 1; }
.hero-visual { flex: 0 0 200px; text-align: center; }

.badge {
  display: inline-block;
  background: var(--accent);
  color: #234E52;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 540px;
}

.hero-buttons { display: flex; gap: .75rem; flex-wrap: wrap; }

.app-icon-large {
  width: 180px;
  border-radius: 36px;
  box-shadow: 0 12px 40px rgba(43,108,176,.2);
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: .75rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #1A4F7A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43,108,176,.3);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-block { width: 100%; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 200px;
  justify-content: center;
}

/* Countdown */
.countdown {
  padding: 3rem 0;
  text-align: center;
  background: var(--bg-alt);
}

.countdown h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: .25rem;
}

/* Features */
.features {
  padding: 4rem 0;
  background: var(--bg-alt);
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  transform: translateY(-2px);
}

.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.feature-card p { font-size: .9rem; color: var(--text-muted); }

/* About */
.about {
  padding: 4rem 0;
}

.about-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.about-text { flex: 1; }
.about-text h2 { font-size: 2rem; margin-bottom: 1rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1.25rem; }
.about-text ul { list-style: none; padding: 0; }
.about-text li { padding: .4rem 0 .4rem 1.5rem; position: relative; color: var(--text-muted); }
.about-text li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.about-screenshot { flex: 0 0 260px; }

.phone-frame {
  width: 240px;
  margin: 0 auto;
  border: 3px solid #CBD5E0;
  border-radius: 36px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}

.phone-screen {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--border);
}

/* Download */
.download {
  padding: 4rem 0;
  text-align: center;
  background: var(--bg-alt);
}

.download h2 { font-size: 2rem; margin-bottom: .75rem; }

.download-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Register */
.register {
  padding: 4rem 0;
}

.register h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: .75rem;
}

.register-form {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--text);
}

.form-group input,
.form-group select {
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  background: var(--bg);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43,108,176,.1);
}

.form-submit-group { justify-content: flex-end; }
.form-submit-group .btn { margin-top: auto; }

/* CTA */
.cta {
  padding: 4rem 0;
  text-align: center;
  background: var(--primary);
  color: #fff;
}

.cta h2 { font-size: 2rem; margin-bottom: .75rem; }
.cta p { font-size: 1.05rem; margin-bottom: 1.5rem; opacity: .9; }

.notify-form {
  display: flex;
  gap: .75rem;
  max-width: 440px;
  margin: 0 auto;
}

.notify-form input {
  flex: 1;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  outline: none;
}

.notify-form input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.4); }

.notify-form .btn-primary {
  background: #fff;
  color: var(--primary);
  flex-shrink: 0;
}

.notify-form .btn-primary:hover {
  background: var(--accent);
  color: #234E52;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Legal pages */
.legal {
  padding: 3rem 0 4rem;
}

.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: .25rem;
}

.legal-date {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 .75rem;
}

.legal p {
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.legal ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal li {
  color: var(--text-muted);
  margin-bottom: .35rem;
}

/* Auth pages */
.auth {
  padding: 3rem 0 4rem;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.auth-inner {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { font-size: 1.75rem; margin-bottom: .35rem; }
.auth-header p { color: var(--text-muted); font-size: .95rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form .form-group { margin-bottom: 0; }

.field-hint { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.optional { font-weight: 400; color: var(--text-muted); font-size: .8rem; }

.auth-redirect { text-align: center; font-size: .9rem; color: var(--text-muted); }

.auth-error {
  background: #FED7D7;
  color: #9B2C2C;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .875rem;
  margin-top: 1rem;
}

.auth-success {
  background: #C6F6D5;
  color: #22543D;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .875rem;
  margin-top: 1rem;
  text-align: center;
}

/* Dashboard */
.dashboard {
  padding: 3rem 0 4rem;
  min-height: 60vh;
}

.dashboard-loading,
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.empty-state a { font-weight: 600; }

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-header h1 { font-size: 1.75rem; margin-bottom: .25rem; }
.dashboard-sub { color: var(--text-muted); }

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.child-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow .2s;
}

.child-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }

.child-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.child-info { flex: 1; }
.child-info h3 { font-size: 1.05rem; font-weight: 600; }
.child-age { font-size: .85rem; color: var(--text-muted); }

.btn-delete {
  background: none;
  border: 1px solid #FEB2B2;
  color: #C53030;
  padding: .35rem .75rem;
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #FED7D7;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 48px rgba(0,0,0,.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-header h2 { font-size: 1.35rem; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: .25rem;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

/* Footer */
footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; }

.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: .85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

.footer-copy { font-size: .85rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; padding-top: 1rem; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero { padding: 2rem 0; }
  h1 { font-size: 2rem; }

  .about-inner { flex-direction: column; text-align: center; }
  .about-text ul { text-align: left; max-width: 320px; margin: 0 auto; }
  .about-screenshot { flex: none; }

  .features-grid { grid-template-columns: 1fr; }

  .countdown-grid { gap: 1rem; }
  .countdown-number { font-size: 2rem; }

  .form-row { flex-direction: column; gap: .75rem; }
  .register-form { padding: 1.25rem; }

  .notify-form { flex-direction: column; }
  .notify-form .btn-primary { width: 100%; }

  .footer-inner { flex-direction: column; gap: .5rem; text-align: center; }

  .download-buttons { flex-direction: column; align-items: center; }

  .legal { padding: 2rem 0 3rem; }
}
