* {
  font-family: "tajawal", sans-serif;
  box-sizing: border-box;
  user-select: none;
}
.azkar-page-head {
  text-align: center;
  padding: 1.5rem 1rem 1.2rem;
  border-bottom: 1px solid rgba(13, 148, 136, 0.12);
  position: relative;
  background: var(--color-bg);
}
.azkar-page-head img {
  width: 150px;
  margin-bottom: 0.3rem;
}

.azkar-page-head .back-home:active {
  transform: scale(0.95);
  background: rgba(13, 148, 136, 0.22);
}
/* ✅ أيقونة الهيدر */
.azkar-page-head svg.icon-hsn {
  width: 150px;
  height: auto;
  margin-bottom: 0.3rem;
  color: var(--color-teal-dark); /* اللون الأساسي */
  display: inline-block;
}
[data-theme="dark"] .azkar-page-head svg.icon-hsn {
  color: var(--color-teal-light); /* لون الوضع الليلي */
}
.azkar-page-head h1 {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.azkar-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  padding: 1.2rem 1rem;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
  max-width: 700px;
  margin: 0 auto;
  grid-auto-rows: min-content;   
  align-items: start;  
}

.azkar-cat {
  background: var(--color-bg-card);
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.2rem 0.8rem 0.9rem; 
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  color: inherit;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.azkar-cat::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, hwb(43 33% 18% / 0.122) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.azkar-cat:active {
  transform: scale(0.96);
}
@media (hover: hover) {
  .azkar-cat:hover {
    transform: translateY(-4px);
    border-color: var(--color-teal-2);
    box-shadow: var(--shadow-card);
  }
  .azkar-cat:hover::before {
    opacity: 1;
  }
}

.azkar-cat .cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(13, 148, 136, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 10px;
  border: 1px solid var(--color-teal-2);
}

.azkar-cat .cat-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  /* تحويل الأسود إلى التيل الأساسي #0d9488 */
  filter: brightness(0) saturate(100%) invert(43%) sepia(69%) saturate(441%)
    hue-rotate(121deg) brightness(96%) contrast(89%);
  transition: transform 0.3s ease;
}

/* hover */
@media (hover: hover) {
  .azkar-cat:hover .cat-icon {
    background: rgba(13, 148, 136, 0.18);
    transform: scale(1.05);
  }
  .azkar-cat:hover .cat-icon img {
    transform: scale(1.1) rotate(-5deg);
  }
}

[data-theme="dark"] .azkar-cat .cat-icon {
  background: #5eead41f;
}

[data-theme="dark"] .azkar-cat .cat-icon img {
  filter: brightness(0) saturate(100%) invert(89%) sepia(24%) saturate(1222%)
    hue-rotate(101deg) brightness(102%) contrast(91%);
}

/* استجابة الموبايل - تصغير الأيقونة */
@media (max-width: 400px) {
  .azkar-cat .cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }
  .azkar-cat .cat-icon img {
    width: 30px;
    height: 30px;
  }
}
.azkar-cat:hover .cat-icon {
  transform: scale(1.1) rotate(-5deg);
}

.azkar-cat h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-teal-dark);
  margin: 0;
  line-height: 1.3;
}
[data-theme="dark"] .azkar-cat h3 {
  color: var(--color-teal);
}

.azkar-cat small {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ====== الأقسام المفتوحة ====== */
.zikr-section {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 1000;
  overflow-y: auto;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
  animation: slideUpSec 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}
.zikr-section[hidden] {
  display: none;
}

@keyframes slideUpSec {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.section-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1rem;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(13, 148, 136, 0.15);
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-head h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-teal-dark);
  margin: 0;
  flex: 1;
  text-align: center;
}
[data-theme="dark"] .section-head h2 {
  color: var(--color-teal-light);
}

.section-head .close-sec,
.section-head .reset-sec {
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 8px 14px;
  transition: all 0.2s ease;
  min-width: 42px;
}

.section-head .close-sec {
  background: rgba(13, 148, 136, 0.1);
  color: var(--color-teal);
  font-size: 1rem;
}
.section-head .close-sec:active {
  transform: scale(0.92);
  background: rgba(13, 148, 136, 0.25);
}

.section-head .reset-sec {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.section-head .reset-sec:active {
  transform: scale(0.95);
  background: rgba(239, 68, 68, 0.25);
}

/* ====== قائمة الأذكار ====== */
.zikr-list {
  max-width: 700px;
  margin: 1rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zikr-item {
  background: var(--color-bg-card);
  border: 1px solid rgba(13, 148, 136, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.zikr-item.done {
  opacity: 0.7;
  border-color: var(--color-teal);
  background: var(--color-bg-soft);
}
[data-theme="light"] .zikr-item.done {
  background: rgba(13, 148, 136, 0.06);
}
[data-theme="dark"] .zikr-item.done {
  background: rgba(13, 148, 136, 0.12);
}

.zikr-text {
  font-size: 0.95rem;
  line-height: 2.1;
  color: var(--color-text);
  text-align: justify;
  margin: 0 0 1rem;
  font-weight: 500;
  word-spacing: 1px;
}

.zikr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ====== زر العداد ====== */
.counter-btn {
  flex: 1;
  background: rgba(13, 148, 136, 0.08);
  border: 1.5px solid var(--color-teal);
  color: var(--color-teal-dark);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .counter-btn {
  color: var(--color-teal-light);
  background: rgba(94, 234, 212, 0.08);
}

.counter-btn .cnt {
  font-size: 1.25rem;
  color: var(--color-teal);
  font-weight: 900;
}
[data-theme="dark"] .counter-btn .cnt {
  color: var(--color-teal-light);
}

.counter-btn:active {
  transform: scale(0.96);
  background: rgba(13, 148, 136, 0.22);
}

.counter-btn.completed {
  background: linear-gradient(
    135deg,
    var(--color-teal),
    var(--color-teal-dark)
  );
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}
.counter-btn.completed .cnt {
  color: #fff;
}

/* ====== زر "تم" - يستخدم الذهبي ====== */
.done-btn {
  background: var(--color-teal-2);
  border: none;
  color: #1e293b;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-width: 80px;
  box-shadow: 0 2px 8px rgba(208, 172, 82, 0.3);
}
[data-theme="dark"] .done-btn {
  color: #0f172a;
}

.done-btn:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(208, 172, 82, 0.3);
}

.done-btn.marked {
  background: var(--color-text-muted);
  color: #fff;
  pointer-events: none;
  opacity: 0.85;
  box-shadow: none;
}

/* ====== السبحة الإلكترونية ====== */
.tasbeeh-container {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(13, 148, 136, 0.15);
  box-shadow: var(--shadow-card);
}

.tasbeeh-container #dhikrSelect {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(13, 148, 136, 0.3);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}
.tasbeeh-container #dhikrSelect:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.tasbeeh-container #counter {
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--color-teal);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -2px;
}
[data-theme="dark"] .tasbeeh-container #counter {
  color: var(--color-teal-light);
}

.tasbeeh-container #tasbeehBtn {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-teal),
    var(--color-teal-dark)
  );
  border: none;
  cursor: pointer;
  box-shadow:
    0 10px 25px rgba(13, 148, 136, 0.4),
    inset 0 -6px 10px rgba(0, 0, 0, 0.15),
    inset 0 6px 10px rgba(255, 255, 255, 0.15);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tasbeeh-container #tasbeehBtn::after {
  content: "اضغط";
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: "cairo", sans-serif;
}
.tasbeeh-container #tasbeehBtn:active {
  transform: translateY(4px) scale(0.96);
  box-shadow:
    0 4px 10px rgba(13, 148, 136, 0.4),
    inset 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tasbeeh-container #resetBtn {
  padding: 10px 26px;
  border-radius: 30px;
  border: 1.5px solid #ef4444;
  background: transparent;
  color: #ef4444;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.tasbeeh-container #resetBtn:hover,
.tasbeeh-container #resetBtn:active {
  background: #ef4444;
  color: #fff;
  transform: scale(0.96);
}

/* ====== استجابة الموبايل ====== */
@media (max-width: 400px) {
  .azkar-cats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 1rem 0.8rem;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .azkar-cat {
    padding: 1.1rem 0.6rem;
    border-radius: var(--radius);
  }
  .azkar-cat .cat-icon {
    font-size: 1.8rem;
  }
  .azkar-cat h3 {
    font-size: 0.85rem;
  }
  .azkar-cat small {
    font-size: 0.7rem;
  }

  .zikr-item {
    padding: 1rem;
  }
  .zikr-text {
    font-size: 0.9rem;
    line-height: 2;
  }
  .counter-btn {
    padding: 9px 12px;
    font-size: 0.9rem;
  }
  .counter-btn .cnt {
    font-size: 1.15rem;
  }
  .done-btn {
    padding: 9px 16px;
    font-size: 0.8rem;
    min-width: 70px;
  }
}

/* ====== شاشات كبيرة ====== */
@media (min-width: 768px) {
  .azkar-cats {
    grid-template-columns: repeat(4, 1fr);
    max-width: 900px;
    gap: 16px;
  }
  .zikr-list {
    max-width: 800px;
  }
  .zikr-text {
    font-size: 1rem;
  }
}

/* ====== prefers-reduced-motion ====== */
@media (prefers-reduced-motion: reduce) {
  .azkar-cat,
  .counter-btn,
  .done-btn,
  .zikr-section {
    transition: none;
    animation: none;
  }
}
/* ==========================================================
   مودال التصفير المخصص
   ========================================================== */
.azkar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1rem;
  animation: modalFadeIn 0.25s ease;
}
.azkar-modal-overlay[hidden] {
  display: none;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  0% { opacity: 0; transform: scale(0.85) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.azkar-modal {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem 1.4rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(13, 148, 136, 0.12);
  animation: modalPopIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.azkar-modal .modal-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.8rem;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.3));
}

.azkar-modal .modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-teal-dark);
  margin: 0 0 0.6rem;
}
[data-theme="dark"] .azkar-modal .modal-title {
  color: var(--color-teal-light);
}

.azkar-modal .modal-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
}

.azkar-modal .modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-btn:active {
  transform: scale(0.96);
}

.modal-btn-yes {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.modal-btn-yes:hover {
  background: #dc2626;
}

.modal-btn-no {
  background: rgba(13, 148, 136, 0.1);
  color: var(--color-teal-dark);
  border: 1.5px solid var(--color-teal);
}
[data-theme="dark"] .modal-btn-no {
  color: var(--color-teal-light);
  background: rgba(94, 234, 212, 0.1);
}
.modal-btn-no:hover {
  background: rgba(13, 148, 136, 0.2);
}
/* ==========================================================
   العداد الذكي المتسلسل (Multi-Counter)
   ========================================================== */
.zikr-item.multi-counter {
  position: relative;
}

/* ====== شبكة العدادات الفرعية ====== */
.sub-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.sub-counter {
  background: var(--color-bg);
  border: 1.5px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius);
  padding: 12px 8px;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* الذكر النشط حالياً */
.sub-counter.active {
  border-color: var(--color-teal);
  background: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
[data-theme="dark"] .sub-counter.active {
  background: rgba(94, 234, 212, 0.1);
  border-color: var(--color-teal-light);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}

.sub-counter.active .sub-label {
  color: var(--color-teal-dark);
  font-weight: 800;
}
[data-theme="dark"] .sub-counter.active .sub-label {
  color: var(--color-teal-light);
}

.sub-counter:active {
  transform: scale(0.96);
}

/* الذكر اللي خلص */
.sub-counter.completed {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.15);
  opacity: 0.75;
}
[data-theme="dark"] .sub-counter.completed {
  background: rgba(94, 234, 212, 0.12);
  border-color: rgba(94, 234, 212, 0.4);
}

.sub-counter.completed .sub-label {
  text-decoration: line-through;
  color: var(--color-text-muted);
}
.sub-counter.completed .sub-count {
  color: var(--color-teal);
}
[data-theme="dark"] .sub-counter.completed .sub-count {
  color: var(--color-teal-light);
}

/* علامة ✓ عند إكمال الذكر */
.sub-counter.completed::after {
  content: "✓";
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--color-teal);
  background: rgba(13, 148, 136, 0.15);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
[data-theme="dark"] .sub-counter.completed::after {
  color: var(--color-teal-light);
  background: rgba(94, 234, 212, 0.2);
}

/* الذكر المعطّل (اللي لسه ما وصلوش دوره) */
.sub-counter.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.sub-counter .sub-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text);
  transition: color 0.2s ease;
  line-height: 1.2;
}

.sub-counter .sub-count {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--color-teal);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
[data-theme="dark"] .sub-counter .sub-count {
  color: var(--color-teal-light);
}

/* ====== العداد الكلي ====== */
.total-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--color-bg);
  border: 1.5px dashed rgba(13, 148, 136, 0.3);
  font-family: inherit;
  flex: 1;
  justify-content: center;
}
[data-theme="dark"] .total-counter {
  border-color: rgba(94, 234, 212, 0.3);
}

.total-counter > span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.total-counter strong {
  font-size: 1rem;
  font-weight: 900;
  color: var(--color-teal-dark);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .total-counter strong {
  color: var(--color-teal-light);
}

/* ====== حالة الاكتمال الكلي ====== */
.zikr-item.multi-counter.done .sub-counters {
  opacity: 0.6;
}

.zikr-item.multi-counter.done .total-counter {
  border-color: var(--color-teal);
  background: rgba(13, 148, 136, 0.1);
}
[data-theme="dark"] .zikr-item.multi-counter.done .total-counter {
  background: rgba(94, 234, 212, 0.1);
}

/* ====== استجابة الموبايل الصغير ====== */
@media (max-width: 400px) {
  .sub-counters {
    gap: 6px;
  }
  .sub-counter {
    padding: 10px 4px;
    border-radius: 10px;
  }
  .sub-counter .sub-label {
    font-size: 0.65rem;
  }
  .sub-counter .sub-count {
    font-size: 0.85rem;
  }
  .sub-counter.completed::after {
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    top: 4px;
    left: 5px;
  }
  .total-counter {
    padding: 8px 10px;
  }
  .total-counter strong {
    font-size: 0.9rem;
  }
}
/* ==========================================================
   شريط التقدم في رأس كل قسم
   ========================================================== */

/* تعديل section-head عشان يبقى عمودي */
.section-head {
  display: block !important;
  padding: 1rem 1rem 0.7rem !important;
}

.section-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head-top h2 {
  flex: 1;
  text-align: center;
}

.section-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(13, 148, 136, 0.1);
  border-radius: 20px;
  overflow: hidden;
}
[data-theme="dark"] .section-progress-bar {
  background: rgba(94, 234, 212, 0.12);
}

.section-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-teal), var(--color-teal-light));
  border-radius: 20px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.4);
}

.section-progress-fill.completed {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.section-progress-text {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-teal-dark);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: left;
  letter-spacing: -0.3px;
}
[data-theme="dark"] .section-progress-text {
  color: var(--color-teal-light);
}
/* ==========================================================
   زر إخفاء المكتمل
   ========================================================== */
.toggle-completed-btn {
  background: rgba(13, 148, 136, 0.1);
  border: none;
  color: var(--color-teal);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 42px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.toggle-completed-btn:active {
  transform: scale(0.92);
  background: rgba(13, 148, 136, 0.25);
}
[data-theme="dark"] .toggle-completed-btn {
  color: var(--color-teal-light);
  background: rgba(94, 234, 212, 0.1);
}

/* لما يكون في وضع "إخفاء" */
.toggle-completed-btn.hiding {
  background: rgba(208, 172, 82, 0.15);
  color: var(--color-gold-dark);
}
[data-theme="dark"] .toggle-completed-btn.hiding {
  color: var(--color-teal-2);
  background: rgba(208, 172, 82, 0.15);
}

/* ===== إخفاء الأذكار المكتملة ===== */
.zikr-section.hide-completed .zikr-item.done {
  display: none !important;
}

/* رسالة "لا يوجد محتوى" لو كل الأذكار مخفية */
.zikr-section.hide-completed .empty-after-hide {
  display: block !important;
}

.empty-after-hide {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.empty-after-hide .emoji {
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}
/* ==========================================================
   زر البحث + شاشة البحث
   ========================================================== */

/* زر البحث في الهيدر */
.search-trigger {
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.1);
  border: none;
  color: var(--color-teal);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}
.search-trigger:hover {
  background: rgba(13, 148, 136, 0.2);
}
.search-trigger:active {
  transform: scale(0.9);
}
[data-theme="dark"] .search-trigger {
  color: var(--color-teal-light);
  background: rgba(94, 234, 212, 0.1);
}

/* شاشة البحث الكاملة */
.search-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  animation: searchFadeIn 0.25s ease;
}
.search-overlay[hidden] {
  display: none;
}

@keyframes searchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.search-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
}

/* حقل البحث */
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-card);
  border: 2px solid var(--color-teal);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
  margin-bottom: 8px;
}

.search-input-wrap .search-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  padding: 4px 0;
  min-width: 0;
}

.search-input-wrap input::placeholder {
  color: var(--color-text-muted);
  font-weight: 400;
}

.search-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.1);
  border: none;
  color: var(--color-teal);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.search-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.search-hint {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.search-hint kbd {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.7rem;
  margin: 0 2px;
}
[data-theme="dark"] .search-hint kbd {
  border-color: rgba(255, 255, 255, 0.1);
}

/* النتائج */
.search-results {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.search-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}
.search-empty span {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.search-empty p {
  font-size: 0.9rem;
  margin: 0;
}

/* مجموعة نتائج قسم */
.search-section-group {
  margin-bottom: 1.5rem;
}
.search-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-teal-dark);
  padding: 8px 4px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.15);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="dark"] .search-section-title {
  color: var(--color-teal-light);
}
.search-section-title .count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: rgba(13, 148, 136, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

/* نتيجة فردية */
.search-result-item {
  background: var(--color-bg-card);
  border: 1px solid rgba(13, 148, 136, 0.1);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
}
.search-result-item:hover {
  border-color: var(--color-teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.12);
}
.search-result-item:active {
  transform: scale(0.98);
}

.search-result-text {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--color-text);
  margin: 0 0 8px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-text mark {
  background: rgba(208, 172, 82, 0.5);
  color: inherit;
  padding: 1px 3px;
  border-radius: 4px;
  font-weight: 800;
}

.search-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.search-result-footer .badge {
  background: rgba(13, 148, 136, 0.1);
  color: var(--color-teal);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
}
[data-theme="dark"] .search-result-footer .badge {
  color: var(--color-teal-light);
}
/* ==========================================================
   زر نسخ الذكر (في صف الأزرار)
   ========================================================== */
.copy-zikr-btn {
  background: rgba(13, 148, 136, 0.12);
  border: 1.5px solid var(--color-teal);
  color: var(--color-teal-dark);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-width: 60px;
  white-space: nowrap;
}
[data-theme="dark"] .copy-zikr-btn {
  color: var(--color-teal-light);
  background: rgba(94, 234, 212, 0.1);
}

.copy-zikr-btn:active {
  transform: scale(0.96);
  background: rgba(13, 148, 136, 0.25);
}

/* حالة "تم النسخ" */
.copy-zikr-btn.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* استجابة الموبايل */
@media (max-width: 400px) {
  .copy-zikr-btn {
    padding: 9px 12px;
    font-size: 0.8rem;
    min-width: 50px;
  }
}
/* ==========================================================
   فلاتر تصنيف الأذكار
   ========================================================== */
.zikr-filters {
  display: flex;
  gap: 6px;
  padding: 10px 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 700px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(13, 148, 136, 0.08);
}
.zikr-filters::-webkit-scrollbar {
  display: none;
}

.zikr-filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.15);
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
[data-theme="dark"] .zikr-filter-chip {
  background: rgba(94, 234, 212, 0.08);
  border-color: rgba(94, 234, 212, 0.15);
}

.zikr-filter-chip:active {
  transform: scale(0.95);
}

.zikr-filter-chip.active {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}
[data-theme="dark"] .zikr-filter-chip.active {
  background: var(--color-teal-light);
  border-color: var(--color-teal-light);
  color: #0f172a;
}

.zikr-item.filtered-out {
  display: none !important;
}
/* ✅ تنسيق زر الصوت وترتيب أزرار القسم */
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-sec {
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

[data-theme="dark"] .audio-sec {
  background: rgba(45, 212, 191, 0.15);
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.3);
}

.audio-sec svg {
  width: 14px;
  height: 14px;
  pointer-events: none; /* عشان لو داس على الأيقونة الزرار يشتغل */
}

/* تأثير النبض لما الصوت يشتغل */
.audio-sec.playing {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
  animation: pulse-audio 1.5s infinite;
}

@keyframes pulse-audio {
  0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(15, 118, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0); }
}
/* ✅ شريط تقدم الصوت في الأذكار */
/* ✅ شريط تقدم الصوت في الأذكار */
.azkar-audio-progress-wrap {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: var(--color-bg-card, #fff);
  border-bottom: 1px solid #0d94881a;
  border-radius: 20rem;
  margin: 0 auto; 
  position: relative;
  z-index: 10; 
  width: 100%;
  max-width: 95%;
  animation: fadeIn 0.3s ease;
}

.azkar-audio-progress-wrap.active {
  display: flex;
}

/* تصغير حجم الخط شوية عشان ميبقاش ضخم */
.audio-time {
  font-family: 'Cairo', sans-serif;
  font-size: 0.7rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  min-width: 35px;
  text-align: center;
  font-weight: 700;
}

.audio-progress-track {
  flex: 1;
  height: 5px; /* كبرناه شوية عشان يبان */
  background: rgba(13, 148, 136, 0.15);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  direction: ltr;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.audio-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #0f766e;
  border-radius: 10px;
  pointer-events: none;
  transition: width 0.1s linear;
}

[data-theme="dark"] .azkar-audio-progress-wrap {
  background: var(--color-bg-card, #1e293b);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .audio-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .audio-progress-fill {
  background: #2dd4bf;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.azkar-cat .cat-icon svg {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  color: var(--color-teal-dark); /* اللون الأساسي */
  transition: transform 0.3s ease;
}

/* hover */
@media (hover: hover) {
  .azkar-cat:hover .cat-icon svg {
    transform: scale(1.1) rotate(-5deg);
  }
}

[data-theme="dark"] .azkar-cat .cat-icon svg {
  color: var(--color-teal-light); /* لون الوضع الليلي */
}
@media (max-width: 400px) {
  .azkar-cat .cat-icon svg {
    width: 30px;
    height: 30px;
  }
}
.azkar-page-head svg{
  width: 50%;
  margin-top:0.5rem;
}
