/* ============================================================
   V5 HOME — MINIMAL PRAYER COMPANION
   Dark navy → black, one consistent background, prayer-first
   ============================================================ */

/* ---- V5 Dark Background System ---- */
.home--v5 {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(175deg, #0a1628 0%, #060d1a 40%, #030508 100%);
}

/* Subtle star field */
.v5-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.v5-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: v5Twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.v5-star--lg {
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.7);
}
@keyframes v5Twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Soft ambient glow at top */
.v5-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(13,107,94,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Scrollable Content Area ---- */
.v5-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
  gap: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px; /* space for tab bar */
}

/* ---- Greeting + Progress ---- */
.v5-greeting {
  text-align: center;
  padding-top: 44px;
  margin-bottom: 36px;
  opacity: 0;
  animation: v5FadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.v5-greeting__salaam {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

.v5-greeting__progress {
  font-size: 13px;
  color: rgba(255,255,255,0.40);
  margin-top: 6px;
  font-weight: 500;
  font-family: var(--f-body);
}

/* ---- Hero: Next Prayer ---- */
.v5-hero {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  animation: v5FadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) 150ms forwards;
}

.v5-hero__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--emerald);
  opacity: 0.85;
  margin-bottom: 12px;
}

.v5-hero__name {
  font-family: var(--f-display);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1;
  margin: 0;
}

.v5-hero__time {
  font-size: 16px;
  color: rgba(255,255,255,0.50);
  font-weight: 500;
  margin-top: 4px;
  font-family: var(--f-body);
}

/* Countdown */
.v5-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.v5-cd__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
}

.v5-cd__num {
  font-family: var(--f-mono);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.88);
  font-variant-numeric: tabular-nums;
}

.v5-cd__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.28);
  margin-top: 4px;
  font-family: var(--f-body);
}

.v5-cd__sep {
  font-family: var(--f-mono);
  font-size: 22px;
  color: rgba(255,255,255,0.15);
  margin-top: -12px;
  animation: v5SepPulse 2.5s ease-in-out infinite;
}
@keyframes v5SepPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.04; }
}

/* CTA */
.v5-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--emerald);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--f-body);
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(13,107,94,0.25), 0 0 48px rgba(13,107,94,0.08);
  margin-top: 24px;
  -webkit-tap-highlight-color: transparent;
}
.v5-cta:active {
  transform: scale(0.95);
  box-shadow: 0 2px 12px rgba(13,107,94,0.15);
}
.v5-cta--confirmed {
  animation: v5CtaPop 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes v5CtaPop {
  0% { transform: scale(1); }
  20% { transform: scale(0.92); }
  50% { transform: scale(1.05); box-shadow: 0 8px 32px rgba(13,107,94,0.35); }
  100% { transform: scale(1); }
}

/* All prayers complete state */
.v5-hero--complete .v5-hero__name {
  background: linear-gradient(135deg, var(--emerald), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 40px;
}
.v5-hero--complete .v5-hero__time {
  color: rgba(255,255,255,0.50);
  font-size: 14px;
}

/* ---- Prayer Progress Dots ---- */
.v5-tracker {
  text-align: center;
  margin-bottom: 32px;
  opacity: 0;
  animation: v5FadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) 300ms forwards;
}

.v5-tracker__row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.v5-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  -webkit-tap-highlight-color: transparent;
}

.v5-dot__circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.12);
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.v5-dot__fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--emerald);
  transform: scale(0);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.v5-dot__check {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: scale(0.4);
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 80ms;
}

.v5-dot__name {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.30);
  font-family: var(--f-body);
  transition: color 350ms ease;
}

/* Dot states */
.v5-dot--done .v5-dot__circle {
  border-color: var(--emerald);
  background: transparent;
}
.v5-dot--done .v5-dot__fill {
  transform: scale(1);
}
.v5-dot--done .v5-dot__check {
  opacity: 1;
  transform: scale(1);
}
.v5-dot--done .v5-dot__name {
  color: var(--emerald);
}

.v5-dot--current .v5-dot__circle {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(13,107,94,0.10);
  animation: v5DotBreathe 3.5s ease-in-out infinite;
}
@keyframes v5DotBreathe {
  0%, 100% { box-shadow: 0 0 0 4px rgba(13,107,94,0.10); }
  50% { box-shadow: 0 0 0 8px rgba(13,107,94,0.04); }
}
.v5-dot--current .v5-dot__name {
  color: var(--emerald);
  font-weight: 700;
}

.v5-dot--upcoming .v5-dot__name {
  color: rgba(255,255,255,0.22);
}

/* Dot pop animation on mark */
.v5-dot__circle--pop {
  animation: v5DotPop 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes v5DotPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ---- Supporting Card ---- */
.v5-card-wrap {
  opacity: 0;
  animation: v5FadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) 450ms forwards;
}

.v5-card {
  padding: 16px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 300ms ease;
  display: flex;
  align-items: center;
  gap: 14px;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.v5-card:active {
  transform: scale(0.98);
  background: rgba(255,255,255,0.06);
}

.v5-card__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(13,107,94,0.12);
  color: var(--emerald);
  flex-shrink: 0;
}

.v5-card__body {
  flex: 1;
  min-width: 0;
}

.v5-card__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald);
  opacity: 0.8;
  margin-bottom: 2px;
}

.v5-card__title {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v5-card__arrow {
  color: rgba(255,255,255,0.20);
  flex-shrink: 0;
}

/* Dua completed state */
.v5-card--done {
  background: rgba(13,107,94,0.04);
  border-color: rgba(13,107,94,0.08);
}
.v5-card--done .v5-card__icon {
  background: rgba(13,107,94,0.08);
}
.v5-card--done .v5-card__label {
  color: rgba(255,255,255,0.30);
}

/* ---- V5 Tab Bar (dark variant) ---- */
.home--v5 .tab-bar {
  background: rgba(6,13,26,0.92);
  border-top: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.home--v5 .tab {
  color: rgba(255,255,255,0.30);
}
.home--v5 .tab.active {
  color: var(--emerald);
}
.home--v5 .tab span {
  color: inherit;
}

/* ---- Animations ---- */
@keyframes v5FadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Tracker message ---- */
.v5-tracker__msg {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  margin-top: 12px;
  font-weight: 500;
  font-family: var(--f-body);
}

/* ---- Hide FAB on home screen (controlled by JS) ---- */
