@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --coral: #FF6B6B;
  --coral-dark: #E85555;
  --yellow: #FFD93D;
  --teal: #4ECDC4;
  --purple: #A66CFF;
  --cream: #FFF9F0;
  --ink: #2E2A4A;
  --gray: #8A8496;
  --radius: 22px;
  --shadow: 0 10px 24px rgba(46, 42, 74, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3, .brand {
  font-family: 'Baloo 2', 'Poppins', sans-serif;
}

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(160deg, #FFF3E0 0%, #FFF9F0 45%, #E8FBF8 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.55;
}
.blob.b1 { width: 260px; height: 260px; background: var(--yellow); top: -60px; left: -60px; }
.blob.b2 { width: 200px; height: 200px; background: var(--teal); bottom: -50px; right: -40px; }
.blob.b3 { width: 160px; height: 160px; background: var(--purple); bottom: 20%; left: -70px; opacity: 0.35; }

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
}

.mascot {
  font-size: 52px;
  text-align: center;
  display: block;
  margin-bottom: 4px;
}

.brand {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 2px;
  background: linear-gradient(90deg, var(--coral), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  text-align: center;
  color: var(--gray);
  margin: 0 0 22px;
  font-size: 14px;
}

.tabs {
  display: flex;
  background: #F3F0FF;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--coral);
  box-shadow: 0 4px 10px rgba(46, 42, 74, 0.1);
}

form.auth-form { display: flex; flex-direction: column; gap: 14px; }
form.auth-form[hidden] { display: none; }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  display: block;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #F0EDF7;
  background: #FBFAFF;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(90deg, var(--coral), #FF8E72);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 107, 107, 0.35);
}

.btn-primary:hover { box-shadow: 0 10px 22px rgba(255, 107, 107, 0.45); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: #F3F0FF;
  color: var(--purple);
}

.auth-message {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}
.auth-message.error { background: #FFE8E8; color: #C43D3D; }
.auth-message.warning { background: #FFF6DA; color: #92720B; }
.auth-message.success { background: #DFF8EE; color: #1E8A5F; }

/* Dashboard */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.topbar .brand { font-size: 22px; text-align: left; margin: 0; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 24px 60px;
}

.progress-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.progress-card h2 { margin: 0 0 4px; font-size: 18px; }
.progress-card p { margin: 0 0 12px; color: var(--gray); font-size: 13px; }

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: #F0EDF7;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--purple));
  transition: width 0.5s ease;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.topic-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.topic-card:not(.locked):hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(46, 42, 74, 0.18);
}

.topic-card.locked { opacity: 0.55; cursor: default; }
.topic-card.done { border: 2px solid var(--teal); }

.topic-emoji { font-size: 40px; }
.topic-card h3 { margin: 4px 0 0; font-size: 15px; }
.topic-card .hindi { margin: 0; font-size: 12px; color: var(--gray); }

.badge {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge.start { background: #FFF3D6; color: #A8760A; }
.badge.soon { background: #F0EDF7; color: var(--gray); }
.topic-card.done .badge { background: #DFF8EE; color: #1E8A5F; }

.config-banner {
  max-width: 960px;
  margin: 16px auto 0;
  padding: 12px 18px;
  background: #FFF6DA;
  color: #92720B;
  border-radius: 14px;
  font-size: 13px;
  text-align: center;
}

/* Lesson page */
.lesson-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

.lesson-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lesson-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}

.lesson-card h2 { margin-top: 0; }

.phrase-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #EDEAF7;
}
.phrase-row:last-child { border-bottom: none; }
.phrase-en { font-weight: 600; }
.phrase-hi { color: var(--gray); font-size: 13px; }

.example-bubble {
  background: #F3F0FF;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
}

.success-msg {
  background: #DFF8EE;
  color: #1E8A5F;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 600;
  text-align: center;
}
.success-msg[hidden] { display: none; }
