/* پایه */
body {
  font-family: 'Vazir', Tahoma, sans-serif;
  background-color: #121212;
  color: #eee;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  direction: rtl;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* تصاویر بالای صفحه */
.top-images {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1024px;
  margin: 5px auto;
  padding: 1px 0;
  gap: 5px;
  position: relative;
}

.top-images .top-img {
  width: 20%;
  max-width: 80px;
  min-width: 30px;
  height: auto;
  object-fit: contain;
  border-radius: 1px;
}

/* حالت موبایل بین 300 تا 600 پیکسل */
@media (max-width: 600px) and (min-width: 300px) {
  .top-images {
    justify-content: space-between;
    padding: 0 10px;
  }

  .top-images .top-img {
    width: 50px;
    max-width: 50px;
    min-width: 30px;
    margin: 0;
  }

  .top-images .center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }
}

/* زیر 300 پیکسل */
@media (max-width: 299px) {
  .top-images {
    justify-content: space-between;
    padding: 0 5px;
  }

  .top-images .top-img {
    width: 40px;
    max-width: 40px;
    min-width: 20px;
    margin: 0;
  }

  .top-images .center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }
}

/* بنرهای کوچک (5 تا 8) */
.small-banners {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 5px;
  max-width: 1024px;
  margin: 12px auto;
  overflow-x: auto;
}

.small-banners .banner {
  flex: 0 0 23%;
  max-width: 23%;
  min-width: 70px;
}

.small-banners .banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.small-banners .banner img:hover {
  transform: scale(1.03);
}

/* بنر کلی */
.banner {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto 2px auto;
  overflow: hidden;
  border-radius: 8px;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

p {
    display: block;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}

/* شمارنده سلام داخل بنر دوم */
#bottom-left-banner {
  position: absolute;
  bottom: 7px;
  left: 7px;
  padding: 1px 1px;
  border-radius: 12px;
  font-weight: bold;
  text-shadow: 0 0 3px #000;
  color: #fff;
  user-select: none;
  cursor: default;
  z-index: 9999;
  font-size: 0.7rem;
  pointer-events: none;
}

/* شمارنده صلوات روی بنر چهارم */
.salavat-count-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  text-shadow: 0 0 3px #000;
  user-select: none;
  z-index: 10;
  white-space: nowrap;
  pointer-events: none;
}

body.light-mode .salavat-count-overlay {
  color: #f8f6f6;
  text-shadow: 2px 2px 5px #000;
}

/* بسم‌الله بالای بنر */
.bismillah {
  font-size: 1.2rem;
  color: #fff;
  font-weight: bold;
  text-shadow: 2px 2px 5px #000;
  margin-bottom: 10px;
}

body.light-mode .bismillah {
  color: #222;
  text-shadow: none;
}

/* محتوای آیه */
main#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 5px 0;
}

#ayah {
  font-size: 2.2rem;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.6;
}

#translation {
  font-size: 1.3rem;
  color: #ccc;
  margin-bottom: 10px;
  font-style: italic;
}

#audio {
  display: block;
  margin: 5px auto;
  width: 90%;
  max-width: 600px;
  border-radius: 12px;
  background-color: #222;
}

body.light-mode #audio {
  background-color: #f9f9f9;
}

/* اطلاعات و دکمه‌ها */
#info {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #aaa;
}

button#next-btn {
  background-color: #00acc1;
  border: none;
  color: white;
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 5px 15px #00838fcc;
  transition: background-color 0.3s ease;
  margin: 5px 0;
}
button#davat-btn {
  background-color: #00acc1;
  border: none;
  color: white;
  padding: 12px 16px;
  font-size: 1.1rem;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 5px 15px #00838fcc;
  transition: background-color 0.3s ease;
  margin: 5px 0;
}

button#next-btn:hover {
  background-color: #00838f;
}

#progress {
  font-size: 1rem;
  color: #4caf50;
  font-weight: 600;
  margin-bottom: 8px;
}

/* کنترل حالت شب/روز */
.theme-container {
  max-width: 1024px;
  margin: 5px auto 5px auto;
  padding: 1px 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  color: #eee;
  user-select: none;
  width: 100%;
}

#theme-toggle {
  background-color: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: inherit;
  padding: 0;
  user-select: none;
  transition: color 0.3s ease;
}

body.light-mode {
  background-color: #f3f3f3;
  color: #111;
}

body.light-mode #translation {
  color: #555;
}

body.light-mode #info {
  color: #666;
}

body.light-mode #progress {
  color: #2e7d32;
}

body.light-mode button#next-btn {
  background-color: #ff9800;
  color: #fff;
  box-shadow: 0 4px 10px #f57c00aa;
}

body.light-mode button#next-btn:hover {
  background-color: #f57c00;
}

body.light-mode #audio {
  background-color: #f9f9f9;
}

body.light-mode .theme-container {
  color: #222;
}

/* شمارش معکوس */
#countdown-box {
  max-width: 1024px;
  margin: 10px auto;
  background: #1e1e1e;
  border-radius: 10px;
  box-shadow: 0 2px 10px #00000055;
  color: #f0f0f0;
  font-size: 1rem;
  text-align: center;
  padding: 0px 0px 0px 0px;
}

body.light-mode #countdown-box {
  background: #fffbe6;
  color: #333;
  box-shadow: 0 2px 10px #18171755;
}

#countdown-box h6 {
  
  margin-bottom: 1px;
  font-size: 0.75rem;
}

h5 {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

h6 {
    margin-block-start: 17px;
    margin-block-end: 0.5em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

/* بنر کلیک‌پذیر */
.clickable {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.clickable:hover {
  transform: scale(1.01);
}

/* ریسپانسیو عمومی */
@media (max-width: 600px) {
  #ayah {
    font-size: 1.5rem;
  }

  #translation {
    font-size: 1rem;
  }

  button#next-btn {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .bismillah {
    font-size: 1rem;
  }

  .salavat-count-overlay {
    font-size: 0.75rem;
    bottom: 8px;
    left: 8px;
  }

  #datetime-box {
    max-width: 1024px;
    margin: 4px auto;
    padding: 2px 2px;
    font-size: 0.9rem;
    color: #ccc;
    background-color: #1e1e1e;
    border-radius: 2px;
    box-shadow: 0 2px 2px #00000055;
    direction: rtl;
    text-align: center;
    line-height: 1.1;
  }

  body.light-mode #datetime-box {
    background-color: #fefefe;
    color: #222;
    box-shadow: 0 2px 10px #c7c7c7;
  }

  #banner9 {
    position: relative;
    overflow: hidden;
  }

  .doa-count {
    position: absolute;
    font-weight: bold;
    font-size: 12px;
    color: rgb(20, 20, 20);
    text-shadow: none;
    pointer-events: none;
  }
}

/* آیکون بلندگو (دسکتاپ و موبایل) */
#mute-toggle {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: black;
  position: relative;
  padding: 0;
  user-select: none;
}

/* خطوط ضربدر قرمز هنگام قطع صدا */
#mute-toggle.muted::before,
#mute-toggle.muted::after {
  content: "";
  position: absolute;
  top: 55%;
  left: 10%;
  width: 120%;
  height: 3px;
  background-color: red;
  border-radius: 2px;
  pointer-events: none;
}

#mute-toggle.muted::before {
  transform: rotate(45deg);
}

#mute-toggle.muted::after {
  transform: rotate(-45deg);
}

 /* برای اعداد بنر5*/
#doa1-count-banner {
  /* استایل موبایل  */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* برای دسکتاپ بزرگ‌تر از 600 پیکسل */
@media (min-width: 601px) {
  #doa1-count-banner {
    font-size: 1.8rem;    /* فونت بزرگ‌تر */
    top: 45%;             /* کمی پایین‌تر */
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

 /* برای اعداد بنر6*/
#doa2-count-banner {
  /* استایل موبایل  */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* برای دسکتاپ بزرگ‌تر از 600 پیکسل */
@media (min-width: 601px) {
  #doa2-count-banner {
    font-size: 1.8rem;    /* فونت بزرگ‌تر */
    top: 45%;             /* کمی پایین‌تر */
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

 /* برای اعداد بنر7*/
#doa3-count-banner {
  /* استایل موبایل  */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* برای دسکتاپ بزرگ‌تر از 600 پیکسل */
@media (min-width: 601px) {
  #doa3-count-banner {
    font-size: 1.8rem;    /* فونت بزرگ‌تر */
    top: 45%;             /* کمی پایین‌تر */
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

 /* برای اعداد بنر8*/
#doa4-count-banner {
  /* استایل موبایل  */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* برای دسکتاپ بزرگ‌تر از 600 پیکسل */
@media (min-width: 601px) {
  #doa4-count-banner {
    font-size: 1.8rem;    /* فونت بزرگ‌تر */
    top: 45%;             /* کمی پایین‌تر */
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

/* استایل عمومی برای اعداد زیر بنر9 (موبایل) */
/* استایل عمومی (موبایل) */
.banner {
  position: relative;
}

.doa-count {
  position: absolute;
  color: black; /* تغییر رنگ نوشته به مشکی */
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1;
  background: none; /* حذف پس‌زمینه */
}

/* موقعیت در موبایل */
#doa5-count {
  right: 20px;
  bottom: 0px;
}

#doa6-count {
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
}

#doa7-count {
  left: 20px;
  bottom: 0px;
}

/* استایل و موقعیت برای دسکتاپ */
@media screen and (min-width: 768px) {
  .doa-count {
    font-weight: bold;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 8px;
    color: black; /* اطمینان از مشکی بودن نوشته در دسکتاپ هم */
    background: none; /* اطمینان از نداشتن پس‌زمینه */
  }

  #doa5-count {
    right: 60px;
    bottom: 1px;
  }

  #doa6-count {
    left: 51%;
    bottom: 1px;
    transform: translateX(-50%);
  }

  #doa7-count {
    left: 70px;
    bottom: 1px;
  }
}
/* حذف فاصله تگh1*/
h1 {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}
/* فاصله بالا و پایین بنر9*/
#banner9 {
  margin-top: 15px;
  margin-bottom: 15px;
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.65rem;
  margin-bottom: 1rem;
  padding: 2px;
  white-space: nowrap;
}

.footer-line img {
  height: 25px;
}
/* بنر 13 و14*/
#banner3 {
  width: 100%;          /* عرض کامل والدش */
  max-width: 1024px;     /* حداکثر عرض ثابت (اختیاری) */
  margin: 0 auto;       /* وسط چین */
}

.ofoghi-banners {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 1024px;     /* همون حداکثر عرض بنر 3 */
  margin: 15px auto 0 auto; /* فاصله از بنر 3 و وسط چین */
  box-sizing: border-box;
}

.ofoghi-banners .banner {
  flex: 1 1 0;          /* هر بنر برابر و مساوی فضای موجود */
  max-width: calc(50% - 5px); /* نصف عرض منهای نصف فاصله */
  cursor: pointer;
}

.ofoghi-banners .banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* نمایش شمارنده گوشه بنر 14*/
#banner14 {
  position: relative; /* لازم برای قرارگیری مطلق شمارنده داخل بنر */
  overflow: visible;  /* در صورت نیاز برای نمایش سایه یا بیرون‌زدگی */
}

/* استایل پیش‌فرض (دسکتاپ / تبلت) */
#banner14 #doa9-count-banner {
  position: absolute;
  right: 100px;           /* فاصله از لبه راست */
  bottom: 8px;          /* فاصله از لبه پایین */
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  min-width: 28px;
  text-align: center;
  z-index: 5;            /* بالاتر از تصویر بنر قرار بگیره */
}

/* حالت موبایل — اندازه‌ها کمی کوچکتر و فشرده‌تر */
@media (max-width: 600px) {
  #banner14 #doa9-count-banner {
    right: 35px;
    bottom: 2px;
    font-size: 11px;
    min-width: 24px;
  }
}
/* نمایش شمارنده گوشه بنر 13*/
#banner13 {
  position: relative; /* لازم برای قرارگیری مطلق شمارنده داخل بنر */
  overflow: visible;  /* در صورت نیاز برای نمایش سایه یا بیرون‌زدگی */
}

/* استایل پیش‌فرض (دسکتاپ / تبلت) */
#banner13 #doa8-count-banner {
  position: absolute;
  right: 100px;           /* فاصله از لبه راست */
  bottom: 8px;          /* فاصله از لبه پایین */
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  min-width: 28px;
  text-align: center;
  z-index: 5;            /* بالاتر از تصویر بنر قرار بگیره */
}

/* حالت موبایل — اندازه‌ها کمی کوچکتر و فشرده‌تر */
@media (max-width: 600px) {
  #banner13 #doa8-count-banner {
    right: 35px;
    bottom: 2px;
    font-size: 11px;
    min-width: 24px;
  }
}





