/* ============================================
   GloUp™ App Styles
   Visual Identity: Vibrant, cartoonish-realistic, teen-friendly
   Fonts: Fredoka (headings) + Nunito (body)
   ============================================ */

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

:root {
  /* Core palette */
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-dark: #5B21B6;
  --purple-glow: rgba(124, 58, 237, 0.15);
  --coral: #FF6B6B;
  --coral-light: #FFA3A3;
  --coral-glow: rgba(255, 107, 107, 0.15);
  --teal: #06D6A0;
  --teal-light: #6EECD2;
  --teal-glow: rgba(6, 214, 160, 0.15);
  --yellow: #FFD166;
  --yellow-light: #FFE29E;
  --yellow-glow: rgba(255, 209, 102, 0.15);
  --blue: #4CC9F0;
  --blue-light: #8EDDF6;
  --orange: #FF9F1C;

  /* Backgrounds */
  --bg: #FFF8F0;
  --bg-cool: #F0F4FF;
  --bg-card: #FFFFFF;
  --dark: #1E1045;
  --dark-mid: #2D2660;

  /* Text */
  --text-dark: #2D2B55;
  --text-mid: #6B6B8D;
  --text-light: #9B9BB5;

  /* Functional */
  --success: #06D6A0;
  --danger: #FF6B6B;

  /* Shapes */
  --radius: 24px;
  --radius-sm: 14px;
  --radius-pill: 50px;
  --shadow: 0 4px 24px rgba(45, 43, 85, 0.06);
  --shadow-hover: 0 12px 40px rgba(45, 43, 85, 0.1);
  --shadow-color: 0 4px 20px var(--purple-glow);
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Fredoka', sans-serif;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* ============ NAV ============ */

.app-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 248, 240, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(124, 58, 237, 0.06);
}

.logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo span {
  background: linear-gradient(135deg, var(--purple), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo:hover {
  text-decoration: none;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-mid);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.25s ease;
}

.nav-link:hover {
  color: var(--purple);
  background: var(--purple-glow);
  text-decoration: none;
}

.nav-link.active {
  color: var(--purple);
  background: var(--purple-glow);
  font-weight: 800;
}

.nav-logout {
  color: var(--text-light);
  margin-left: 0.5rem;
}

.nav-logout:hover {
  color: var(--coral);
  background: var(--coral-glow);
}

.btn-nav-signup {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
  box-shadow: 0 4px 15px var(--purple-glow);
}

.btn-nav-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
  text-decoration: none;
}

/* ============ CONSENT BANNER ============ */

.consent-banner {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 99;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: var(--dark);
  padding: 0.5rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.consent-banner-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.consent-link {
  font-weight: 800;
  color: var(--dark);
  text-decoration: underline;
}

/* ============ MAIN LAYOUT ============ */

.app-main {
  padding-top: 5rem;
  min-height: calc(100vh - 80px);
  background: linear-gradient(180deg, var(--bg) 0%, #F5F0FF 50%, var(--bg) 100%);
}

.app-footer {
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--dark);
  margin-top: 4rem;
}

.app-footer p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-mid);
  font-size: 1.05rem;
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.back-link:hover {
  color: var(--purple);
  background: var(--purple-glow);
  text-decoration: none;
}

/* ============ BUTTONS ============ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--purple-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
  text-decoration: none;
  color: white;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary.btn-success {
  background: linear-gradient(135deg, var(--teal), #059669);
  box-shadow: 0 4px 15px var(--teal-glow);
}

.btn-primary.btn-success:hover {
  box-shadow: 0 8px 25px rgba(6, 214, 160, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple);
  background: white;
  border: 2.5px solid var(--purple-light);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--purple);
  background: var(--purple-glow);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

/* ============ AUTH PAGES ============ */

.auth-container {
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(180deg, var(--bg) 0%, #F5EEFF 50%, #FFF0E8 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative blobs for auth pages */
.auth-container::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 60% 40% 55% 45% / 45% 60% 40% 55%;
  background: linear-gradient(135deg, var(--purple-glow), rgba(76, 201, 240, 0.08));
  pointer-events: none;
}

.auth-container::after {
  content: '';
  position: absolute;
  bottom: 5%;
  left: -10%;
  width: 350px;
  height: 350px;
  border-radius: 45% 55% 40% 60% / 55% 40% 60% 45%;
  background: linear-gradient(135deg, var(--coral-glow), var(--yellow-glow));
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(45, 43, 85, 0.08);
  border: 2px solid rgba(124, 58, 237, 0.06);
}

.auth-card.centered {
  text-align: center;
  max-width: 520px;
}

.auth-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-mid);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.8rem 1.15rem;
  border: 2.5px solid rgba(124, 58, 237, 0.12);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-dark);
  transition: all 0.25s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--purple);
  background: white;
  box-shadow: 0 0 0 4px var(--purple-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--purple);
  border-radius: 6px;
}

.auth-error {
  background: var(--coral-glow);
  color: var(--coral);
  padding: 0.8rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  border: 2px solid rgba(255, 107, 107, 0.2);
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-mid);
  font-weight: 600;
}

.consent-info {
  text-align: left;
  background: linear-gradient(135deg, var(--teal-glow), rgba(76, 201, 240, 0.08));
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 2px solid rgba(6, 214, 160, 0.12);
}

.consent-info h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.consent-info p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.consent-info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.consent-info li {
  font-size: 0.9rem;
  color: var(--text-mid);
  padding-left: 1.5rem;
  position: relative;
  font-weight: 500;
}

.consent-info li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 800;
}

/* ============ DASHBOARD ============ */

.dashboard-welcome {
  margin-bottom: 2rem;
}

.dashboard-welcome h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
}

.welcome-sub {
  color: var(--text-mid);
  margin-top: 0.35rem;
  font-weight: 500;
}

.welcome-sub strong {
  color: var(--purple);
  font-weight: 700;
}

.consent-card {
  display: flex;
  gap: 1.25rem;
  background: var(--yellow-glow);
  border: 2px solid rgba(255, 209, 102, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.consent-card.approved {
  background: var(--teal-glow);
  border-color: rgba(6, 214, 160, 0.3);
}

.consent-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 209, 102, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}

.consent-card.approved .consent-card-icon {
  background: rgba(6, 214, 160, 0.2);
  color: var(--teal);
}

.consent-card-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--dark);
}

.consent-card-content p {
  font-size: 0.9rem;
  color: var(--text-mid);
  font-weight: 500;
}

.consent-link-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.consent-link-box input {
  flex: 1;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border: 2px solid rgba(124, 58, 237, 0.12);
  border-radius: 10px;
  background: white;
  color: var(--text-mid);
}

.consent-link-box button {
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: var(--dark);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.consent-link-box button:hover {
  transform: translateY(-1px);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-card:nth-child(1) .stat-card-num { color: var(--purple); }
.stat-card:nth-child(2) .stat-card-num { color: var(--teal); }
.stat-card:nth-child(3) .stat-card-num { color: var(--coral); }

.stat-card-num {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  font-weight: 600;
}

.dashboard-section {
  margin-bottom: 2.5rem;
}

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

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
}

.section-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.section-link:hover {
  background: var(--purple-glow);
  text-decoration: none;
}

/* ============ COURSES ============ */

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

.course-card {
  display: block;
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.35s ease;
  box-shadow: var(--shadow);
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  border-color: var(--purple-light);
}

.course-card-coral {
  background: linear-gradient(135deg, #FFF0F0 0%, #FFF8F5 100%);
  border-color: rgba(255, 107, 107, 0.1);
}
.course-card-coral:hover { border-color: var(--coral); }

.course-card-teal {
  background: linear-gradient(135deg, #F0FFF8 0%, #F5FFFC 100%);
  border-color: rgba(6, 214, 160, 0.1);
}
.course-card-teal:hover { border-color: var(--teal); }

.course-card-purple {
  background: linear-gradient(135deg, #F0F0FF 0%, #F8F5FF 100%);
  border-color: rgba(124, 58, 237, 0.08);
}
.course-card-purple:hover { border-color: var(--purple); }

.course-card-yellow {
  background: linear-gradient(135deg, #FFFAF0 0%, #FFF8E8 100%);
  border-color: rgba(255, 209, 102, 0.15);
}
.course-card-yellow:hover { border-color: var(--orange); }

.course-card-blue {
  background: linear-gradient(135deg, #F0F8FF 0%, #F5FAFF 100%);
  border-color: rgba(76, 201, 240, 0.12);
}
.course-card-blue:hover { border-color: var(--blue); }

.course-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.course-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 1rem;
  font-weight: 500;
}

.course-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.course-progress {
  margin-top: auto;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

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

.progress-text {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  display: block;
  font-weight: 600;
}

/* Course Detail */

.course-hero {
  background: linear-gradient(135deg, #F5EEFF 0%, #FFF0E8 50%, var(--bg) 100%);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 2px solid rgba(124, 58, 237, 0.08);
  position: relative;
  overflow: hidden;
}

.course-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--purple-glow);
  pointer-events: none;
}

.course-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
  position: relative;
}

.course-hero p {
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 600px;
  font-weight: 500;
  position: relative;
}

.course-hero-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  position: relative;
}

.course-progress-lg {
  margin-top: 1.5rem;
  position: relative;
}

.course-progress-lg .progress-bar {
  height: 10px;
}

/* Lesson List */

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

a.lesson-item:hover {
  border-color: var(--purple);
  transform: translateX(6px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.lesson-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.lesson-number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-mid);
}

.lesson-complete .lesson-number {
  background: var(--teal-glow);
  color: var(--teal);
}

.lesson-next .lesson-number {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white;
  box-shadow: 0 4px 12px var(--purple-glow);
}

.lesson-info {
  flex: 1;
}

.lesson-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--dark);
}

.lesson-info p {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.lesson-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.lesson-time {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.lesson-badge {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
}

.badge-done {
  background: var(--teal-glow);
  color: var(--teal);
}

.badge-next {
  background: var(--purple-glow);
  color: var(--purple);
}

.badge-locked {
  background: rgba(155, 155, 181, 0.1);
  color: var(--text-light);
}

/* ============ LESSON PAGE ============ */

.lesson-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}

.lesson-header {
  margin-bottom: 2.5rem;
}

.lesson-day {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--purple-glow);
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
}

.lesson-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.lesson-read-time {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.lesson-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dark);
  font-weight: 500;
}

.lesson-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(124, 58, 237, 0.08);
  font-weight: 500;
}

.lesson-section {
  margin-bottom: 2.5rem;
}

.lesson-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.lesson-section p {
  margin-bottom: 1rem;
}

.lesson-list {
  margin: 1rem 0 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lesson-list li {
  line-height: 1.65;
  color: var(--text-mid);
  font-weight: 500;
}

.lesson-checklist {
  list-style: none;
  margin: 1rem 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lesson-checklist li {
  padding: 0.75rem 1.15rem;
  background: var(--purple-glow);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-dark);
  border-left: 4px solid var(--purple);
  font-weight: 600;
}

.lesson-example {
  background: linear-gradient(135deg, var(--teal-glow), rgba(76, 201, 240, 0.08));
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1rem 0;
  border: 2px solid rgba(6, 214, 160, 0.12);
}

.lesson-example p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.lesson-inventory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.inventory-item {
  background: white;
  border: 2px solid rgba(124, 58, 237, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.25s ease;
}

.inventory-item:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
}

.inventory-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--dark);
}

.inventory-item p {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.lesson-formula {
  background: linear-gradient(135deg, var(--dark), var(--dark-mid));
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 30px rgba(30, 16, 69, 0.15);
}

.lesson-formula p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.lesson-formula strong {
  color: var(--yellow);
}

.lesson-habits {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1rem 0;
}

.habit-item {
  background: white;
  border: 2px solid rgba(124, 58, 237, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  transition: all 0.25s ease;
}

.habit-item:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
}

.habit-item h4 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  color: var(--coral);
  margin-bottom: 0.5rem;
}

.lesson-declaration {
  background: linear-gradient(135deg, var(--purple), var(--coral));
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.2);
}

.lesson-declaration em {
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
}

.lesson-reflection {
  background: var(--yellow-glow);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  border-left: 5px solid var(--yellow);
}

.lesson-reflection h3 {
  font-size: 1.05rem;
  color: var(--orange);
  margin-bottom: 0.75rem;
}

.lesson-reflection blockquote {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.65;
  font-weight: 500;
}

.lesson-action {
  background: var(--coral-glow);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  border-left: 5px solid var(--coral);
}

.lesson-action h3 {
  font-size: 1.05rem;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

/* Lesson completion section */

.lesson-complete-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px solid rgba(124, 58, 237, 0.08);
}

.lesson-reflection-input h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.lesson-reflection-input p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.lesson-reflection-input textarea {
  width: 100%;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 1rem;
  border: 2.5px solid rgba(124, 58, 237, 0.12);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-dark);
  resize: vertical;
  margin-bottom: 1rem;
  transition: all 0.25s ease;
}

.lesson-reflection-input textarea:focus {
  border-color: var(--purple);
  outline: none;
  box-shadow: 0 0 0 4px var(--purple-glow);
}

.lesson-completed-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--teal-glow);
  color: var(--teal);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(6, 214, 160, 0.2);
}

.saved-reflection {
  background: linear-gradient(135deg, var(--teal-glow), rgba(76, 201, 240, 0.06));
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(6, 214, 160, 0.1);
}

.saved-reflection h4 {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.saved-reflection p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
  font-weight: 500;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* ============ COMMUNITY ============ */

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.cat-tab {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill);
  background: white;
  border: 2px solid rgba(124, 58, 237, 0.08);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.cat-tab:hover {
  border-color: var(--purple);
  color: var(--purple);
  text-decoration: none;
  background: var(--purple-glow);
}

.cat-tab.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white;
  border-color: var(--purple);
  box-shadow: 0 4px 12px var(--purple-glow);
}

.community-guidelines-bar {
  background: linear-gradient(135deg, var(--teal-glow), rgba(76, 201, 240, 0.06));
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 600;
  border: 2px solid rgba(6, 214, 160, 0.1);
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.post-card {
  display: block;
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.post-card:hover {
  border-color: var(--purple-light);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

.post-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.post-author {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}

.post-time {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.post-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--dark);
}

.post-preview {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.55;
  font-weight: 500;
}

.post-card-footer {
  display: flex;
  gap: 1rem;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.post-cat {
  background: var(--purple-glow);
  color: var(--purple);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.75rem;
}

/* Post Full */

.post-full {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.post-full-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.post-full h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.post-author-line {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.post-full-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-mid);
  font-weight: 500;
}

.post-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid rgba(124, 58, 237, 0.06);
}

.btn-support {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-mid);
  background: white;
  border: 2.5px solid rgba(124, 58, 237, 0.12);
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s;
}

.btn-support:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: var(--coral-glow);
}

.btn-support.supported {
  background: var(--coral-glow);
  border-color: var(--coral);
  color: var(--coral);
  font-weight: 800;
}

/* Replies */

.replies-section {
  margin-bottom: 2rem;
}

.replies-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.reply-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.reply-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.reply-author {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}

.reply-time {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.reply-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-mid);
  font-weight: 500;
}

.reply-form-section {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 2px solid rgba(124, 58, 237, 0.06);
  box-shadow: var(--shadow);
}

.reply-form-section h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.post-anon-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Modal */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 16, 69, 0.5);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(30, 16, 69, 0.25);
  border: 2px solid rgba(124, 58, 237, 0.08);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem 0;
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

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

.modal-body {
  padding: 1.25rem 1.75rem 1.75rem;
}

/* Empty state */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.empty-state.small {
  padding: 2rem;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-mid);
}

/* Recent posts (dashboard) */

.recent-posts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.recent-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(124, 58, 237, 0.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.25s;
  box-shadow: var(--shadow);
}

.recent-post-item:hover {
  border-color: var(--purple);
  text-decoration: none;
  transform: translateX(4px);
}

.recent-post-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.recent-post-stats {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  font-weight: 600;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  .app-nav {
    padding: 0.6rem 1rem;
  }

  .app-nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  .page-container {
    padding: 1.25rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card-num {
    font-size: 1.5rem;
  }

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

  .community-header {
    flex-direction: column;
    gap: 1rem;
  }

  .lesson-inventory {
    grid-template-columns: 1fr;
  }

  .lesson-container {
    padding: 1.25rem;
  }

  .lesson-header h1 {
    font-size: 1.5rem;
  }

  .lesson-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
  }
}

@media (max-width: 480px) {
  .app-nav-links .nav-link:not(.active) {
    display: none;
  }

  .app-nav-links .nav-logout,
  .btn-nav-signup {
    display: inline-flex;
  }
}
