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

:root {
  --bg-dark: #070a13;
  --bg-body: #0b0f19;
  --bg-card: rgba(22, 31, 48, 0.5);
  --bg-card-solid: #151e2e;
  --bg-card-hover: rgba(30, 43, 68, 0.7);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(13, 92, 77, 0.3);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Status Colors */
  --color-ontime: #10b981;
  --color-ontime-bg: rgba(16, 185, 129, 0.1);
  --color-ontime-glow: rgba(16, 185, 129, 0.3);
  
  --color-late: #f59e0b;
  --color-late-bg: rgba(245, 158, 11, 0.1);
  --color-late-glow: rgba(245, 158, 11, 0.3);
  
  --color-qaza: #ef4444;
  --color-qaza-bg: rgba(239, 68, 68, 0.1);
  --color-qaza-glow: rgba(239, 68, 68, 0.3);
  
  --color-notdone: #6b7280;
  --color-notdone-bg: rgba(107, 114, 128, 0.1);
  --color-notdone-glow: rgba(107, 114, 128, 0.15);
  
  /* Accents */
  --accent-teal: #0d5c4d;
  --accent-teal-bright: #14b8a6;
  --accent-gold: #d97706;
  --accent-gold-light: #fbbf24;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* Theme-specific custom variables */
  --bg-app-container: rgba(7, 10, 19, 0.4);
  --bg-header: rgba(11, 15, 25, 0.8);
  --bg-dropdown-hover: rgba(255, 255, 255, 0.05);
  --bg-stats: rgba(255, 255, 255, 0.05);
}

/* Light Theme Variables */
.light-theme {
  --bg-dark: #f0f4f8;
  --bg-body: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-solid: #ffffff;
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(13, 92, 77, 0.15);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Status Colors in Light Mode */
  --color-ontime-bg: rgba(16, 185, 129, 0.15);
  --color-late-bg: rgba(245, 158, 11, 0.15);
  --color-qaza-bg: rgba(239, 68, 68, 0.15);
  --color-notdone-bg: rgba(100, 116, 139, 0.15);
  
  /* Accents */
  --accent-teal: #0d5c4d;
  --accent-teal-bright: #0f766e;
  --accent-gold: #c2410c;
  --accent-gold-light: #d97706;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  
  --bg-app-container: rgba(255, 255, 255, 0.4);
  --bg-header: rgba(248, 250, 252, 0.85);
  --bg-dropdown-hover: rgba(15, 23, 42, 0.05);
  --bg-stats: rgba(15, 23, 42, 0.04);
}

.light-theme body {
  background-image: 
    radial-gradient(at 0% 0%, rgba(13, 92, 77, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(248, 250, 252, 1) 0%, rgba(241, 245, 249, 1) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(at 0% 0%, rgba(13, 92, 77, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(11, 15, 25, 1) 0%, rgba(7, 10, 19, 1) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* App container */
.app-container {
  width: 100%;
  max-width: 540px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app-container);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding-bottom: 90px; /* Space for bottom nav */
  position: relative;
}

/* Header style */
header {
  padding: 24px 20px 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 38px;
  height: 38px;
}

.app-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-title p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.header-stats {
  display: flex;
  align-items: center;
  background: var(--bg-stats);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 99px;
  gap: 8px;
}

.streak-icon {
  color: var(--accent-gold);
  filter: drop-shadow(0 0 4px var(--accent-gold));
  animation: pulse-glow 2s infinite alternate;
}

.streak-count {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Main content wrapper */
main {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* View transitions */
.view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Date Navigator */
.date-navigator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 4px;
  box-shadow: var(--shadow-sm);
}

.nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glow);
}

.nav-btn:active {
  transform: scale(0.92);
}

.date-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.date-display h2 {
  font-size: 1rem;
  font-weight: 600;
}

.date-display p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.date-input-hidden {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
}

/* Cards layout */
.card-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 4px;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Prayer Cards */
.prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.prayer-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-notdone);
  transition: var(--transition-smooth);
}

.prayer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prayer-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.prayer-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.prayer-time {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold-light);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.prayer-time svg {
  opacity: 0.85;
  color: var(--accent-gold-light);
}

/* Sunrise & Sunset Card Styling */
.sun-times-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.sun-times-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 35%, #ec4899 70%, #8b5cf6 100%);
  opacity: 0.7;
}

.sun-times-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}

.sun-time-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.sun-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.sunrise .sun-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-gold-light);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.sunset .sun-icon {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

/* Light Theme overrides for icons */
.light-theme .sunrise .sun-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.light-theme .sunset .sun-icon {
  background: rgba(219, 39, 119, 0.12);
  color: #db2777;
}

.sun-info {
  display: flex;
  flex-direction: column;
}

.sun-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.sun-time-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1px;
}

.sun-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
  margin: 0 10px;
}

/* Forbidden Times Styling */
.sun-card-divider {
  width: 100%;
  height: 1px;
  background: var(--border-color);
}

.forbidden-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.forbidden-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ef4444; /* Alert color */
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.light-theme .forbidden-header {
  color: #dc2626;
}

.forbidden-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.forbidden-item {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.12);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: var(--transition-fast);
}

.forbidden-item:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

.forbidden-name {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.forbidden-value {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fca5a5;
  text-align: center;
}

.light-theme .forbidden-value {
  color: #ef4444;
}

.forbidden-note {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
  text-align: center;
}

.light-theme .forbidden-note {
  color: var(--text-secondary);
}

/* State changes for card matching status */
.prayer-card[data-status="ON_TIME"] {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.03) 0%, var(--bg-card) 100%);
}
.prayer-card[data-status="ON_TIME"]::before {
  background: var(--color-ontime);
  box-shadow: 0 0 10px var(--color-ontime);
}

.prayer-card[data-status="LATE"] {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.03) 0%, var(--bg-card) 100%);
}
.prayer-card[data-status="LATE"]::before {
  background: var(--color-late);
  box-shadow: 0 0 10px var(--color-late);
}

.prayer-card[data-status="QAZA"] {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.03) 0%, var(--bg-card) 100%);
}
.prayer-card[data-status="QAZA"]::before {
  background: var(--color-qaza);
  box-shadow: 0 0 10px var(--color-qaza);
}

/* Custom Segmented Picker for mobile-first dropdown alternative */
.status-pill {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.status-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-notdone);
}

.status-pill[data-status="ON_TIME"] {
  color: var(--color-ontime);
  background: var(--color-ontime-bg);
  border-color: rgba(16, 185, 129, 0.3);
}
.status-pill[data-status="ON_TIME"] .status-dot {
  background: var(--color-ontime);
  box-shadow: 0 0 6px var(--color-ontime);
}

.status-pill[data-status="LATE"] {
  color: var(--color-late);
  background: var(--color-late-bg);
  border-color: rgba(245, 158, 11, 0.3);
}
.status-pill[data-status="LATE"] .status-dot {
  background: var(--color-late);
  box-shadow: 0 0 6px var(--color-late);
}

.status-pill[data-status="QAZA"] {
  color: var(--color-qaza);
  background: var(--color-qaza-bg);
  border-color: rgba(239, 68, 68, 0.3);
}
.status-pill[data-status="QAZA"] .status-dot {
  background: var(--color-qaza);
  box-shadow: 0 0 6px var(--color-qaza);
}

/* Popover overlay for status select */
.status-dropdown {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-dropdown.show {
  opacity: 1;
  pointer-events: auto;
}

.status-opt {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.status-opt:hover {
  background: var(--bg-dropdown-hover);
  color: var(--text-primary);
}

.status-opt[data-val="ON_TIME"]:hover {
  background: var(--color-ontime-bg);
  color: var(--color-ontime);
}
.status-opt[data-val="LATE"]:hover {
  background: var(--color-late-bg);
  color: var(--color-late);
}
.status-opt[data-val="QAZA"]:hover {
  background: var(--color-qaza-bg);
  color: var(--color-qaza);
}
.status-opt[data-val="NOT_DONE"]:hover {
  background: var(--color-notdone-bg);
  color: var(--text-primary);
}

/* Amol List Cards */
.amol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.amol-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.amol-title {
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.amol-card.checked .amol-title {
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

/* Beautiful custom checkbox */
.checkbox-container {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  background: rgba(0, 0, 0, 0.15);
}

.checkbox-check {
  width: 12px;
  height: 12px;
  background: transparent;
  clip-path: polygon(14% 44%, 0 58%, 38% 95%, 100% 16%, 86% 2%, 38% 68%);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
  background-color: white;
}

.amol-card.checked .checkbox-container {
  border-color: var(--color-ontime);
  background: var(--color-ontime);
  box-shadow: 0 0 10px var(--color-ontime-glow);
}

.amol-card.checked .checkbox-check {
  transform: scale(1);
}

/* INSIGHTS VIEW STYLING */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.insights-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.insights-grid-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.stat-header {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-footer {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Circle Progress Card */
.progress-card {
  grid-column: span 2;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.progress-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.progress-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.circle-chart-container {
  position: relative;
  width: 90px;
  height: 90px;
}

.circle-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8;
}

.circle-val {
  fill: none;
  stroke: url(#emerald-grad);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Weekly breakdown grid */
.weekly-bar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.weekly-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.weekly-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.weekly-day-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.weekly-grid-cell-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
  padding: 4px;
  border-radius: 8px;
  align-items: center;
}

.weekly-cell-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--color-notdone);
  transition: var(--transition-smooth);
}

.weekly-cell-dot[data-status="ON_TIME"] { background: var(--color-ontime); }
.weekly-cell-dot[data-status="LATE"] { background: var(--color-late); }
.weekly-cell-dot[data-status="QAZA"] { background: var(--color-qaza); }
.weekly-cell-dot[data-status="NOT_DONE"] { background: rgba(255, 255, 255, 0.05); }

/* Heatmap container */
.heatmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.heatmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.heatmap-cell-weekday {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 4px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.heatmap-cell.active-day {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.heatmap-cell:hover {
  border-color: var(--accent-gold-light);
  transform: scale(1.08);
}

/* Heatmap color scales based on performance value (0-1) */
.heatmap-cell[data-score="0"] { background: rgba(255, 255, 255, 0.03); }
.heatmap-cell[data-score="1"] { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.1); }
.heatmap-cell[data-score="2"] { background: rgba(16, 185, 129, 0.35); border-color: rgba(16, 185, 129, 0.2); }
.heatmap-cell[data-score="3"] { background: rgba(16, 185, 129, 0.55); border-color: rgba(16, 185, 129, 0.4); }
.heatmap-cell[data-score="4"] { background: rgba(16, 185, 129, 0.75); border-color: rgba(16, 185, 129, 0.6); }
.heatmap-cell[data-score="5"] { 
  background: var(--color-ontime); 
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.heatmap-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.legend-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* SETTINGS & CUSTOMIZATION */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-container {
  display: flex;
  gap: 8px;
}

.input-glow-wrapper {
  flex: 1;
  position: relative;
}

.custom-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}
select option,
.custom-input option {
  background-color: var(--bg-card-solid);
  color: var(--text-primary);
}

.custom-input:focus {
  border-color: var(--accent-teal-bright);
  box-shadow: 0 0 10px var(--border-glow);
  background: rgba(30, 43, 68, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal) 0%, #064e43 100%);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 92, 77, 0.3);
  border-color: rgba(20, 184, 166, 0.5);
}

.btn-primary:active {
  transform: translateY(1px);
}

.settings-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.settings-item-label {
  font-size: 0.95rem;
  font-weight: 500;
}

.btn-delete {
  background: transparent;
  border: none;
  color: var(--color-qaza);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

.danger-zone {
  margin-top: 10px;
  border-color: rgba(239, 68, 68, 0.2);
}

.danger-zone-title {
  color: var(--color-qaza);
}

.btn-danger {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: white;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-top: 12px;
}

.btn-danger:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Offline Banner */
.offline-banner {
  background: rgba(245, 158, 11, 0.9);
  color: #0b0f19;
  text-align: center;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  position: sticky;
  top: 75px;
  z-index: 99;
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.3s ease;
}

/* BOTTOM NAVIGATION */
nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 20px;
  border-radius: 0;
  z-index: 100;
  max-width: 540px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  flex: 1;
  height: 100%;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  transition: var(--transition-smooth);
}

.nav-item-label {
  font-size: 0.7rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-item.active {
  color: var(--accent-teal-bright);
}

.nav-item.active .nav-item-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.4));
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: var(--accent-teal-bright);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 10px var(--accent-teal-bright);
}

/* ANIMATIONS & KEYFRAMES */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes pulse-glow {
  from { filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.5)); }
  to { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.9)); }
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(13, 92, 77, 0.95);
  border: 1px solid var(--accent-teal-bright);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* PWA Install Promo bar */
.install-promo {
  background: linear-gradient(135deg, var(--accent-teal) 0%, #083c32 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 4px;
}

.install-promo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.install-promo-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.install-promo-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.btn-install {
  background: var(--accent-gold);
  color: #0b0f19;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-install:hover {
  background: var(--accent-gold-light);
  transform: translateY(-1px);
}

/* Custom modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-qaza);
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger-modal {
  flex: 1;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: white;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-danger-modal:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Light Theme overrides for specific components */
.light-theme .heatmap-cell {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.03);
}
.light-theme .heatmap-cell.active-day {
  border-color: rgba(15, 23, 42, 0.08);
}
.light-theme .heatmap-cell[data-score="0"] {
  background: rgba(15, 23, 42, 0.03);
}
.light-theme .heatmap-cell[data-score="1"] {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.15);
}
.light-theme .heatmap-cell[data-score="2"] {
  background: rgba(16, 185, 129, 0.35);
  border-color: rgba(16, 185, 129, 0.3);
}
.light-theme .heatmap-cell[data-score="3"] {
  background: rgba(16, 185, 129, 0.55);
  border-color: rgba(16, 185, 129, 0.45);
}
.light-theme .heatmap-cell[data-score="4"] {
  background: rgba(16, 185, 129, 0.75);
  border-color: rgba(16, 185, 129, 0.6);
}
.light-theme .heatmap-cell[data-score="5"] {
  background: var(--color-ontime);
  border-color: rgba(16, 185, 129, 0.3);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}
.light-theme .weekly-grid-cell-container {
  background: rgba(15, 23, 42, 0.04);
}
.light-theme .weekly-cell-dot[data-status="NOT_DONE"] {
  background: rgba(15, 23, 42, 0.05);
}
.light-theme .btn-secondary {
  background: rgba(15, 23, 42, 0.04);
}
.light-theme .btn-secondary:hover {
  background: rgba(15, 23, 42, 0.08);
}
.light-theme select option,
.light-theme .custom-input option {
  background-color: #ffffff;
  color: var(--text-primary);
}

/* Theme Selector Grid & Button Styles */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-btn svg {
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.theme-btn span {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-family);
  transition: var(--transition-smooth);
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.theme-btn:hover svg {
  color: var(--text-primary);
}

.theme-btn.active {
  background: var(--color-ontime-bg);
  border-color: var(--color-ontime);
  color: var(--color-ontime);
  box-shadow: 0 0 12px var(--color-ontime-glow);
}

.theme-btn.active svg {
  color: var(--color-ontime);
  transform: scale(1.1);
}

.light-theme .theme-btn {
  background: rgba(15, 23, 42, 0.02);
}

.light-theme .theme-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-primary);
  border-color: rgba(15, 23, 42, 0.15);
}

/* Install Promo Light Theme overrides */
.light-theme .install-promo {
  background: linear-gradient(135deg, rgba(13, 92, 77, 0.06) 0%, rgba(13, 92, 77, 0.12) 100%);
  border-color: rgba(13, 92, 77, 0.15);
}

.light-theme .btn-install {
  background: var(--accent-teal);
  color: white;
}

.light-theme .btn-install:hover {
  background: var(--accent-teal-bright);
}

/* Prayer-wise breakdown styles */
.prayer-breakdown-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.prayer-stat-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prayer-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prayer-stat-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.prayer-stat-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.prayer-stat-bar-wrapper {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-stats);
}

.prayer-stat-subbar {
  height: 100%;
  transition: var(--transition-smooth);
}

.prayer-stat-percentages {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.prayer-stat-pct-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prayer-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

