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

:root {
  /* Matched to moswane.com design tokens */
  --bg:          #0A0A0F;
  --bg-surface:  #12121A;
  --bg-elevated: #1A1A26;
  --bg-hover:    #22223A;
  --border:      rgba(255,255,255,0.07);
  --border-accent: rgba(108,63,255,0.3);

  --text:        #F0EDE8;
  --text-muted:  #8A8A9A;
  --text-dim:    #55556A;

  --purple:      #6C3FFF;
  --purple-glow: #8B6AFF;
  --purple-dim:  rgba(108,63,255,0.15);
  --teal:        #00B4D8;
  --teal-dim:    rgba(0,180,216,0.12);

  --green:       #4ADE80;
  --green-dim:   rgba(74,222,128,0.12);
  --amber:       #FBBF24;
  --amber-dim:   rgba(251,191,36,0.12);
  --red:         #F87171;
  --red-dim:     rgba(248,113,113,0.12);

  --font:        'Inter', system-ui, sans-serif;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --fast:        150ms;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }

/* Header — floating pill bar, matching moswane.com */
.site-header {
  padding: 1rem 0 0.25rem;
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: rgba(18,18,26,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.55rem 1.4rem;
}
.brand { color: var(--text); text-decoration: none; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.brand span { color: var(--purple-glow); }
.brand em { color: var(--text-dim); font-style: normal; font-weight: 500; font-size: 0.85rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.nav a {
  color: var(--text-muted); text-decoration: none; padding: 0.4rem 0.9rem;
  border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav a:hover { color: var(--text); background: var(--bg-hover); }
.nav a.active { color: #fff; background: var(--purple); }
.nav-user { opacity: 0.85; }

main { flex: 1; padding: 2.25rem 1.25rem 3rem; }

/* Footer */
.site-footer {
  background: var(--bg-surface); color: var(--text-dim);
  border-top: 1px solid var(--border);
  text-align: center; padding: 1.2rem 0; font-style: italic; font-size: 0.85rem;
  margin-top: 1.5rem;
}

/* Typography */
h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.accent { color: var(--purple); }

/* Back links */
.back-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
  padding: 0.3rem 0.9rem; margin-bottom: 0.9rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-surface);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.back-link:hover { color: var(--purple-glow); border-color: var(--border-accent); background: var(--bg-elevated); }
h2 { font-size: 1.2rem; font-weight: 700; color: var(--purple-glow); margin-bottom: 0.75rem; }
.subtitle { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* Cards */
.card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem; margin-bottom: 1.5rem;
}
.card-title {
  color: var(--purple-glow); font-weight: 700; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.7rem;
}

/* Verse of the day */
.verse-card { border-left: 3px solid var(--purple); background: linear-gradient(135deg, var(--purple-dim), var(--bg-surface) 60%); }
.verse-text { font-size: 1.1rem; font-style: italic; color: var(--text); margin-bottom: 0.5rem; }
.verse-ref { color: var(--purple-glow); font-weight: 600; font-size: 0.9rem; }

/* Flash messages */
.flash { padding: 0.8rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; border: 1px solid; font-size: 0.95rem; }
.flash-success { background: var(--green-dim); border-color: rgba(74,222,128,0.35); color: var(--green); }
.flash-error { background: var(--red-dim); border-color: rgba(248,113,113,0.35); color: var(--red); }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; color: var(--text); }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-elevated); font-family: inherit;
  font-size: 1rem; color: var(--text);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
}
select option { background: var(--bg-elevated); color: var(--text); }
.hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

.btn {
  display: inline-block; background: var(--purple); color: #fff;
  border: none; border-radius: 999px; padding: 0.6rem 1.5rem;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  text-decoration: none;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.btn:hover { background: var(--purple-glow); transform: translateY(-1px); box-shadow: 0 4px 20px var(--purple-dim); }
.btn-secondary { background: transparent; color: var(--purple-glow); border: 1px solid var(--border-accent); }
.btn-secondary:hover { background: var(--purple-dim); color: var(--purple-glow); box-shadow: none; }
.btn-small { padding: 0.35rem 1rem; font-size: 0.85rem; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(248,113,113,0.35); }
.btn-danger:hover { background: var(--red-dim); color: var(--red); box-shadow: none; }

/* Auth pages */
.auth-box { max-width: 430px; margin: 2rem auto; }
.auth-box .card { padding: 2rem; }
.auth-box h1 { text-align: center; margin-bottom: 1.25rem; font-size: 2.4rem; }
.auth-alt { text-align: center; margin-top: 1rem; color: var(--text-muted); font-size: 0.9rem; }
.auth-alt a { color: var(--purple-glow); }

/* Progress */
.progress-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.progress-box { flex: 1; min-width: 220px; }
.progress-box strong { font-weight: 700; }
.progress-bar-track {
  background: var(--bg-hover); border-radius: 999px; height: 10px; overflow: hidden; margin-top: 0.5rem;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--purple), var(--purple-glow));
  height: 100%; border-radius: 999px; transition: width 0.3s var(--ease);
}
.progress-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; }

/* Plan grid */
.plan-week-title { margin-top: 1.75rem; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 0.9rem; margin-top: 0.9rem; }
.day-card {
  display: block; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1rem 1.1rem; text-decoration: none; color: var(--text);
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.day-card:hover { border-color: var(--border-accent); background: var(--bg-elevated); transform: translateY(-2px); }
.day-card.done { border-left: 3px solid var(--green); }
.day-num { color: var(--purple-glow); font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.day-theme { font-weight: 600; margin: 0.2rem 0 0.3rem; font-size: 0.95rem; }
.day-passage { color: var(--text-muted); font-size: 0.8rem; }
.day-status { margin-top: 0.55rem; font-size: 0.78rem; }
.tick { color: var(--green); }
.untick { color: var(--text-dim); }

/* Day page */
.day-header { margin-bottom: 1.25rem; }
.passage-badge {
  display: inline-block; background: var(--purple-dim); color: var(--purple-glow);
  border: 1px solid var(--border-accent);
  border-radius: 999px; padding: 0.4rem 1.1rem; font-size: 0.9rem; font-weight: 600; margin-top: 0.5rem;
}
.prompt { font-style: italic; color: var(--text-muted); margin-bottom: 0.6rem; font-size: 0.95rem; }
.check-row { display: flex; align-items: center; gap: 0.6rem; margin: 1.1rem 0; }
.check-row input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: var(--purple); }
.check-row label { margin: 0; }
.day-nav { display: flex; justify-content: space-between; gap: 0.75rem; margin: 1.75rem 0 1rem; }

/* Prayer wall & journal lists */
.item-list { list-style: none; }
.item {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.2rem 1.4rem; margin-bottom: 1rem;
  transition: border-color var(--fast) var(--ease);
}
.item:hover { border-color: var(--border-accent); }
.item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.item-title { font-weight: 600; font-size: 1rem; }
.item-title a { color: var(--text); text-decoration: none; }
.item-title a:hover { color: var(--purple-glow); }
.item-meta { color: var(--text-dim); font-size: 0.8rem; }
.item-body { margin-top: 0.55rem; white-space: pre-wrap; color: var(--text-muted); font-size: 0.95rem; }
.item-actions { margin-top: 0.85rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-block; border-radius: 999px; padding: 0.15rem 0.8rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.badge-request { background: var(--amber-dim); color: var(--amber); }
.badge-answered { background: var(--green-dim); color: var(--green); }
.badge-private { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge-shared { background: var(--teal-dim); color: var(--teal); }

.answered-note {
  margin-top: 0.7rem; padding: 0.7rem 1rem; background: var(--green-dim);
  border-left: 3px solid var(--green); border-radius: 8px; font-size: 0.9rem;
}

.empty { color: var(--text-dim); font-style: italic; padding: 1rem 0; }

.inline-form { display: inline; }

/* Ambient glow background, echoing the main site */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 450px at 85% -10%, rgba(108,63,255,0.16), transparent 60%),
    radial-gradient(550px 400px at -10% 40%, rgba(0,180,216,0.08), transparent 60%);
}

/* Hero banner */
.hero {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 1.5rem;
  background-size: cover; background-position: center;
  background-color: var(--bg-surface);
}
.hero-inner {
  background: linear-gradient(180deg, rgba(10,10,15,0.45) 0%, rgba(10,10,15,0.88) 100%);
  padding: 3.2rem 2.2rem 2.2rem;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 0.3rem; text-shadow: 0 2px 18px rgba(0,0,0,0.6); }
.hero .subtitle { margin-bottom: 0; color: var(--text-muted); }

/* Week banners on the plan page */
.week-banner {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); margin-top: 2rem;
  background-size: cover; background-position: center;
  background-color: var(--bg-surface);
}
.wb-inner {
  background: linear-gradient(90deg, rgba(10,10,15,0.88) 0%, rgba(10,10,15,0.35) 100%);
  padding: 1.7rem 1.6rem;
}
.week-banner h2 { margin: 0; color: #fff; font-size: 1.3rem; text-shadow: 0 2px 12px rgba(0,0,0,0.7); }

/* Scripture blocks (text fetched from bible-api.com) */
.scripture-card { border-left: 3px solid var(--teal); }
.scripture-passage { margin-bottom: 1rem; }
.scripture-passage:last-of-type { margin-bottom: 0; }
.scripture-ref { font-weight: 700; color: var(--text); margin-bottom: 0.35rem; font-size: 0.95rem; }
.scripture-passage p { color: var(--text-muted); font-size: 1.02rem; line-height: 1.9; }
.scripture-passage sup {
  color: var(--purple-glow); font-weight: 700; font-size: 0.65em;
  margin: 0 3px 0 6px;
}
.scripture-passage sup:first-child { margin-left: 0; }
.scripture-trans {
  color: var(--text-dim); font-size: 0.68rem; margin-top: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}
.scripture-toolbar { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }
.translation-select {
  width: auto; padding: 0.25rem 0.7rem; font-size: 0.78rem;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-muted);
  cursor: pointer;
}
.translation-select:hover { border-color: var(--border-accent); color: var(--text); }
.scripture-loading { color: var(--text-dim); font-style: italic; animation: pulse 1.4s ease-in-out infinite; }
.scripture-error { color: var(--text-muted); font-size: 0.9rem; }
.scripture-error a { color: var(--purple-glow); }
.scripture-note { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.7rem; }
.scripture-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.scripture-ext { text-decoration: none; }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.verse-card .scripture-passage p { font-style: italic; font-size: 1.08rem; }

/* Reveal-on-scroll (classes applied by app.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Confetti */
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

/* Draft restored hint */
.draft-restored { border-color: var(--amber) !important; }

/* Resume where you left off */
.resume-btn { margin-bottom: 0.75rem; }
.day-card.last-visited {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim), 0 4px 24px rgba(108,63,255,0.18);
  position: relative;
}
.day-card.last-visited::after {
  content: 'Last visited';
  position: absolute; top: 0.6rem; right: 0.7rem;
  background: var(--purple); color: #fff;
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 999px; padding: 0.1rem 0.55rem;
}

@media (max-width: 560px) {
  h1 { font-size: 1.45rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero-inner { padding: 2.2rem 1.4rem 1.6rem; }
  .day-nav { flex-direction: column; gap: 0.6rem; }
  .day-nav .btn, .day-nav .btn-secondary { text-align: center; }
  .header-inner { padding: 0.6rem 1rem; border-radius: 18px; justify-content: center; }
  .brand { font-size: 1rem; }
  .nav { font-size: 0.82rem; gap: 0.15rem; justify-content: center; }
  .nav a { padding: 0.3rem 0.65rem; }
  main { padding-top: 1.5rem; }
}
