
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #3ddc6e;
  --red:   #e05252;
  --gold:  #f0c040;
  --bg:    #0a0c10;
  --surface: rgba(255,255,255,0.045);
  --border:  rgba(255,255,255,0.09);
  --muted:   rgba(255,255,255,0.38);
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
  overflow-x: hidden;
  position: relative;
}

/* ─── BACKGROUND GLOW ─── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 80% 10%, rgba(61,220,110,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(224,82,82,0.09) 0%, transparent 70%);
}

/* Subtle grid */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.013) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ─── WRAPPER ─── */
.wrap {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ─── BRAND ─── */
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 24px;
  animation: fadeDown 0.7s cubic-bezier(.22,1,.36,1) both;
}

.brand-icon {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 18px rgba(61,220,110,0.55));
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,100% { filter: drop-shadow(0 4px 18px rgba(61,220,110,0.55)); }
  50%      { filter: drop-shadow(0 4px 32px rgba(61,220,110,0.80)); }
}

.brand-name {
  font-size: 1.7rem; font-weight: 900; color: #fff; letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 0.75rem; font-weight: 300; color: var(--muted);
  letter-spacing: 0.18em; text-transform: uppercase; margin-top: -4px;
}

/* ─── LOGIN CARD ─── */
.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px 24px 24px;
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  margin-bottom: 28px;
  animation: fadeUp 0.7s 0.1s cubic-bezier(.22,1,.36,1) both;
}

.login-title {
  font-size: 1.15rem; font-weight: 700; color: #fff;
  text-align: center; margin-bottom: 4px;
}
.login-sub {
  font-size: 0.80rem; color: var(--muted);
  text-align: center; margin-bottom: 22px; line-height: 1.6;
}

.google-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.18s;
  margin-bottom: 16px;
}
.google-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.google-btn:active { transform: scale(0.98); }

.g-logo { width: 20px; height: 20px; flex-shrink: 0; }

.privacy {
  font-size: 0.68rem; color: rgba(255,255,255,0.22);
  text-align: center; line-height: 1.6;
}
.privacy a { color: rgba(61,220,110,0.65); text-decoration: none; }

/* ─── SECTION LABEL ─── */
.section-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.30);
  margin-bottom: 14px; text-align: center;
  animation: fadeUp 0.5s 0.35s ease both;
}

/* ─── FEATURE PILLS ─── */
.feat-row {
  width: 100%; display: flex; gap: 8px;
  margin-bottom: 20px;
  animation: fadeUp 0.5s 0.4s ease both;
}

.feat-pill {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 6px;
  cursor: pointer; transition: all 0.22s;
  position: relative; overflow: hidden;
}

.feat-pill::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  border-radius: 0 0 14px 14px;
  opacity: 0; transition: opacity 0.3s;
}

.feat-pill:nth-child(1)::after { background: var(--green); }
.feat-pill:nth-child(2)::after { background: var(--red); }
.feat-pill:nth-child(3)::after { background: var(--gold); }
.feat-pill:nth-child(4)::after { background: #a78bfa; }

.feat-pill.active::after { opacity: 1; }
.feat-pill:nth-child(1).active { border-color: rgba(61,220,110,0.35); }
.feat-pill:nth-child(2).active { border-color: rgba(224,82,82,0.35); }
.feat-pill:nth-child(3).active { border-color: rgba(240,192,64,0.35); }
.feat-pill:nth-child(4).active { border-color: rgba(167,139,250,0.35); }

.feat-pill:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.feat-emoji { font-size: 1.2rem; }
.feat-name  { font-size: 0.58rem; font-weight: 700; color: var(--muted); }

/* ─── PHONE FRAME ─── */
.phone-wrap {
  width: 230px;
  height: 460px;
  flex-shrink: 0;
  animation: fadeUp 0.8s 0.5s cubic-bezier(.22,1,.36,1) both;
}

.phone-frame {
  width: 100%; height: 100%;
  border-radius: 36px;
  border: 2px solid rgba(255,255,255,0.13);
  background: #0d0f14;
  position: relative; overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 32px 72px rgba(0,0,0,0.75),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Notch */
.phone-frame::before {
  content: '';
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 55px; height: 5px;
  background: rgba(255,255,255,0.13);
  border-radius: 10px; z-index: 10;
}

/* ─── SLIDES ─── */
.slides { width: 100%; height: 100%; position: relative; }

.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 44px 18px 38px;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}
.slide.active {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: auto;
}

.slide-tag {
  font-size: 0.60rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 11px; border-radius: 20px; margin-bottom: 16px;
}
.slide-title {
  font-size: 1.1rem; font-weight: 900;
  text-align: center; margin-bottom: 6px; line-height: 1.3;
}
.slide-desc {
  font-size: 0.68rem; color: var(--muted);
  text-align: center; line-height: 1.65; margin-top: 12px;
}

/* ── SLIDE 1: BREATH ── */
.slide-breath { background: linear-gradient(160deg, #0c1e13 0%, #060d09 100%); }
.slide-breath .slide-tag   { background: rgba(61,220,110,0.15); color: var(--green); }
.slide-breath .slide-title { color: var(--green); }

.breath-orb {
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 38% 33%, #5dffa0, #1a8a40 55%, #0a3d1a);
  box-shadow: 0 0 0 18px rgba(61,220,110,0.07), 0 0 55px rgba(61,220,110,0.28);
  margin-bottom: 18px;
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { transform: scale(1);   box-shadow: 0 0 0 18px rgba(61,220,110,0.07), 0 0 55px rgba(61,220,110,0.28); }
  50%      { transform: scale(1.2); box-shadow: 0 0 0 30px rgba(61,220,110,0.04), 0 0 80px rgba(61,220,110,0.42); }
}

/* ── SLIDE 2: GOALS ── */
.slide-goals { background: linear-gradient(160deg, #180d0d 0%, #0c0707 100%); }
.slide-goals .slide-tag   { background: rgba(224,82,82,0.15); color: var(--red); }
.slide-goals .slide-title { color: var(--red); }

.goal-items { width: 100%; display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }

.goal-item {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(224,82,82,0.18);
  border-radius: 10px; padding: 9px 12px;
  opacity: 0; transform: translateX(12px);
}
.slide.active .goal-item:nth-child(1) { animation: slideIn 0.4s 0.10s ease forwards; }
.slide.active .goal-item:nth-child(2) { animation: slideIn 0.4s 0.25s ease forwards; }
.slide.active .goal-item:nth-child(3) { animation: slideIn 0.4s 0.40s ease forwards; }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }

.goal-check {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.65rem;
}
.goal-check.done   { background: var(--red); }
.goal-check.undone { border: 1.5px solid rgba(255,255,255,0.20); }
.goal-text { font-size: 0.68rem; color: rgba(255,255,255,0.75); font-weight: 500; }

/* ── SLIDE 3: DIARY ── */
.slide-diary { background: linear-gradient(160deg, #181400 0%, #0c0d00 100%); }
.slide-diary .slide-tag   { background: rgba(240,192,64,0.15); color: var(--gold); }
.slide-diary .slide-title { color: var(--gold); }

.diary-book {
  font-size: 3.5rem; margin-bottom: 12px;
  filter: drop-shadow(0 6px 18px rgba(240,192,64,0.40));
  animation: bookFloat 3s ease-in-out infinite;
}
@keyframes bookFloat {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.diary-lines { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.diary-line {
  height: 3px; border-radius: 2px;
  background: rgba(240,192,64,0.20); position: relative; overflow: hidden;
}
.diary-line::after {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0;
  background: rgba(240,192,64,0.60); border-radius: 2px;
  animation: writeLine 1.8s ease-in-out infinite alternate;
}
.diary-line:nth-child(1)::after { width: 88%; animation-delay: 0.0s; }
.diary-line:nth-child(2)::after { width: 65%; animation-delay: 0.2s; }
.diary-line:nth-child(3)::after { width: 80%; animation-delay: 0.4s; }
.diary-line:nth-child(4)::after { width: 50%; animation-delay: 0.6s; }
@keyframes writeLine { from { opacity: 0.3; } to { opacity: 1; } }

/* ── SLIDE 4: LIBRARY ── */
.slide-lib { background: linear-gradient(160deg, #071a0d 0%, #040d06 100%); }
.slide-lib .slide-tag   { background: rgba(167,139,250,0.15); color: #a78bfa; }
.slide-lib .slide-title { color: #a78bfa; }

.lib-sparkle {
  font-size: 1.5rem; margin-bottom: 10px;
  animation: sparkle 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(167,139,250,0.6));
}
@keyframes sparkle {
  0%,100% { transform: scale(1) rotate(-5deg); }
  50%      { transform: scale(1.15) rotate(5deg); }
}

.lib-shelf {
  display: flex; gap: 7px; align-items: flex-end;
  margin-bottom: 10px; padding: 0 8px;
}
.lib-book {
  border-radius: 3px 7px 7px 3px;
  writing-mode: vertical-rl;
  font-size: 0.42rem; font-weight: 900;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em; padding: 8px 4px;
  box-shadow: 2px 0 6px rgba(0,0,0,0.4);
  opacity: 0; transform: translateY(20px);
}
.slide.active .lib-book:nth-child(1) { animation: bookRise 0.5s 0.10s ease forwards; }
.slide.active .lib-book:nth-child(2) { animation: bookRise 0.5s 0.22s ease forwards; }
.slide.active .lib-book:nth-child(3) { animation: bookRise 0.5s 0.34s ease forwards; }
.slide.active .lib-book:nth-child(4) { animation: bookRise 0.5s 0.46s ease forwards; }
.slide.active .lib-book:nth-child(5) { animation: bookRise 0.5s 0.58s ease forwards; }
@keyframes bookRise { to { opacity: 1; transform: translateY(0); } }

.lib-book:nth-child(1) { background: #2e7d32; height: 75px; width: 20px; }
.lib-book:nth-child(2) { background: #1565c0; height: 60px; width: 20px; }
.lib-book:nth-child(3) { background: #7b3f00; height: 85px; width: 21px; }
.lib-book:nth-child(4) { background: #6a1e6e; height: 65px; width: 20px; }
.lib-book:nth-child(5) { background: #b5451b; height: 72px; width: 20px; }

.lib-shelf-base {
  width: 100%; height: 3px;
  background: linear-gradient(90deg, rgba(167,139,250,0.5), rgba(167,139,250,0.10));
  border-radius: 2px; margin-bottom: 10px;
}

/* ─── PROGRESS BARS ─── */
.slide-progress {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  display: flex; gap: 5px; z-index: 5;
}
.prog-bar {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.12); overflow: hidden; cursor: pointer;
}
.prog-bar::after {
  content: ''; display: block; height: 100%; border-radius: 2px;
  background: rgba(255,255,255,0.65); width: 0%; transition: width 0.2s;
}
.prog-bar.active::after { width: 100%; transition: width 5s linear; }
.prog-bar.done::after   { width: 100%; transition: none; }

/* ─── ANIMATIONS ─── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.popup-box {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: rgb(185, 41, 41);
  padding: 20px;
  width: 80%;
  max-width: 350px;
  border-radius: 12px;
  text-align: right;
}

.close {
  cursor: pointer;
  float: left;
  font-size: 18px;
}