@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap");

/* متغيرات الألوان والتنسيقات العامة */
:root {
  --primary: #1a3a6e;
  --secondary: #c19a5b;
  --light: #f8f5f0;
  --dark: #3a2c1a;
  --makkah: #1a6e6a;
  --madinah: #a67c52;
  --text: #333;
  --text-light: #777;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --gold-gradient: linear-gradient(135deg, #c19a5b 0%, #d4af37 100%);
  --blue-gradient: linear-gradient(135deg, #1a3a6e 0%, #1a6e6a 100%);
  --gold: #d4af37;
  --dark-gold: #b8860b;
  --green: #0a5c36;
  --dark-green: #07482a;
  --light-beige: #f8f3e6;
  --dark-brown: #3a2d13;
  --white: #ffffff;
  --makkah-blue: #1a3a6e;
  --madinah-green: #2a5a3a;
  --completed: #29a87c;
  --started: #005b3d;
  --default: #00415c;
  --error: #e74c3c;
  --success: #2ecc71;
  --progress-bg: #e0e0e0;
  --progress-fill: #4caf50;
}

/* إعدادات عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif;
}

/* تعريف الخطوط المخصصة */
@font-face {
  font-family: "Hijri";
  src: url("../fonts/Hijri.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Elgharib-SurahNameV4.ttf";
  src: url("../fonts/Elgharib-SurahNameV4.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}


@font-face {
  font-family: "GE SS Text Medium";
  src: url("../fonts/GE SS Text Medium.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat-ExtraBold";
  src: url("../fonts/Montserrat-ExtraBold.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Hamdy v1";
  src: url("../fonts/Hamdy v1-Bold.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Hayah";
  src: url("../fonts/Hayah-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

body {
  background-color: var(--light-beige);
  color: var(--dark-brown);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* تنسيقات الهيكل الرئيسي */
.main-container {
  display: flex;
  flex-direction: row;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  gap: 30px;
  flex: 1;
  min-height: 100vh;
}

/* تنسيقات الشريط الجانبي لإضافة التلاوات */
.add-recitation-sidebar {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 350px;
  overflow-y: auto;
  z-index: 100;
  background-color: var(--white);
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow);
  display: none !important;
}

/* تنسيقات شريط التنقل الهجري */
.hijri-navigation {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 250px;
  height: calc(100vh - 50px);
  overflow-y: auto;
  z-index: 100;
  background-color: var(--white);
  border-radius: 15px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.hijri-year {
  font-weight: 700;
  color: var(--gold);
  margin: 15px 0 5px;
  cursor: pointer;
}

.hijri-month {
  padding-right: 15px;
  margin: 5px 0;
  cursor: pointer;
  transition: var(--transition);
}

.hijri-month:hover {
  color: var(--gold);
}

.sidebar-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--dark-brown);
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.sidebar-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-brown);
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  min-width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--light-beige);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.2);
}

.add-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(to right, var(--gold), var(--dark-gold));
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.add-btn:hover {
  background: linear-gradient(to right, var(--dark-gold), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* تنسيقات أزرار التحكم */
.edit-btn,
.delete-btn,
.move-btn,
.edit-date-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  transition: var(--transition);
  font-size: 0.9rem;
  padding: 5px;
}

/* تنسيقات قسم التلاوات الرئيسي */
.recitations-container {
  width: 596px;
  max-width: 100%;
  min-height: 842px;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: 15px;
  padding: 15px;
  box-shadow: var(--shadow);
  position: relative;
  background-image: url("../images/walla4.png");
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
}

#surah-index .section-title {
  font-size: 40px;
  position: relative;
  color: white;
  text-align: center;
  z-index: 1;
}

#surah-index .section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  width: 290px;
  height: 20px;
  background: #007b7b;
  border-radius: 2px;
  z-index: -1;
}

/* تنسيقات بطاقات التلاوات */
.recitation-container {
  display: flex;
  position: relative;
  border-radius: 10px;
  margin-bottom: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recitation-number {
  flex: 0 0 8%;
  right: -10px;
  background-image: url(../svgs/number.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 40px;
  height: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  z-index: 1;
  position: relative;
  top: 3px;
  font-family: "Montserrat-ExtraBold";
}

.recitation-second-container {
  cursor: pointer;
  display: flex;
  position: relative;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  flex: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 123, 123, 1) 0%,
    rgba(0, 58, 68, 1) 70.91%
  );
}

.recitation-date-container {
  flex: 0 0 50%;
  background-image: url("../svgs/dateback.svg");
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px;
  color: #007c7c;
  text-align: center;
  position: relative;
  border-radius: 0 7px 7px 0;
}

.recitation-content-container {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  color: white;
  text-align: center;
  font-weight: bold;
  border-radius: 7px 0 0 7px;
}

.prayer-time {
  font-size: 1.2rem;
  margin-bottom: 5px;
  font-family: "GE SS Text Medium";
}

.hijri-date {
  font-size: 0.9rem;
  opacity: 0.9;
  font-family: "GE SS Text Medium";
}

.recitation-actions {
  position: absolute;
  display: grid;
  top: 50%;
  left: 5px;
  z-index: 2;
  transform: translatey(-50%);
  display: none !important;
}

/* تنسيقات العناوين */
.year-header {
  font-family: "Hamdy v1";
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--gold);
  margin: 30px 0 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--gold);
  text-align: center;
}

.month-header {
  font-size: 2.5rem;
  font-weight: 300;
  color: white;
  margin: 20px 0 10px;
  padding-right: 15px;
}

/* تنسيقات قسم البحث بالسور */
.surah-search-section {
  margin-top: 50px;
}

.surah-ayat-count {
  font-size: 0.8rem;
  color: var(--text-light);
}

.no-recitations {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.9rem;
}

/* تنسيقات التبويبات */
.tabs-container {
  width: 100%;
  max-width: 1400px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.recitation-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
  flex-wrap: wrap;
  background-color: var(--white);
  padding: 15px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.recitation-tab {
  padding: 10px 20px;
  background: var(--light-beige);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.recitation-tab.active {
  background: linear-gradient(to right, var(--gold), var(--dark-gold));
  color: white;
}

.recitation-tab:hover:not(.active) {
  background: rgba(193, 154, 91, 0.1);
}

.recitation-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: right;
}

.recitation-tab:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* إخفاء الأقسام غير النشطة */
.recitation-section {
  display: none;
}

.recitation-section.active {
  display: block;
}

/* تنسيقات زر الذهاب لدليل الأئمة */
.imam-navigation-btn {
  display: flex;
  justify-content: center;
  margin: 15px auto 25px;
  max-width: 1200px;
  padding: 0 20px;
}

.go-to-imams-btn {
  background: linear-gradient(135deg, var(--makkah-blue), var(--madinah-green));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 35px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(26, 58, 110, 0.3);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  font-family: "Tajawal", sans-serif;
}

.go-to-imams-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.8s;
}

.go-to-imams-btn:hover::before {
  left: 100%;
}

.go-to-imams-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(26, 58, 110, 0.4);
  background: linear-gradient(135deg, var(--madinah-green), var(--makkah-blue));
}

.go-to-imams-btn:active {
  transform: translateY(-2px) scale(1.02);
  transition: all 0.1s ease;
}

.go-to-imams-btn i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.go-to-imams-btn:hover i {
  transform: translateX(3px);
}

.go-to-imams-btn.pulse {
  animation: pulse-glow 2s infinite;
}

.hijri-year-container {
  position: relative;
}

.delete-year-btn {
display: none;
}

.hijri-year {
  display: flex;
  align-items: center;
}

/* تنسيقات فهرس السور */
.surah-index-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 10px;
  margin-top: 20px;
}

.surah-index-item {
  background-color: var(--default) !important;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 5px;
  padding: 5px;
}

.surah-index-item.started {
  background-color: var(--started) !important;
}

.surah-index-item.completed {
  background-color: var(--completed) !important;
}

.surah-index-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* تنسيقات عرض السور */
.surah-item-container {
  position: relative;
}

.surah-item-container::after {
  content: "";
  width: 200px;
  height: 1px;
  background-color: #878787;
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  bottom: -7px;
}

.surah-header {
  text-align: center;
}

.surah-recitations-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.surah-recitation-item {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
}

.recitation-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.right-side {
  align-items: flex-start;
}

.left-side {
  align-items: flex-end;
}

.ayah-container {
  width: 123px;
  background-image: url(../svgs/ayaback.svg);
  background-size: cover;
  font-family: 'Tajawal';
  padding: 10px;
  border-radius: 5px;
  color: #007c7b;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 5px;
  flex: 1;
}

.date-container {
  font-family: "GE SS Text Medium";
  background-image: url(../svgs/dateaya.svg);
  background-size: cover;
  padding: 10px;
  border-radius: 5px;
  color: white;
  text-align: center;
  width: 254px;
  flex: 1;
  margin-bottom: 7px;
}

/* تنسيقات فونت السور في قسم البحث */
.surah-list .surah-header h3 {
  text-align: center;
  font-weight: 400;
  padding-top: 7px;
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-family: "Elgharib-SurahNameV4.ttf";
  font-size: 65px;
  text-shadow: 1px 1px 0px #007c7b;
  margin-bottom: -20px;
  position: relative;
  z-index: 1;
}

.surah-list .surah-header h3.completed::before {
  content: "";
  background: radial-gradient(
    circle farthest-corner at 50% 50%,
    rgb(0 123 123 / 75%) 0%,
    rgb(0 55 65 / 30%) 100%
  );
  width: 200px;
  height: 50px;
  position: absolute;
  z-index: -1;
  top: 48%;
  transform: translate(-50%, -50%);
  left: 50%;
}

/* تنسيقات الفهرس العادي */
.surah-index-item .surah-name-header {
  font-weight: 500;
  font-family: "Tajawal", sans-serif;
  color: white;
}

h3.surah-name-header.default {
  color: #767676 !important;
}

/* علامة اكتملت للسور المكتملة */
.completed-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 15px;
  font-size: 0.8rem;
  margin-right: 10px;
  font-weight: bold;
  vertical-align: middle;
  position: absolute;
  left: 100px;
  text-shadow: none;
  background: linear-gradient(90deg, #c6b189, #a4855b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Nimbus Sans ME";
}

.completed-badge i {
  margin-left: 3px;
}

.completed-badge p {
  font-weight: bolder;
    font-size: 15px;
  display: inline;
}

/* تنسيقات تصنيف السور */
.surah-status-indicator {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  color: white !important;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-family: "Tajawal", sans-serif;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.status-box {
  width: 30px;
  height: 20px;
  border-radius: 5px;
}

.status-box.completed {
  background-color: var(--completed);
}

.status-box.started {
  background-color: var(--started);
}

.status-box.default {
  background-color: var(--default);
}

/* تنسيقات البحث الفائق */
.super-search-container {
  background: linear-gradient(135deg, var(--makkah-blue), var(--madinah-green));
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  color: white;
}

.super-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.super-search-input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition);
}

.super-search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.2);
}

.super-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.cancel-super-search {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 10px;
  transition: var(--transition);
}

.cancel-super-search:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* تنسيقات الإحصائيات */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-title {
  font-size: 1rem;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.stats-container .stat-card:last-child .stat-value {
  font-family: "tajawal";
  font-size: 1.7rem !important;
  line-height: 1.8;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  font-family: "Montserrat-ExtraBold";
}

.progress-container {
  width: 100%;
  height: 10px;
  background-color: var(--progress-bg);
  border-radius: 5px;
  margin-top: 15px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--progress-fill);
  border-radius: 5px;
  transition: width 1s ease-in-out;
}

.progress-percentage {
  font-size: 1.2rem;
  margin-top: 5px;
  font-weight: bold;
  color: white;
}

.remaining-ayahs-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin-top: 30px;
}

.remaining-ayahs-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scroll-to-remaining {
  background: var(--madinah);
  border: none;
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.scroll-to-remaining:hover {
  background: #916941;
}

.remaining-ayahs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ayah-badge {
  padding: 10px 20px;
  border-radius: 15px;
  font-family: "Montserrat-ExtraBold";
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  font-weight: 500;
  letter-spacing: 0.5px;
  background: var(--gold-gradient);
  color: white;
}

.ayah-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* تنسيقات النسبة المئوية الدائرية */
.circular-progress {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.circular-progress-circle {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--progress-bg);
  stroke-width: 10;
  stroke-linecap: round;
}

.circular-progress-circle-fill {
  stroke: var(--progress-fill);
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  animation: fillProgress 1.5s ease-in-out forwards;
  transform-origin: center;
  transform: rotate(-90deg);
}

.circular-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
}

.circle-chart {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.circle-chart-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-chart-bg {
  fill: none;
  stroke: var(--progress-bg);
  stroke-width: 3.5;
}

.circle-chart-fill {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1.2s cubic-bezier(0.83, 0, 0.17, 1);
  transform-origin: center;
  stroke: url(#gradient1);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out,
    stroke-dasharray 1.2s cubic-bezier(0.83, 0, 0.17, 1);
}

.circle-chart-fill.visible {
  opacity: 1;
  transform: translateY(0);
}

.circle-chart-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.circle-chart-percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  display: block;
  font-family: "Montserrat-ExtraBold";
}

svg.defs-only {
  position: absolute;
  height: 0;
  width: 0;
  margin: -1px;
  padding: 0;
  border: none;
  overflow: hidden;
}

/* تنسيقات البحث */
.search-container {
  position: relative;
  max-width: 600px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  width: 100%;
  padding: 18px 60px 18px 20px;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
  font-family: "Tajawal", sans-serif;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.search-box:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--gold);
}

#surah-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  outline: none;
  color: var(--dark-brown);
}

.search-icon {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(218, 165, 32, 0.4);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
  margin-left: 10px;
}

.search-box:focus {
  transform: translateY(-5px) scale(1.01);
}

#surah-search-input:focus + .search-icon {
  animation: goldPulse 1.5s infinite;
}

#search-clear-btn {
  width: 500px;
  text-align: center;
  margin: 10px auto;
  padding: 14px;
  background: linear-gradient(to right, var(--gold), var(--dark-gold));
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  display: none;
}

.suggestions-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  margin-top: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.suggestion-item:hover {
  background: var(--light-beige);
  transform: translateX(5px);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item .ayah-count {
  font-size: 0.8rem;
  color: var(--text-light);
  background: rgba(0, 0, 0, 0.05);
  padding: 3px 8px;
  border-radius: 10px;
}

.cancel-search-btn {
  background: rgba(193, 154, 91, 0.2);
  border: none;
  color: var(--dark-brown);
  padding: 10px 15px;
  border-radius: 25px;
  cursor: pointer;
  margin-right: 10px;
  transition: var(--transition);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.cancel-search-btn:hover {
  background: rgba(193, 154, 91, 0.3);
  transform: translateY(-2px);
}

.cancel-search-btn i {
  font-size: 0.9rem;
}

#super-search-stats {
  display: none;
  background: linear-gradient(135deg, var(--makkah-blue), var(--madinah-green));
  padding: 20px;
}

/* تنسيقات صفحة الفهرس */
#by-surah h2.section-title {
  display: none;
}

.index-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.index-section {
  border-radius: 10px;
  padding: 0 20px 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  color: white;
}

.index-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.index-section:hover::before {
  width: 10px;
}

.index-section-title {
  font-size: 25px;
  color: #ffffff;
  font-family: "hayah";
  margin-bottom: 15px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.index-section-title i {
  color: #ffffff;
  background: linear-gradient(to right, #00bcd4, #004d55);
  padding: 10px;
  border-radius: 15px;
  width: 50px;
  text-align: center;
}

.index-section-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.index-section-footer {
  margin-top: 15px;
  padding-top: 10px;
  border-bottom: 1px dashed #c3c3c3;
  text-align: left;
}

.year-badge {
  display: inline-block;
  padding: 8px 15px;
  margin: 5px;
  border-radius: 20px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  background-image: url(../svgs/indexpage.svg);
  background-size: cover;
  width: 163px;
  height: 49px;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "hayah";
  font-size: 20px;
  counter-increment: year;
}

.year-badge:hover {
  transform: translateX(-5px);
}

.year-badge::after {
  content: "هـ";
}

.year-badge::before {
  content: counter(year);
  position: absolute;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  color: #004d55;
  width: 20px;
  font-family: "Montserrat-ExtraBold";
  height: 20px;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  font-size: 12px;
}

.section-number {
  position: absolute;
  top: 0;
  left: 20px;
  font-size: 3rem;
  font-weight: bold;
  color: rgba(246, 246, 246, 0.305);
  z-index: 0;
  font-family: "Montserrat-ExtraBold";
}

.index-page {
  background-image: url("../images/walla4.png");
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
  border-radius: 15px;
  padding: 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.index-banner {
  width: 100%;
  height: 842px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 30px;
}

#index-page {
  margin: -15px;
}

/* تنسيقات زر العودة للأعلى */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: #d4af37;
    color: #f8f5f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    z-index: 9999; /* زيادة الـ z-index */
    border: none;
    font-size: 18px;
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

.back-to-top:hover {
    background-color: #b8860b;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}


/* تنسيقات النماذج والرسائل */
.alert-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 25px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: fadeInOut 3s ease-in-out;
  opacity: 0;
}

.alert-error {
  background-color: var(--error);
}

.alert-success {
  background-color: var(--success);
}

.edit-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.edit-modal-content {
  background-color: var(--white);
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow);
}

.edit-modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.edit-modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.edit-modal-save {
  background: linear-gradient(to right, var(--gold), var(--dark-gold));
  color: white;
}

.edit-modal-cancel {
  background: var(--light-beige);
  color: var(--dark-brown);
}

/* تنسيقات لوحة الإحصائيات */
#stats-dashboard .stats-banner {
  background: linear-gradient(135deg, var(--makkah-blue), var(--madinah-green));
  color: white;
  padding: 25px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

#stats-dashboard .stats-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/walla4.png");
  opacity: 1;
}

#stats-dashboard .stats-banner h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
  position: relative;
}

#stats-dashboard .stats-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
}

#stats-dashboard .stats-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  position: relative;
}

#stats-dashboard .stats-nav-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

#stats-dashboard .stats-nav-btn.active {
  background: var(--gold);
  color: var(--dark-brown);
}

#stats-dashboard .stats-nav-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.3);
}

#stats-dashboard .year-selector {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
}

#stats-dashboard .year-selector select {
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: white;
  font-family: "Tajawal", sans-serif;
}

#stats-dashboard .year-selector button {
  background: var(--gold);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

#stats-dashboard .year-selector button:hover {
  background: var(--dark-gold);
}

#stats-dashboard .stats-view {
  animation: fadeIn 0.5s ease-out;
}

#stats-dashboard .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

#stats-dashboard .stat-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--gold);
}

#stats-dashboard .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

#stats-dashboard .stat-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-left: 20px;
  position: absolute;
  opacity: 0.2;
  right: 20px;
  top: 20px;
}

#stats-dashboard .stat-content {
  position: relative;
  z-index: 1;
}

#stats-dashboard .stat-content h3 {
  font-size: 1.2rem;
  color: var(--dark-brown);
  margin-bottom: 10px;
  font-weight: 600;
}

#stats-dashboard .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: "Montserrat-ExtraBold";
  margin: 10px 0;
}

#stats-dashboard .stat-breakdown {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

#stats-dashboard .breakdown-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: var(--text-light);
}

#stats-dashboard .breakdown-item i {
  color: var(--gold);
}

#stats-dashboard .stat-subtext {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 5px 0;
}

#stats-dashboard .stat-progress {
  margin-top: 15px;
  background: var(--light-beige);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

#stats-dashboard .progress-bar {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 4px;
  transition: width 1s ease-in-out;
  width: 0;
}

#stats-dashboard .progress-percent {
  position: absolute;
  left: 10px;
  top: -25px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
}

#stats-dashboard .recent-completed {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed var(--gold);
}

#stats-dashboard .recent-completed h4 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

#stats-dashboard .recent-surahs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#stats-dashboard .recent-surah {
  background: rgba(193, 154, 91, 0.1);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.9rem;
  color: var(--dark-gold);
  border: 1px solid rgba(193, 154, 91, 0.3);
}

#stats-dashboard .charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

#stats-dashboard .chart-card,
#stats-dashboard .stats-section,
#stats-dashboard .yearly-surahs,
#stats-dashboard .yearly-header {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow);
}

#stats-dashboard .chart-card h3,
#stats-dashboard .stats-section h3,
#stats-dashboard .yearly-surahs h3 {
  font-size: 1.3rem;
  color: var(--dark-brown);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#stats-dashboard .chart-card h3 i,
#stats-dashboard .stats-section h3 i,
#stats-dashboard .yearly-surahs h3 i {
  color: var(--gold);
}

#stats-dashboard .chart-wrapper {
  position: relative;
  height: 300px;
  width: 100%;
}

#stats-dashboard .chart-zoom {
  margin-top: 15px;
  text-align: center;
}

#stats-dashboard .chart-zoom button {
  background: rgba(26, 58, 110, 0.1);
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

#stats-dashboard .chart-zoom button:hover {
  background: rgba(26, 58, 110, 0.2);
}

#stats-dashboard .additional-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

#stats-dashboard .stats-section h3 {
  border-bottom: 2px solid var(--light-beige);
  padding-bottom: 10px;
}

#stats-dashboard .records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

#stats-dashboard .record-card {
  background: var(--light-beige);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

#stats-dashboard .record-icon {
  font-size: 1.8rem;
  color: var(--gold);
}

#stats-dashboard .record-content h4 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 5px;
}

#stats-dashboard .record-value {
  font-size: 17px;
  font-weight: 700;
  color: #005c66;
}

#stats-dashboard .last-recitations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#stats-dashboard .last-recitation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: var(--light-beige);
  border-radius: 8px;
  transition: var(--transition);
}

#stats-dashboard .last-recitation-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#stats-dashboard .last-recitation-details {
  font-weight: 500;
}

#stats-dashboard .last-recitation-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

#stats-dashboard .yearly-header {
  text-align: center;
  padding: 20px;
}

#stats-dashboard .yearly-header h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

#stats-dashboard .yearly-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

#stats-dashboard .yearly-stat {
  text-align: center;
  padding: 0 20px;
  position: relative;
}

#stats-dashboard .yearly-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50px;
  background: #eee;
}

#stats-dashboard .yearly-stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  font-family: "Montserrat-ExtraBold";
  margin-bottom: 5px;
}

#stats-dashboard .yearly-stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

#stats-dashboard .surahs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

#stats-dashboard .surah-year-item {
  background: var(--light-beige);
  padding: 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#stats-dashboard .surah-year-item i {
  color: var(--gold);
}

/* تنسيقات عداد المشاهدات في صفحة الإمام */
.imam-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.imam-basic-info h1 {
  margin: 0;
  color: var(--primary-color);
  font-size: 28px;
}

.imam-basic-info p {
  margin: 5px 0 0 0;
  color: var(--text-light);
}

.imam-views-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--gold);
  color: white;
  border-radius: 25px;
  font-weight: bold;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(193, 154, 91, 0.3);
}

.imam-views-counter i {
  font-size: 18px;
}

.imam-views-counter .views-count {
  font-size: 18px;
}

/* الأنيميشنات */
@keyframes shine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 8px 25px rgba(26, 58, 110, 0.3);
  }
  50% {
    box-shadow: 0 8px 35px rgba(193, 154, 91, 0.5);
  }
  100% {
    box-shadow: 0 8px 25px rgba(26, 58, 110, 0.3);
  }
}


@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

@keyframes fillProgress {
  from {
    stroke-dashoffset: 314;
  }
  to {
    stroke-dashoffset: calc(314 - (314 * var(--progress-percent)) / 100);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes goldPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(180, 89, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

@keyframes pulseBefore {
  0% {
    transform: translate(50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(50%, -50%) scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: translate(50%, -50%) scale(1);
    opacity: 0.8;
  }
}

@keyframes slideAfter {
  0% {
    right: 100%;
    opacity: 0;
  }
  20% {
    right: 0;
    opacity: 1;
  }
  80% {
    right: 0;
    opacity: 1;
  }
  100% {
    right: -100%;
    opacity: 0;
  }
}

@keyframes inputGlow {
  0% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  }
  100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(193, 154, 91, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(193, 154, 91, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(193, 154, 91, 0);
  }
}

.count-up {
  animation: countUp 1s ease-out forwards;
}

.search-box.pulse {
  animation: pulse 1.5s infinite;
}

/* التصميم المتجاوب */
@media (max-width: 1200px) {
  .hijri-navigation {
    display: none;
  }

  .add-recitation-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 12px;
  }

  .recitation-content-container {
    font-size: 13px;
  }

  .hijri-date {
    font-size: 13px;
  }

  .prayer-date {
    font-size: 15px;
  }

.wrapper {
  transform: scale(0.7);
  transform-origin: top left;
  width: 142.857%;
  position: absolute;
  top: 0;
  left: 0;
}

  .main-container {
    max-width: 100%;
    padding: 0;
  }

  .recitations-container {
    min-height: auto;
    padding: 10px;
    transform: scale(1);
  }
.ayah-container {
    font-size: inherit;
}
  .imam-navigation-btn {
    margin: 10px auto 20px;
    padding: 0 15px;
  }

  .go-to-imams-btn {
    padding: 12px 25px;
    font-size: 1rem;
    gap: 10px;
  }

  .go-to-imams-btn i {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 30px;
  }

  .tabs-container {
    padding: 0 15px;
    margin: 15px auto 0;
  }

  .recitation-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    background-color: var(--white);
    padding: 15px;
    border-radius: 15px;
    box-shadow: var(--shadow);
  }

  .recitation-tab {
    padding: 12px 8px;
    background: var(--light-beige);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70px;
    gap: 5px;
  }

  .recitation-tab.active {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    color: white;
    box-shadow: 0 5px 15px rgba(193, 154, 91, 0.3);
  }

  .recitation-tab:not(.active):hover {
    background: rgba(193, 154, 91, 0.15);
    transform: translateY(-2px);
  }

.recitation-tab i {
    display: none;
}
  /* إخفاء الزر المخفي */
  .recitation-tab[style*="display: none"] {
    display: none !important;
  }

  /* تحسين عداد المشاهدات */
  .imam-views-counter {
    margin: 0 auto 15px;
    max-width: 1200px;
    padding: 0 15px;
  }

  .imam-views-counter > div {
    justify-content: center;
  }

  .imam-views-counter > div > div {
    padding: 8px 15px;
    font-size: 14px;
  }
  .search-container {
    max-width: 100%;
    padding: 0 10px;
  }

  .search-box {
    padding: 12px 50px 12px 15px;
  }

  .search-icon {
    width: 43px;
    height: 43px;
    top: 0;
    left: 0;
    margin-left: 0;
  }

  @viewport {
    width: device-width;
    zoom: 1;
    max-zoom: 1;
    min-zoom: 1;
    user-zoom: fixed;
  }

  * {
    touch-action: manipulation;
  }

  .imam-header-info {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .imam-basic-info h1 {
    font-size: 24px;
  }


  #stats-dashboard .stats-grid,
  #stats-dashboard .charts-container,
  #stats-dashboard .additional-stats,
  #stats-dashboard .records-grid {
    grid-template-columns: 1fr;
  }

  #stats-dashboard .yearly-stats {
    flex-direction: column;
    gap: 20px;
  }

  #stats-dashboard .yearly-stat:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .search-icon {
    top: 0;
  }

  .wrapper {
    transform: scale(0.6);
    width: 166.667%;
    height: 166.667%;
  }

  .recitation-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .recitation-tab {
    padding: 10px 6px;
    font-size: 16px;
    min-height: 65px;
  }

  .go-to-imams-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    gap: 8px;
  }
  
  .ayah-container {
    width: 110px;
  }

  .date-container {
    width: 243px;
  }
  .surah-index-item {
      padding: 10px 5px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .recitations-container {
    min-height: auto;
  }
}

@media (max-width: 375px) {
  .wrapper {
    zoom: 0.9 !important;
  }
}

@media (max-width: 345px) {
  .wrapper {
    zoom: 0.86 !important;
  }
}

@media (max-width: 320px) {
  .wrapper {
    zoom: 0.74 !important;
  }
}

/* تنسيقات خاصة لوضع البحث الفائق */
.super-search-mode .surah-item-container:not(.active-surah) {
  display: none;
}

.active-surah {
  animation: fadeIn 0.5s ease-out;
}

.super-search-mode .surah-item-container {
  margin-bottom: 30px;
  border: 2px solid rgba(193, 154, 91, 0.3);
  border-radius: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.super-search-mode .surah-header h3 {
  font-size: 3.5rem;
  margin-bottom: 10px;
}

.super-search-mode .surah-recitations-container {
  margin-top: 20px;
}

.recitation-section {
  transition: opacity 0.3s ease;
}
