/* Amina's 11+ App — magical study companion */

:root {
  /* Magical pastel palette */
  --lilac-50:  #FAF5FF;
  --lilac-100: #F3E8FF;
  --lilac-200: #E9D5FF;
  --lilac-300: #D8B4FE;
  --lilac-400: #C084FC;
  --lilac-500: #A855F7;
  --lilac-600: #9333EA;
  --lilac-700: #7E22CE;
  --lilac-800: #6B21A8;
  --lilac-900: #3B0764;

  --pink-50:   #FDF2F8;
  --pink-100:  #FCE7F3;
  --pink-200:  #FBCFE8;
  --pink-300:  #F9A8D4;
  --pink-400:  #F472B6;
  --pink-500:  #EC4899;
  --pink-600:  #DB2777;

  --cream:     #FFFBF5;
  --mist:      #FBF7FF;
  --paper:     #FFFFFF;

  --gold:      #F5B941;
  --gold-soft: #FCD9A5;
  --mint:      #6EE7B7;
  --mint-deep: #10B981;
  --sky:       #A5B4FC;
  --coral:     #FB7185;

  --ink:       #2A1B47;       /* deep purple-ink for body */
  --ink-soft:  #4C3A6E;
  --ink-mute:  #7B6B96;
  --ink-faint: #BFB3D5;

  --line:      #EFE5F8;
  --line-soft: #F7EFFC;

  --shadow-card: 0 8px 24px -10px rgba(124, 58, 237, 0.18);
  --shadow-hi:   0 18px 40px -16px rgba(124, 58, 237, 0.35);
  --shadow-low:  0 2px 6px -2px rgba(124, 58, 237, 0.12);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Quicksand', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 18% 8%, #F0E1FF 0%, transparent 55%),
    radial-gradient(900px 700px at 88% 92%, #FFE1F1 0%, transparent 55%),
    linear-gradient(180deg, #F9F2FF 0%, #FFF3F9 100%);
  background-attachment: fixed;
}

.screen {
  width: 100%;
  max-width: 860px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--mist);
  box-shadow: 0 0 80px rgba(58, 18, 96, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* status bar */
.statusbar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-mute);
  flex-shrink: 0;
  border-bottom: 1px solid var(--line-soft);
}
.statusbar-right { display: flex; gap: 6px; align-items: center; }

/* content scroll area */
.page {
  flex: 1;
  overflow-y: auto;
  padding: 8px 28px 120px;
  scrollbar-width: thin;
  scrollbar-color: var(--lilac-300) transparent;
}
.page::-webkit-scrollbar { width: 6px; }
.page::-webkit-scrollbar-thumb { background: var(--lilac-300); border-radius: 3px; }

/* bottom tab bar */
.tabbar {
  position: fixed;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 56px), 804px);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  box-shadow: var(--shadow-hi);
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: var(--r-pill);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink-mute);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  transition: all 0.18s ease;
}
.tab svg { width: 22px; height: 22px; stroke-width: 2; }
.tab.active {
  background: linear-gradient(135deg, var(--lilac-500), var(--pink-500));
  color: white;
  box-shadow: 0 6px 14px -6px rgba(168, 85, 247, 0.6);
}

/* typography helpers */
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac-600);
}

/* card primitives */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.soft-card {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-low);
  border: 1px solid var(--line-soft);
}

/* pill / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--lilac-100);
  color: var(--lilac-700);
  font-weight: 700;
  font-size: 12px;
}
.chip.pink { background: var(--pink-100); color: var(--pink-600); }
.chip.gold { background: #FFF3DB; color: #B07419; }
.chip.mint { background: #DCFCE7; color: #047857; }

/* primary button */
.btn-primary {
  background: linear-gradient(135deg, var(--lilac-500), var(--pink-500));
  color: white;
  border: none;
  border-radius: var(--r-pill);
  padding: 14px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(168, 85, 247, 0.6);
  transition: transform 0.1s ease, box-shadow 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { box-shadow: 0 12px 22px -8px rgba(168, 85, 247, 0.7); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: var(--paper);
  color: var(--lilac-700);
  border: 1.5px solid var(--lilac-200);
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

/* sparkle pulse */
@keyframes sparkle-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
.sparkle { animation: sparkle-pulse 2.4s ease-in-out infinite; transform-origin: center; }
.sparkle.delay-1 { animation-delay: 0.6s; }
.sparkle.delay-2 { animation-delay: 1.2s; }
.sparkle.delay-3 { animation-delay: 1.8s; }

/* gentle bob */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.bob { animation: bob 3.6s ease-in-out infinite; }
.bob.delay { animation-delay: 1.4s; }

/* progress ring */
.ring-bg { stroke: var(--lilac-100); }
.ring-fg { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
