* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* يمنع التمرير تماماً لأننا لا نحتاجه */
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh; /* يثبت الارتفاع */
  height: 100dvh; /* يثبت الارتفاع للجوال */
  
  /* تثبيت الخلفية والعناصر في المنتصف تماماً */
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: linear-gradient(160deg, #0a0a0a 0%, #1a1a1a 55%, #0a0a0a 100%);
  color: #e5e5e5;
  padding: 24px 16px;
  position: fixed; /* يثبت الصفحة والشعار في الشاشة نهائياً بدون أي تمرير */
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

/* إصلاح الجوال: ضبط المسافات العلوية وإزالة التمرير غير المرغوب فيه */
@media (max-width: 700px) {
  body:not(.home-body) {
    /* نقوم بإزالة flex-start ونركز على المنتصف دائماً */
    align-items: center;
    justify-content: center;
    padding-top: 20px; /* مساحة صغيرة جداً للشعار */
    padding-bottom: 20px;
  }
  
  body.home-body {
    padding-top: 0;
    padding-bottom: 0;
  }
}


body::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,0.12) 0%, transparent 70%);
  top: -120px;
  right: -120px;
  border-radius: 50%;
  pointer-events: none;
}

body::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(120,120,120,0.10) 0%, transparent 70%);
  bottom: -120px;
  left: -120px;
  border-radius: 50%;
  pointer-events: none;
}

.container {
  text-align: center;
  max-width: 640px;
  width: 100%;
  max-height: 100%;
  z-index: 15;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 40px 30px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  /* شبكة أمان: لو المحتوى طال جداً على شاشة صغيرة يتمرر هو فقط، بدون ما يتحرك الشعار الثابت فوق */
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.container::-webkit-scrollbar {
  display: none;
}

.brand-bar {
  position: fixed;
  top: 18px;
  right: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: rgba(20,20,20,0.7);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 999px;
  padding: 6px 16px 6px 8px;
  backdrop-filter: blur(6px);
  z-index: 10;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.brand-bar:hover {
  border-color: rgba(249,115,22,0.7);
  background: rgba(30,30,30,0.85);
}

/* ===== إصلاح الجوال: ضبط الشعار على الهواتف الصغيرة ===== */
@media (max-width: 420px) {
  .brand-bar {
    top: 12px;
    right: 12px;
    padding: 5px 14px 5px 8px;
    gap: 8px;
    border-radius: 50px;
  }
  
  body:not(.home-body) {
    padding-top: 85px; /* مساحة أقل للشعار الصغير */
  }
}

.type-toggle-row {
  margin-top: 24px;
}

.type-toggle-btn {
  display: inline-block;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.5);
  color: #f97316;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.type-toggle-btn:hover {
  background: #f97316;
  color: #0a0a0a;
}

.brand-label {
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 700;
  color: #e5e5e5;
  letter-spacing: 0.5px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(249,115,22,0.6);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

h1 {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 700;
  margin-bottom: 22px;
  color: #f97316;
}

.date-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.subtitle {
  color: #a3a3a3;
  font-size: clamp(13px, 3vw, 15px);
  line-height: 1.6;
}

#target-date-label {
  color: #e5e5e5;
  font-weight: 700;
}

.toggle-btn {
  background: transparent;
  border: 1px solid rgba(249,115,22,0.5);
  color: #f97316;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.toggle-btn:hover {
  background: #f97316;
  color: #0a0a0a;
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.time-box {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.time-box:hover {
  transform: translateY(-4px);
  border-color: rgba(249,115,22,0.4);
}

.time-value {
  font-size: clamp(22px, 6vw, 40px);
  font-weight: 800;
  color: #f97316;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.time-label {
  font-size: clamp(11px, 2.5vw, 13px);
  color: #a3a3a3;
  margin-top: 8px;
  font-weight: 600;
}

.last-occurrence-label {
  display: block;
  margin-top: 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.32);
}

.finished-msg {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  color: #f97316;
  padding: 28px 16px;
  background: rgba(249, 115, 22, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  display: none;
}

.page-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #a3a3a3;
  font-size: 13px;
  line-height: 1.9;
  text-align: right;
}

/* ===== إصلاح الجوال: ضبط العناصر الصغيرة جداً ===== */
@media (max-width: 420px) {
  .brand-bar {
    top: 12px;
    right: 12px;
    padding: 5px 12px 5px 6px;
    gap: 8px;
  }

  .type-toggle-btn {
    padding: 5px 12px;
    font-size: 11px;
  }

  .brand-logo {
    width: 26px;
    height: 26px;
  }

  .container {
    padding: 24px 16px;
    border-radius: 18px;
  }

  h1 {
    margin-bottom: 14px;
  }

  .date-row {
    margin-bottom: 20px;
    gap: 8px;
  }

  .type-toggle-row {
    margin-top: 16px;
  }

  .countdown {
    gap: 8px;
  }

  .time-box {
    padding: 14px 4px;
    border-radius: 12px;
  }

  .home-container {
    padding: 0 4px;
  }

  .search-prefix {
    padding: 14px 8px 14px 10px;
    font-size: 14px;
  }

  .search-input-inline {
    padding: 14px 6px;
    font-size: 14px;
  }

  .suggestion-item {
    padding: 13px 14px;
    gap: 8px;
  }

  .suggestion-tag {
    font-size: 10px;
    padding: 3px 9px;
    white-space: normal;
    text-align: center;
  }
}

/* Larger desktop screens */
@media (min-width: 900px) {
  .container {
    max-width: 720px;
    padding: 50px 60px;
  }

  .countdown {
    gap: 20px;
  }

  .time-box {
    padding: 26px 12px;
  }
}

/* ===== الصفحة الرئيسية (البحث) ===== */
.home-body {
  align-items: center;
  justify-content: center;
}

.home-container {
  text-align: center;
  max-width: 480px;
  width: 100%;
  z-index: 15;
}

.home-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(249,115,22,0.6);
  box-shadow: 0 0 0 5px rgba(249,115,22,0.1);
  overflow: hidden;
  margin: 0 auto 20px;
}

.home-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.home-title {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  color: #f97316;
  margin-bottom: 10px;
}

.home-subtitle {
  color: #a3a3a3;
  font-size: clamp(13px, 3vw, 15px);
  margin-bottom: 34px;
}

.search-wrap {
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 0 6px 0 16px;
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(249,115,22,0.6);
}

.search-prefix {
  flex-shrink: 0;
  color: #f97316;
  font-weight: 800;
  font-size: 15px;
  padding: 16px 10px 16px 12px;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.search-input-inline {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: #e5e5e5;
  padding: 16px 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  text-align: right;
}

.search-input-inline::placeholder {
  color: #6b6b6b;
}

.suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 20;
}

.suggestions.active {
  display: block;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  text-align: right;
  font-size: 14px;
  color: #e5e5e5;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s ease, color 0.15s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(249,115,22,0.1);
  color: #f97316;
}

.suggestion-item:hover .suggestion-tag {
  background: #f97316;
  color: #0a0a0a;
  border-color: #f97316;
}

.suggestion-text {
  font-weight: 600;
}

.suggestion-tag {
  font-size: 11px;
  font-weight: 700;
  color: #f97316;
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 999px;
  padding: 4px 12px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.suggestion-tag.popular {
  color: #0a0a0a;
  background: #f97316;
  border-color: #f97316;
}

.suggestion-empty {
  padding: 16px 20px;
  text-align: center;
  font-size: 13px;
  color: #6b6b6b;
}

/* ===== تذييل تنقّل موحّد يربط كل صفحات الموقع ببعضها ===== */
.site-footer-nav {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-bottom: 10px;
}

/* صف صفحات المواعيد (الدراسة، العيد...) يبقى بسطر واحد دائماً، مع سكرول أفقي لو ما كفت المساحة */
.topics-links-row {
  flex-wrap: nowrap;
  justify-content: center;
  justify-content: safe center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  gap: 6px 7px;
}

.topics-links-row::-webkit-scrollbar {
  display: none;
}

.topics-links-row a {
  font-size: 9.5px;
}

.topics-links-row a:not(:last-child)::after {
  content: "";
  margin-inline-start: 0;
}

.site-footer-links:last-child {
  margin-bottom: 0;
}

/* روابط من نحن/التواصل/الخصوصية/الشروط: شريط ثابت أسفل الشاشة، منفصل بمسافة واضحة عن باقي الروابط */
.legal-links-row {
  position: fixed;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  z-index: 10;
  pointer-events: none;
  margin-bottom: 0;
}

.legal-links-row a {
  pointer-events: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.legal-links-row a:hover {
  color: #f97316;
}

.legal-links-row a:not(:last-child)::after {
  content: "-";
  margin-inline-start: 10px;
  color: rgba(255,255,255,0.25);
}

@media (max-width: 420px) {
  .legal-links-row {
    bottom: 8px;
  }
}

.site-footer-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.site-footer-links a:hover {
  color: #f97316;
}

.site-footer-links a:not(:last-child)::after {
  content: "-";
  margin-inline-start: 10px;
  color: rgba(255,255,255,0.25);
}

/* ===== صفحات المحتوى: من نحن، تواصل معنا، الخصوصية، الشروط ===== */
.content-page .container {
  max-width: 720px;
  position: relative;
  padding-top: 74px;
}

/* الشعار هنا يلتصق بزاوية البطاقة نفسها ويتحرك معها، بدل ما يكون ثابت بزاوية الشاشة بمعزل عنها.
   رفعنا padding-top للحاوية عشان يصير له مساحة كافية يجلس فيها بدون ما يتصادم مع العنوان */
.content-page .container .brand-bar {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* في صفحات من نحن/التواصل/الخصوصية/الشروط نفسها: الروابط القانونية صف عادي تحت صف المواعيد مباشرة، مو ثابتة أسفل الشاشة */
.content-page .legal-links-row {
  position: static;
  display: flex;
}

.content-page h1 {
  text-align: center;
}

.content-body {
  text-align: right;
  font-size: 14px;
  line-height: 1.9;
  color: #d4d4d4;
}

.content-body h2 {
  font-size: 16px;
  color: #f97316;
  margin: 20px 0 8px;
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body p {
  margin-bottom: 10px;
}

.content-body ul {
  margin: 0 0 10px;
  padding-right: 22px;
}

.content-body li {
  margin-bottom: 6px;
}

.content-body a {
  color: #f97316;
}

.content-body .updated-note {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.contact-email-btn {
  display: inline-block;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.5);
  color: #f97316;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-email-btn:hover {
  background: #f97316;
  color: #0a0a0a;
}

/* ===== زر التبديل بين "سؤال عام" و"مواعيد الصلاة" ===== */
.mode-switch {
  position: relative;
  display: flex;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}

.mode-switch-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: #f97316;
  border-radius: 999px;
  transition: transform 0.25s ease;
  z-index: 0;
}

.mode-switch-3 .mode-switch-thumb {
  width: calc((100% - 8px) / 3);
}

.mode-switch-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  background: none;
  border: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #a3a3a3;
  cursor: pointer;
  transition: color 0.25s ease;
}

.mode-switch-btn.active {
  color: #0a0a0a;
}

.mode-panel {
  animation: modePanelFadeIn 0.2s ease;
}

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

/* ===== لوحة التقويم الشهري ===== */
#calendarPanel {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

#calendarPanel::-webkit-scrollbar {
  display: none;
}

.calendar-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.calendar-subtab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(249,115,22,0.35);
  color: #a3a3a3;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.calendar-subtab-btn.active {
  background: #f97316;
  border-color: #f97316;
  color: #0a0a0a;
}

.converter-system-toggle {
  margin-bottom: 20px;
}

.converter-selects {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.converter-select {
  flex: 1;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e5e5;
  padding: 10px 6px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.converter-result {
  text-align: center;
  color: #f97316;
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 14px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-header .calendar-nav-group:first-child {
  justify-self: start;
}

.calendar-header .calendar-nav-group:last-child {
  justify-self: end;
}

.calendar-month-label {
  justify-self: center;
  text-align: center;
}

.calendar-nav-btn {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.35);
  color: #f97316;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.calendar-nav-btn:hover {
  background: #f97316;
  color: #0a0a0a;
}

.calendar-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-reset-btn {
  font-size: 15px;
  visibility: hidden;
}

.calendar-reset-btn.is-visible {
  visibility: visible;
}

.calendar-range-btn {
  font-size: 15px;
}

.calendar-range-btn.is-active {
  background: #f97316;
  color: #0a0a0a;
}

.calendar-range-summary {
  text-align: center;
  margin: -4px 0 12px;
}

.calendar-range-count {
  color: #f97316;
  font-weight: 700;
  font-size: 13px;
}

.calendar-range-dates {
  color: rgba(229, 229, 229, 0.5);
  font-size: 12px;
  margin-top: 2px;
}

.calendar-range-notice {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: center;
}

.calendar-range-notice p {
  color: #e5e5e5;
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.calendar-month-label {
  font-size: 16px;
  font-weight: 700;
  color: #e5e5e5;
}

.calendar-system-toggle {
  display: block;
  margin: 0 auto 16px;
}

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

.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  color: #a3a3a3;
  font-weight: 600;
}

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

.calendar-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  font-weight: 600;
  color: #e5e5e5;
  font-variant-numeric: tabular-nums;
}

.calendar-day.is-empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day.is-today {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
  font-weight: 800;
}

.calendar-day-number {
  position: relative;
  z-index: 1;
}

.calendar-day.is-range {
  color: #f97316;
}

.calendar-day.is-range::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  border: 2px solid #f97316;
  border-radius: 8px;
}

.calendar-day.is-range.range-extend-right::after {
  right: -4px;
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.calendar-day.is-range.range-extend-left::after {
  left: -4px;
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.calendar-grid.is-range-mode .calendar-day:not(.is-empty) {
  cursor: pointer;
}

@media (max-width: 420px) {
  .calendar-day {
    font-size: 11px;
    border-radius: 8px;
  }

  .calendar-weekdays span {
    font-size: 10px;
  }
}

/* ===== لوحة مواعيد الصلاة ===== */
.prayer-location {
  color: #a3a3a3;
  font-size: 12px;
  margin-bottom: 16px;
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.prayer-item {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.prayer-name {
  font-size: 11px;
  color: #a3a3a3;
  font-weight: 600;
}

.prayer-time {
  font-size: 13px;
  font-weight: 800;
  color: #f97316;
  font-variant-numeric: tabular-nums;
}

.prayer-next-label {
  color: #a3a3a3;
  font-size: 13px;
  margin-bottom: 12px;
}

.prayer-next-label #nextPrayerName {
  color: #eab308;
  font-weight: 700;
}

#prayerCountdown {
  grid-template-columns: repeat(3, 1fr);
}

.prayer-time.is-done {
  color: #22c55e;
}

.prayer-time.is-next {
  color: #eab308;
}

/* ===== طلب إذن الموقع لحساب مواعيد الصلاة ===== */
.prayer-permission {
  padding: 10px 0 4px;
}

.prayer-permission .prayer-location {
  margin-bottom: 18px;
  line-height: 1.7;
}

.prayer-permission-btn {
  display: inline-block;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.5);
  color: #f97316;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.prayer-permission-btn:hover {
  background: #f97316;
  color: #0a0a0a;
}

.prayer-permission-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== تحديد الموقع يدوياً (بديل عن GPS الجهاز، مفيد خصوصاً بأجهزة الكمبيوتر) ===== */
.prayer-manual-location-toggle {
  display: block;
  margin: 4px auto 0;
  background: none;
  border: none;
  color: #a3a3a3;
  font-size: 12px;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.prayer-manual-location-toggle:hover {
  color: #f97316;
}

.prayer-manual-location-form {
  margin-top: 12px;
}

.prayer-city-search-row {
  display: flex;
  gap: 8px;
}

.prayer-city-search-row input {
  flex: 1;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e5e5;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
}

.prayer-city-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 160px;
  overflow-y: auto;
}

.prayer-city-result-btn {
  display: block;
  width: 100%;
  text-align: right;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e5e5;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.prayer-city-result-btn:hover {
  border-color: #f97316;
  color: #f97316;
}

.prayer-city-status {
  color: #a3a3a3;
  font-size: 12px;
  margin-top: 10px;
}

/* ===== ملاحظة "قد رُفع الأذان" ===== */
.adhan-notice {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 8px;
  color: #f97316;
  font-weight: 700;
  font-size: 14px;
  animation: adhanPulse 1.6s ease-in-out infinite;
}

@keyframes adhanPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.015); }
}

@media (max-width: 420px) {
  .prayer-grid {
    gap: 5px;
  }

  .prayer-item {
    padding: 8px 2px;
    border-radius: 10px;
  }

  .prayer-name {
    font-size: 10px;
  }

  .prayer-time {
    font-size: 11px;
  }

  .mode-switch-btn {
    font-size: 11px;
    padding: 9px 6px;
  }
}