/* === SALAH (Farz Only — Fully Responsive) === */

.prayer-times-row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  scrollbar-width: none;
}

.prayer-times-row::-webkit-scrollbar {
  display: none;
}

.location-notice {
  margin: calc(-1 * var(--space-4)) 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  border-radius: var(--radius-md);
  text-align: center;
}

.salah-date-nav-modern {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 4px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--color-accent-gold) 10%, var(--color-surface-card)) !important;
  border: 1px solid color-mix(in srgb, var(--color-accent-gold) 35%, var(--color-border)) !important;
  box-shadow: var(--shadow-sm) !important;
  backdrop-filter: blur(10px) !important;
  user-select: none !important;
}

.salah-nav-arrow-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  background: color-mix(in srgb, var(--color-accent-gold) 12%, transparent) !important;
  color: var(--color-accent-gold) !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
  flex-shrink: 0 !important;
}

.salah-nav-arrow-btn:hover {
  background: color-mix(in srgb, var(--color-accent-gold) 24%, transparent) !important;
  transform: scale(1.08) !important;
}

.salah-nav-arrow-btn:active {
  transform: scale(0.94) !important;
}

.salah-date-center-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 76px !important;
  padding: 0 6px !important;
  background: transparent !important;
}

#salah-date-label {
  color: var(--color-text-primary) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#salah-date-sub {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--color-accent-gold) !important;
  opacity: 1 !important;
  line-height: 1.1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

[data-theme="light"] .salah-date-nav-modern {
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] #salah-date-label {
  color: #0F172A !important;
}

[data-theme="light"] #salah-date-sub {
  color: #B45309 !important;
}

[data-theme="light"] .salah-nav-arrow-btn {
  background: rgba(180, 83, 9, 0.08) !important;
  color: #B45309 !important;
}

[data-theme="light"] .salah-nav-arrow-btn:hover {
  background: rgba(180, 83, 9, 0.16) !important;
}

[hidden] {
  display: none !important;
}

.prayer-time-pill {
  flex: 1 0 70px;
  text-align: center;
  padding: var(--space-2) var(--space-3);
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 64px;
  position: relative;
  overflow: hidden;
  animation: borderBreath 4s infinite ease-in-out;
}

.prayer-time-pill:hover {
  transform: translateY(-2px);
  animation: none;
  border-color: var(--color-border-active);
}

.prayer-time-pill.next {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(56, 189, 248, 0.1));
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.15), inset 0 0 0 1.5px var(--color-border-active);
}

.prayer-time-pill .pill-icon {
  font-size: 1.2rem;
  margin-bottom: 1px;
}

.prayer-time-pill .pill-name {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-semibold);
}

.prayer-time-pill .pill-time {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  margin: 1px 0;
}

.pill-next-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: var(--fw-bold);
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(167, 139, 250, 0.15);
  animation: pulse 2s infinite;
}

/* Stats Grid */
.salah-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  width: 100%;
}

@media (min-width: 600px) {
  .salah-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .salah-stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.salah-stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation:
    popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    borderBreath 5s infinite ease-in-out;
}

.salah-stat-card:nth-child(1) {
  animation-delay: 0.05s, 0s;
}

.salah-stat-card:nth-child(2) {
  animation-delay: 0.1s, 1s;
}

.salah-stat-card:nth-child(3) {
  animation-delay: 0.15s, 2s;
}

.salah-stat-card:nth-child(4) {
  animation-delay: 0.2s, 3s;
}

.salah-stat-card:nth-child(5) {
  animation-delay: 0.25s, 4s;
}

.salah-stat-card:hover {
  border-color: var(--color-border-active);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.salah-stat-ring {
  flex-shrink: 0;
}

.salah-stat-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.salah-stat-card:hover .salah-stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.salah-stat-val {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.salah-stat-card.stat-prayed .salah-stat-val {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.salah-stat-card.stat-perfect .salah-stat-val {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.salah-stat-card.stat-consistent .salah-stat-val {
  background: linear-gradient(135deg, #10b981, #3fb950);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.salah-stat-card.stat-points .salah-stat-val {
  background: linear-gradient(135deg, #facc15, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.salah-stat-label {
  font-size: 10px;
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes lockPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes borderBreath {
  0% {
    border-color: var(--color-border);
    box-shadow: 0 0 0 transparent;
  }

  50% {
    border-color: var(--color-border-active);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
  }

  100% {
    border-color: var(--color-border);
    box-shadow: 0 0 0 transparent;
  }
}

@keyframes textShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Cards Container */
.salah-cards-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Prayer Card */
.salah-prayer-card {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: salahCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.salah-prayer-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right,
      var(--color-accent-primary),
      var(--color-accent-teal));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.salah-prayer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.salah-prayer-card:hover::before {
  opacity: 1;
}

.salah-prayer-card.has-status {
  border-color: var(--color-border-active);
  background: var(--color-glass-active);
}

.salah-prayer-card.status-missed {
  border-color: rgba(248, 113, 113, 0.25);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08), rgba(239, 68, 68, 0.01));
  box-shadow: 0 8px 24px rgba(248, 113, 113, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.salah-prayer-card.status-jamaat {
  border-color: rgba(63, 185, 80, 0.25);
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.08), rgba(46, 117, 56, 0.01));
  box-shadow: 0 8px 24px rgba(63, 185, 80, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.salah-prayer-card.status-alone {
  border-color: rgba(88, 166, 255, 0.25);
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(37, 99, 235, 0.01));
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.salah-prayer-card.status-qaza {
  border-color: rgba(210, 153, 34, 0.25);
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.08), rgba(180, 83, 9, 0.01));
  box-shadow: 0 8px 24px rgba(210, 153, 34, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes salahCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Prayer Header */
.salah-prayer-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.salah-prayer-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.salah-prayer-card:hover .salah-prayer-icon-wrap {
  transform: scale(1.05) rotate(-2deg);
}

.salah-prayer-emoji {
  font-size: 1.3rem;
}

.salah-prayer-info {
  flex: 1;
  min-width: 0;
}

.salah-prayer-name {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}

.salah-prayer-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.salah-prayer-status-badge {
  flex-shrink: 0;
}

/* Status Chip */
.salah-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
}

.salah-status-pending {
  background: var(--color-border-muted);
  color: var(--color-text-muted);
  border-color: var(--color-glass-hover);
}

/* Option Selector */
.salah-status-selector {
  margin-top: var(--space-2);
}

.salah-options-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  font-weight: var(--fw-medium);
}

.salah-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.salah-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--space-3) var(--space-2);
  background: var(--color-glass);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 76px;
  color: var(--color-text-primary);
}

.salah-option-btn:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--color-border-active);
  box-shadow: var(--shadow-md);
}

.salah-option-btn:active {
  transform: scale(0.94);
}

.salah-opt-icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.salah-option-btn:hover .salah-opt-icon {
  transform: scale(1.15) translateY(-2px);
}

.salah-opt-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  transition: color 0.3s ease;
}

.salah-option-btn:hover .salah-opt-label {
  color: var(--color-accent-teal);
}

.salah-opt-desc {
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.2;
}

.salah-opt-pts {
  font-size: 8px;
  color: var(--color-accent-teal);
  font-weight: var(--fw-bold);
  margin-top: 1px;
}

/* Locked Result (permanent, no edit) */
.salah-locked-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  animation: successSplash 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes successSplash {
  0% {
    transform: scale(0.95);
    opacity: 0;
    background: var(--color-glass-active);
  }

  50% {
    transform: scale(1.02);
    background: var(--color-glass-hover);
  }

  100% {
    transform: scale(1);
    opacity: 1;
    background: var(--color-glass);
  }
}

.salah-locked-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes iconPop {
  0% {
    transform: scale(0) rotate(-15deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

.salah-locked-info {
  flex: 1;
  min-width: 0;
}

.salah-locked-status {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

.salah-locked-desc {
  font-size: 10px;
  color: var(--color-text-secondary);
  margin-top: 1px;
  font-weight: var(--fw-semibold);
}

.salah-lock-svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
  opacity: 0.4;
}

[data-theme="light"] .prayer-time-pill {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .salah-stat-card {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.12);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.06);
}

[data-theme="light"] .salah-prayer-card {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.04);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .salah-prayer-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .salah-cal-cell.empty {
  background: rgba(15, 23, 42, 0.03) !important;
}

[data-theme="light"] #salah-cal-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
  box-shadow: 0 15px 50px rgba(99, 102, 241, 0.2) !important;
  color: #1E293B !important;
}

[data-theme="light"] .tt-header {
  border-bottom-color: #F1F5F9 !important;
}

[data-theme="light"] .tt-date {
  color: #1E293B !important;
}

[data-theme="light"] .salah-cal-day {
  color: #0F172A !important;
  opacity: 1 !important;
}

[data-theme="light"] .tt-prayer {
  color: #475569 !important;
}

@keyframes liveGlossy {

  0%,
  100% {
    box-shadow:
      inset 0 2px 10px rgba(255, 255, 255, 0.4),
      0 0 10px rgba(16, 185, 129, 0.3);
    filter: brightness(1.1);
  }

  50% {
    box-shadow:
      inset 0 4px 20px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(16, 185, 129, 0.6);
    filter: brightness(1.3);
    transform: scale(1.08);
  }
}

/* Custom Calendar Tooltip */
.salah-cal-tooltip {
  position: fixed;
  z-index: 1000;
  width: 220px;
  background: rgba(12, 19, 34, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-hover);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--color-surface-nested) inset;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: bottom center;
  opacity: 1;
}

.salah-cal-tooltip.hidden {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  pointer-events: none;
  display: none;
}

.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
}

.tt-date {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}

.tt-score {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--color-accent-teal);
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.tt-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
}

.tt-prayer {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-secondary);
}

.tt-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: var(--fw-semibold);
}

.tt-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {

  .salah-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .salah-prayer-card {
    padding: var(--space-3);
  }

  .salah-prayer-header {
    gap: var(--space-2);
    margin-bottom: var(--space-2);
  }

  .salah-prayer-icon-wrap {
    width: 38px;
    height: 38px;
  }

  .salah-prayer-emoji {
    font-size: 1.1rem;
  }

  .salah-prayer-name {
    font-size: var(--text-sm);
  }

  .salah-prayer-time {
    font-size: 10px;
  }

  .salah-option-btn {
    min-height: 68px;
    padding: var(--space-2);
  }

  .salah-locked-result {
    padding: var(--space-2);
    gap: var(--space-2);
  }

  .prayer-time-pill {
    min-width: 58px;
    padding: var(--space-2);
  }

  .prayer-time-pill .pill-time {
    font-size: var(--text-xs);
  }

  .salah-cal-cell {
    border-radius: 4px;
  }

  .salah-cal-day {
    font-size: 7px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .salah-options-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 769px) {
  .salah-prayer-card {
    padding: var(--space-5);
  }

  .salah-prayer-icon-wrap {
    width: 48px;
    height: 48px;
  }

  .salah-prayer-name {
    font-size: var(--text-lg);
  }

  .salah-option-btn {
    min-height: 84px;
  }
}



@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}


/* === MERGED FROM WITR-FIX.CSS === */
/* =============================================
   NIGHT PRAYERS — PREMIUM REDESIGN
   ============================================= */

:root {
  --chart-inactive: rgba(255,255,255,0.08);
  --chart-axis: rgba(255,255,255,0.5);
  --chart-grid: rgba(255,255,255,0.05);
}

[data-theme="light"] {
  --chart-inactive: rgba(0,0,0,0.05);
  --chart-axis: rgba(15, 23, 42, 0.6);
  --chart-grid: rgba(15, 23, 42, 0.08);
}

.night-prayers-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.nafl-night-card {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nafl-night-card {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

/* Individual Card Accents */
.nafl-tahajjud {
  border-left: 4px solid #818CF8;
}

.nafl-witr {
  border-left: 4px solid #FBBF24;
  padding: 0 !important; /* Managed by witr-modern-layout */
}

/* Header Refinement */
.night-card-header {
  margin-bottom: 20px;
}

.night-icon-orb {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.15);
}

.night-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.night-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Tahajjud Rakat Dial — Modern Row */
.rakat-selector-dial {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rakat-selector-dial::-webkit-scrollbar { display: none; }

.rakat-dial-btn {
  flex: 0 0 54px;
  height: 64px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--color-text-secondary);
}

[data-theme="light"] .rakat-dial-btn {
  background: #F5F3FF;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.05);
}

.rakat-dial-btn:hover:not(:disabled) {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(129, 140, 248, 0.15);
}

.rakat-dial-btn.active {
  background: linear-gradient(135deg, #6366F1, #818CF8);
  border-color: #818CF8;
  color: #fff;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.rakat-num { font-size: 18px; font-weight: 800; line-height: 1; }
.rakat-unit { font-size: 9px; font-weight: 700; opacity: 0.6; margin-top: 2px; text-transform: uppercase; }

/* Witr Card Layout */
.witr-modern-layout {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.witr-icon-orb {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.witr-icon-orb svg { width: 26px; height: 26px; }

.witr-title { font-size: 20px; font-weight: 800; }

.witr-toggle-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-left: auto;
}

.witr-toggle-circle svg {
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.4s ease;
}

.witr-toggle-circle.active {
  background: #FBBF24;
  border-color: #FBBF24;
  color: #fff;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.witr-toggle-circle.active svg {
  opacity: 1;
  transform: scale(1);
}

/* Animations & Effects */
.nafl-night-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 70%);
  pointer-events: none;
}

.nafl-tahajjud.witr-done, .nafl-witr.witr-done {
  /* Subtle glow when complete */
}

.witr-done .witr-icon-orb {
  background: rgba(251, 191, 36, 0.2);
  transform: scale(1.05) rotate(5deg);
}

/* =============================================
   LIGHT MODE OPTIMIZATIONS (HIGH CONTRAST)
   ============================================= */

[data-theme="light"] .nafl-night-card {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .nafl-night-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

[data-theme="light"] .night-title,
[data-theme="light"] .witr-title {
  color: #0F172A; /* Maximum depth navy */
}

[data-theme="light"] .night-subtitle,
[data-theme="light"] .witr-subtitle {
  color: #334155; /* Higher contrast slate */
  font-weight: 700;
}

[data-theme="light"] .rakat-dial-btn {
  background: #F5F3FF;
  border-color: rgba(99, 102, 241, 0.15);
  color: #1E293B;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .rakat-dial-btn:hover:not(.active) {
  background: #EDE9FE;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .rakat-dial-btn .rakat-num {
  color: #0F172A;
}

[data-theme="light"] .rakat-dial-btn .rakat-unit {
  color: #475569;
  opacity: 1;
}

[data-theme="light"] .witr-toggle-circle {
  border-color: #CBD5E1;
}

/* Sunnah Chips Light Mode Visibility */
[data-theme="light"] .nafl-card-modern {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nafl-name {
  color: #0F172A;
  font-weight: 900;
}

[data-theme="light"] .nafl-rakat {
  color: #475569;
  font-weight: 800;
}

[data-theme="light"] .nafl-section-title-text {
  /* Handled by goals.css premium gradient rule */
}

/* Global Icon Enhancements for Light Mode */
[data-theme="light"] .night-icon-orb,
[data-theme="light"] .witr-icon-orb,
[data-theme="light"] .nafl-icon-ring {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

[data-theme="light"] .night-icon-orb svg,
[data-theme="light"] .witr-icon-orb svg,
[data-theme="light"] .nafl-icon-ring svg {
  filter: saturate(1.8) contrast(1.2); /* Boost colors for light mode visibility */
}

/* Date Navigation Visibility */
[data-theme="light"] .nafl-date-nav .date-nav-btn {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #1E293B;
}

[data-theme="light"] .badge-purple {
  background: #6366F1;
  color: #FFFFFF;
  border: none;
  font-weight: 800;
}

/* Section Header Visibility */
[data-theme="light"] .section-title {
  color: #0F172A;
}

[data-theme="light"] .salah-shimmer-text {
  background: none;
  -webkit-text-fill-color: initial;
  color: #0F172A;
}

/* Ensure emojis and symbols pop */
[data-theme="light"] .icon, 
[data-theme="light"] .nafl-section-title-text::before,
[data-theme="light"] .mujahid-habit-option-icon,
[data-theme="light"] .mujahid-icon-option svg {
  filter: saturate(1.5) contrast(1.1);
}

/* Dhikr History Card Modernization */
.dhikr-log-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-surface-nested);
  border-radius: 28px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.dhikr-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.dhikr-empty-orb {
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  animation: orb-pulse-soft 3s infinite ease-in-out;
}

@keyframes orb-pulse-soft {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); }
}

.dhikr-empty-text {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
  max-width: 200px;
  line-height: 1.5;
}

#dhikr-session-history {
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom scrollbar for better look */
#dhikr-session-history::-webkit-scrollbar {
  width: 5px;
}
#dhikr-session-history::-webkit-scrollbar-track {
  background: transparent;
}
#dhikr-session-history::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.dhikr-session-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default to 1 column for clean look */
  gap: 8px;
  padding: 12px;
}

/* On wider screens, 2 columns */
@media (min-width: 400px) {
  .dhikr-session-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dhikr-session-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.dhikr-session-item:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent-primary);
}

.ds-icon {
  color: var(--color-accent-primary);
  opacity: 0.8;
}

.ds-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.ds-count {
  font-size: 11px;
  color: var(--color-accent-gold);
  font-weight: 800;
}

/* Light Mode Support */
[data-theme="light"] .dhikr-log-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .dhikr-session-item {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}

[data-theme="light"] .ds-name {
  color: #1E293B !important;
}

/* Dhikr Premium Button Enhancements */
.dhikr-main-tap-btn {
  /* High-End Professional Mesh Gradient */
  background-color: #6366f1 !important;
  background-image: 
    radial-gradient(at 0% 0%, #6366f1 0, transparent 50%), 
    radial-gradient(at 50% 0%, #3b82f6 0, transparent 50%), 
    radial-gradient(at 100% 0%, #06b6d4 0, transparent 50%), 
    radial-gradient(at 100% 50%, #10b981 0, transparent 50%), 
    radial-gradient(at 100% 100%, #f59e0b 0, transparent 50%), 
    radial-gradient(at 50% 100%, #f97316 0, transparent 50%), 
    radial-gradient(at 0% 100%, #ef4444 0, transparent 50%), 
    radial-gradient(at 0% 50%, #ec4899 0, transparent 50%) !important;
  background-size: 200% 200% !important;
  animation: dhikrMeshFluid 20s ease infinite !important;
  border: 4px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 40px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
  position: relative;
  overflow: hidden;
}

@keyframes dhikrMeshFluid {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.dhikr-main-tap-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
}

/* Ensure the count text is clean and professional */
.dhikr-tap-count {
  position: relative;
  z-index: 10;
  font-size: 110px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  letter-spacing: -5px;
  transform: none !important; /* Remove any rotation */
  animation: none !important;
}

.dhikr-tap-count {
  font-size: 100px !important;
  font-weight: 900 !important;
  color: #FFFFFF !important;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
  letter-spacing: -4px;
  z-index: 10 !important;
}

.tap-wave.wave-1 {
  background: rgba(255, 255, 255, 0.15); /* Glassy wave */
}

.tap-wave.wave-2 {
  background: rgba(255, 255, 255, 0.1) !important; /* Glassy wave */
}

.dhikr-side-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.dhikr-side-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #ff3b30 !important;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.3) !important;
  color: #ff3b30 !important;
}

[data-theme="light"] .dhikr-main-tap-btn {
  box-shadow: 0 25px 60px rgba(99, 102, 241, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="light"] .dhikr-side-btn {
  background: #F5F3FF !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
  color: #1E293B !important;
}

[data-theme="light"] .mujahid-add-pillar {
  background: #FFFFFF !important;
  border-color: #6366F1 !important;
  color: #6366F1 !important;
}

.dhikr-preset-card {
  min-width: 90px;
  max-width: 110px;
  height: 90px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
  flex-shrink: 0;
  text-align: center;
  overflow: hidden;
}

.dhikr-preset-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.dhikr-preset-card.active {
  background: rgba(13, 148, 136, 0.12) !important;
  border: 2px solid #0d9488 !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.2) !important;
  transform: scale(1.02);
}

.dhikr-preset-name {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.02em !important;
  color: var(--color-text-secondary) !important;
  transition: color 0.2s ease;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: initial !important;
  animation: none !important;
  filter: none !important;
  text-shadow: none !important;
  line-height: 1.25 !important;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.dhikr-preset-card.active .dhikr-preset-name {
  color: #0d9488 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Light Mode Support */
[data-theme="light"] .dhikr-preset-card {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}

[data-theme="light"] .dhikr-preset-card.active {
  background: #E6F4F1 !important;
  border-color: #0d9488 !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.15) !important;
}

[data-theme="light"] .dhikr-preset-name {
  color: #0f172a !important;
  font-weight: 800 !important;
  -webkit-text-fill-color: #0f172a !important;
}

[data-theme="light"] .dhikr-preset-card.active .dhikr-preset-name {
  color: #047857 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

.dhikr-hadith-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

[data-theme="light"] .dhikr-hadith-text {
  color: #1E293B !important;
}

/* Ensure the marquee container itself has the premium gradient if needed */
.dhikr-marquee {
  font-weight: 800 !important;
}

/* Modern Custom Dhikr Modal */
#dhikr-add-modal .modal {
  background: #0c1322;
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}

#dhikr-add-modal .modal-title {
  color: #A78BFA !important;
  font-size: 24px;
  font-weight: 900;
}

#dhikr-add-modal .input-label {
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 8px;
}

#dhikr-add-modal .input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: #fff;
  padding: 14px 18px;
  transition: all 0.3s ease !important;
}

#dhikr-add-modal .input:focus {
  background: rgba(255,255,255,0.08);
  border-color: #A78BFA;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.1) !important;
}

#dhikr-add-modal .btn-gold {
  background: #FBBF24 !important;
  color: #1E293B !important;
  border-radius: 16px;
  font-weight: 800;
  padding: 12px 24px;
  border: none;
  transition: all 0.3s ease !important;
}

#dhikr-add-modal .btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3) !important;
}

#dhikr-add-modal .btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: #fff;
}

/* Light Mode Overrides */
[data-theme="light"] #dhikr-add-modal .modal {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

[data-theme="light"] #dhikr-add-modal .input {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #1E293B !important;
}

[data-theme="light"] #dhikr-add-modal .btn-secondary {
  color: #64748B !important;
}

/* Premium Animations for Sunnah Muakkadah Cards - Forced Clean State */
.nafl-card-modern {
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
  will-change: transform, opacity, border-color;
}

/* Staggered entrance for Sunnah cards */
.nafl-card-modern:nth-child(1) { animation-delay: 0.1s !important; }
.nafl-card-modern:nth-child(2) { animation-delay: 0.2s !important; }
.nafl-card-modern:nth-child(3) { animation-delay: 0.3s !important; }
.nafl-card-modern:nth-child(4) { animation-delay: 0.4s !important; }
.nafl-card-modern:nth-child(5) { animation-delay: 0.5s !important; }

/* Enhanced Breathing Glow for Active Cards */
.nafl-card-modern.active {
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both, 
             borderBreathGlow 4s infinite ease-in-out !important;
  border-width: 1.5px !important;
}

@keyframes borderBreathGlow {
  0%, 100% { 
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0px transparent;
  }
  50% { 
    border-color: rgba(52, 211, 153, 0.8);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
  }
}
@media (max-width: 480px) {
  .nafl-night-card { padding: 16px; border-radius: 24px; }
  .rakat-dial-btn { flex: 0 0 48px; height: 58px; border-radius: 14px; }
  .rakat-num { font-size: 16px; }
  .witr-modern-layout { padding: 16px; }
  .witr-icon-orb { width: 46px; height: 46px; }
}

/* Section Settings Button - Premium Style */
.section-settings-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-gold, #f59e0b);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.section-settings-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.section-settings-btn:active {
  transform: scale(0.94);
}

.section-settings-btn svg {
  width: 18px;
  height: 18px;
}

[data-theme="light"] .section-settings-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #b45309;
}

[data-theme="light"] .section-settings-btn:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #92400e;
}

/* Salah Next Prayer Live Glow */
.salah-prayer-card.is-next {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.15), var(--shadow-lg);
  position: relative;
  z-index: 2;
}

/* Salah Next Prayer Inline Badge */
.salah-next-badge-inline {
  display: inline-flex;
  align-items: center;
  background: var(--color-accent-teal);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-left: 8px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
  animation: pulseOpacity 2s infinite;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.96); }
}

/* Prevent Flickering & Layout Shifts in Salah */
#salah-cards {
  min-height: 300px;
  transition: opacity 0.3s ease;
  contain: layout style;
}

.salah-prayer-card {
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0); /* Force GPU acceleration */
}

/* Smooth entrance for re-rendered cards */
.salah-prayer-card.anim-fade-in {
  animation: cardAppear 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Calendar Optimization */
.salah-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 4px;
  contain: content;
}

.salah-cal-cell {
  aspect-ratio: 1/1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-weight: 700;
  font-size: 11px;
  transition: all 0.2s ease;
  min-width: 0;
}

@media (max-width: 380px) {
  .salah-calendar { gap: 4px; }
  .salah-cal-cell { border-radius: 8px; font-size: 10px; }
  .salah-cal-day { transform: scale(0.9); }
}

/* Empty Stats Styling */
.salah-empty-stats {
  padding: var(--space-6) var(--space-4);
  text-align: center;
  background: rgba(255,255,255,0.02);
  border-radius: 24px;
  border: 1px dashed rgba(255,255,255,0.08);
  margin-bottom: var(--space-4);
}

.salah-empty-title {
  font-weight: 800;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: 4px;
}

.salah-empty-subtitle {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Analysis Dashboard - Premium Modern UI */
.analysis-dashboard {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.analysis-hero-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif) !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  font-style: italic !important;
  line-height: 1.15 !important;
  letter-spacing: -0.03em !important;
  background: linear-gradient(135deg, #c084fc, #a855f7, #818cf8) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

[data-theme="light"] .analysis-hero-title {
  background: linear-gradient(135deg, #7c3aed, #6366f1, #4f46e5) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

[data-theme="light"] .analysis-date-nav-modern {
  background: rgba(124, 58, 237, 0.08) !important;
  border-color: rgba(124, 58, 237, 0.22) !important;
}

[data-theme="light"] .analysis-month-label {
  color: #6d28d9 !important;
}

[data-theme="light"] .btn-report-link {
  background: rgba(124, 58, 237, 0.1) !important;
  border-color: rgba(124, 58, 237, 0.25) !important;
  color: #6d28d9 !important;
}

[data-theme="light"] .btn-report-link:hover {
  background: rgba(124, 58, 237, 0.18) !important;
  border-color: rgba(124, 58, 237, 0.4) !important;
}

.shs-aura-container {
  position: relative;
  background: radial-gradient(circle at top, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 32px;
  padding: var(--space-8) var(--space-4);
  margin-bottom: var(--space-2);
  border: 1px solid rgba(255,255,255,0.03);
  text-align: center;
}

[data-theme="light"] .shs-aura-container {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .shs-label {
  color: #64748B !important;
  font-weight: 700;
}

[data-theme="light"] .rating-desc {
  color: #334155 !important;
  font-weight: 600;
}

[data-theme="light"] .weekly-y-axis span,
[data-theme="light"] .x-label span {
  color: #475569 !important;
  font-weight: 700;
}

.shs-val {
  color: var(--color-text-primary);
  line-height: 1;
}

.shs-aura {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 2px solid rgba(255,255,255,0.1);
  position: relative;
  margin: 0 auto var(--space-6);
  box-shadow: 
    0 0 50px -10px var(--aura-color),
    inset 0 0 20px rgba(255,255,255,0.05);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .shs-aura {
  background: #FFFFFF !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
  box-shadow: 
    0 15px 45px rgba(99, 102, 241, 0.12), 
    0 0 40px -5px var(--aura-color) !important;
}
[data-theme="light"] .shs-val {
  color: var(--aura-color, #7c3aed) !important;
  -webkit-text-fill-color: var(--aura-color, #7c3aed) !important;
  text-shadow: 0 4px 16px color-mix(in srgb, var(--aura-color, #7c3aed) 40%, transparent) !important;
}
[data-theme="light"] .shs-aura.mini { border-color: rgba(99, 102, 241, 0.25); }

.shs-aura.mini {
  width: 72px;
  height: 72px;
  margin: 0;
  box-shadow: 0 0 25px -5px var(--aura-color);
  border-width: 2px;
  animation: shs-breathing 3s ease-in-out infinite;
  background: var(--color-bg-primary);
  border-color: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@keyframes shs-breathing {
  0%, 100% { box-shadow: 0 0 20px -5px var(--aura-color); transform: scale(1); }
  50% { box-shadow: 0 0 35px 2px var(--aura-color); transform: scale(1.05); }
}
.shs-aura.mini::after, .shs-aura.mini::before {
  display: none;
}

/* Animated Outer Ring */
.shs-aura::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid var(--aura-color);
  opacity: 0.2;
  mask-image: linear-gradient(to bottom, black, transparent);
  animation: pulse-ring 3s ease-out infinite;
}

.shs-val {
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px var(--aura-color);
  line-height: 1;
}

.shs-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--aura-color);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 4px;
}

.shs-rating-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 100px;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.shs-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  opacity: 0.8;
}

/* Weekly Trend Sparkline */
.weekly-trend-container {
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: var(--space-5);
}
[data-theme="light"] .weekly-trend-container {
  background: #ffffff;
  border-color: rgba(0,0,0,0.05);
  box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}
[data-theme="light"] .weekly-title span:first-child {
  color: #0F172A;
}

.weekly-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-report-link {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #c084fc;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-report-link:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgba(168, 85, 247, 0.6);
}

.btn-report-link svg {
  opacity: 0.8;
}

.weekly-chart-wrapper {
  display: flex;
  gap: 10px;
  height: 200px;
  padding-bottom: 10px;
}

.weekly-y-axis {
  width: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100% - 45px);
  font-size: 10px;
  font-weight: 700;
  color: var(--chart-axis);
  text-align: right;
  padding: 0;
  margin: 0;
  margin-top: -6px; /* Offset to center text on lines */
}

.weekly-y-axis span {
  height: 12px;
  line-height: 12px;
  display: block;
}

.weekly-chart-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.weekly-chart-area {
  flex: 1;
  position: relative;
  border-left: 2px solid var(--chart-grid);
  padding: 20px 10px 0 10px; /* Space for top labels */
}

.grid-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  border-bottom: 1px dashed var(--chart-grid);
  z-index: 1;
}

.bars-container {
  position: absolute;
  inset: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.bar-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.bar-score {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  white-space: nowrap;
  pointer-events: none;
}

.bar-fill {
  width: 18px;
  height: 100%;
  background: var(--color-border);
  border-radius: 4px 4px 0 0;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bar-fill.active {
  background: linear-gradient(to top, var(--bar-color), #fff);
  box-shadow: 0 0 15px var(--bar-color);
}

.weekly-x-axis {
  height: 45px;
  display: flex;
  flex-direction: column;
}

.baseline-line {
  height: 2px;
  background: var(--chart-grid);
  width: 100%;
  opacity: 0.5;
}

.x-labels {
  display: flex;
  justify-content: space-between;
  padding: 10px 10px 0 10px;
}

.x-label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--chart-axis);
}

/* Detailed Grid */
.shs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.shs-card {
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .shs-card {
  background: #FFFFFF !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .shs-card-val {
  color: #0F172A !important;
}

[data-theme="light"] .shs-card-label {
  color: #64748B !important;
}

.shs-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shs-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shs-card-info {
  display: flex;
  flex-direction: column;
}

.shs-card-val {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.1;
}

.max-val {
  font-size: 0.65rem;
  opacity: 0.4;
  font-weight: 600;
  margin-left: 2px;
}

.shs-card-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.sub-label {
  color: var(--color-accent-gold);
  font-size: 8px;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.1; }
  100% { transform: scale(1); opacity: 0.3; }
}

/* Rainbow Glow Text Animation */
.live-glow-text {
  background: linear-gradient(
    to right, 
    #ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6, #ef4444
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-glow-pulse 4s linear infinite;
  font-weight: 900;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.1));
}

@keyframes rainbow-glow-pulse {
  0% { 
    background-position: 0% center;
    filter: drop-shadow(0 0 2px rgba(239,68,68,0.3));
  }
  25% {
    filter: drop-shadow(0 0 5px rgba(16,185,129,0.4));
  }
  50% { 
    background-position: 200% center;
    filter: drop-shadow(0 0 8px rgba(59,130,246,0.4));
  }
  75% {
    filter: drop-shadow(0 0 5px rgba(139,92,246,0.4));
  }
  100% { 
    background-position: 0% center;
    filter: drop-shadow(0 0 2px rgba(239,68,68,0.3));
  }
}
