:root {
    --primary: #2d6a4f;
    --secondary: #40916c;
    --bg: #f3f4f6;
    --white: #ffffff;
    --text-color: #333333;
    --accent: #d4a373;
}

body {
    background-color: var(--bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    direction: rtl;
}

/* الهيدر */
.main-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 15px; background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 1000; height: 70px;
}

.date-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-top: 15px; /* تم تقليل المسافة بعد إزالة الزينة */
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(82, 183, 136, 0.15));
    border-radius: 15px;
    margin-left: 15px;
    margin-right: 15px;
    border: 1px solid rgba(45, 106, 79, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* إضافة ظل جمالي خفيف */
    backdrop-filter: blur(5px);
}


.hijri-date {
    color: #52b788; /* نفس درجة اللون الأخضر في موقعك */
    font-weight: bold;
    font-size: 0.95em;
}

.gregorian-date {
    color: #888;
    font-size: 0.85em;
}

/* في الوضع الليلي */
body.dark-theme .date-container-modern {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.menu-btn { cursor: pointer; display: flex; flex-direction: column; gap: 5px; width: 30px; }
.bar { width: 25px; height: 3px; background-color: var(--primary); border-radius: 2px; }

/* المنيو */
.side-menu {
    position: fixed; top: 0; right: -300px; width: 260px; height: 100%;
    background: var(--white); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2000; padding: 20px;
}
.side-menu.active { right: 0; }
.close-btn { font-size: 28px; color: #e63946; cursor: pointer; text-align: left; }
.menu-header { font-size: 22px; font-weight: bold; margin: 20px 0; color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 10px; }
.menu-items a { display: block; padding: 15px; text-decoration: none; color: var(--text-color); border-bottom: 1px solid #f0f0f0; transition: 0.3s; }
.menu-items a:hover { background: #f9f9f9; padding-right: 20px; }

/* السبحة (الرقم في النص) */
.counter-box {
    background: var(--white); width: 200px; height: 200px;
    margin: 30px auto; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 8px solid var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.counter-display { font-size: 60px; font-weight: bold; color: var(--primary); }

/* الأذكار */
.zekr-card {
    background: var(--white); border-right: 6px solid var(--primary);
    padding: 30px 20px; border-radius: 15px; min-height: 150px;
    margin: 20px 0; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; font-size: 1.2rem; line-height: 1.6;
}


/* الختمة */
.ramadan-card {
    background: linear-gradient(135deg, #2d6a4f, #1b4332); color: white;
    padding: 30px; border-radius: 20px; text-align: center; box-shadow: 0 10px 25px rgba(45,106,79,0.3);
}

/* المطور */
.dev-card-modern {
    background: white; padding: 30px; border-radius: 20px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.dev-avatar-ring {
    width: 90px; height: 90px; border: 3px dashed var(--primary);
    border-radius: 50%; margin: 0 auto 15px; padding: 5px;
}
.dev-avatar-main {
    width: 100%; height: 100%; background: #eee; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.wa-btn {
    display: inline-block; background: #25D366; color: white; padding: 12px 25px;
    border-radius: 50px; text-decoration: none; margin-top: 15px; font-weight: bold;
}

/* الأزرار */
.btn-main { width: 100%; padding: 18px; background: var(--primary); color: white; border: none; border-radius: 15px; font-size: 1.1rem; cursor: pointer; box-shadow: 0 4px 10px rgba(45,106,79,0.2); }
.btn-reset { background: #e63946; color: white; border: none; padding: 10px 25px; border-radius: 10px; margin-top: 15px; cursor: pointer; }

/* الوضع الليلي */
body.dark-theme { background-color: #121212; color: #eee; }
.dark-theme .main-header, .dark-theme .side-menu, .dark-theme .zekr-card, .dark-theme .dev-card-modern, .dark-theme .mood-container { background: #1e1e1e !important; color: white; }

/* Mood */
.mood-container { background: white; margin: 15px 0; padding: 15px; border-radius: 15px; }
.mood-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mood-buttons button { padding: 12px; border: 1px solid #eee; border-radius: 10px; cursor: pointer; background: #fff; }

.container { padding: 10px 20px 100px; max-width: 500px; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 1. تلوين القائمة في الوضع الليلي */
body.dark-theme .menu-items a { color: #ffffff !important; }
body.dark-theme .menu-header { color: #4ade80; }

/* 2. تنسيق أزرار المطور الجديدة */
.protected-name { user-select: none; -webkit-user-select: none; color: var(--primary); }
.dua-card { 
    background: #f0fdf4; border: 1px dashed var(--primary); 
    padding: 15px; border-radius: 12px; margin: 15px 0; 
    color: var(--primary); font-size: 14px; line-height: 1.5;
}
.dark-theme .dua-card { background: #1b4332; color: #fff; border-color: #4ade80; }

.wa-btn { background-color: #25D366 !important; margin-bottom: 10px; display: block; text-decoration: none; color: white; padding: 12px; border-radius: 10px; font-weight: bold; }
.community-btn { background-color: #128C7E !important; display: block; text-decoration: none; color: white; padding: 12px; border-radius: 10px; font-weight: bold; }

/* 3. تلوين زر الأذكار المختار (v1) */
.cat-btn.active-category {
    background: var(--primary) !important;
    color: white !important;
}

/* --- تعديلات شكل أزرار الأذكار v1 --- */
.category-selection {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 10px;
}

.cat-btn {
    padding: 12px 22px;
    border: 2px solid #2d6a4f; /* لون أخضر أساسي */
    background: #ffffff;
    color: #2d6a4f;
    border-radius: 50px; /* الشكل البيضاوي المميز */
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* شكل الزرار لما تختاره */
.cat-btn.active-category {
    background: #2d6a4f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(45,106,79,0.4);
    transform: scale(1.05); /* تكبير بسيط للزر المختار */
}

/* تنسيق الأزرار في الوضع الليلي */
.dark-theme .cat-btn {
    background: #1e1e1e;
    border-color: #4ade80;
    color: #4ade80;
}

.dark-theme .cat-btn.active-category {
    background: #4ade80 !important;
    color: #121212 !important;
}

/* تنسيق قسم الحالة النفسية */
.mood-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.mood-buttons button {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* الوضع الليلي لقسم الحالة النفسية - مريح للعين */
body.dark-theme .mood-container {
    background: #1e1e1e !important;
    border: 1px solid #333;
}

body.dark-theme .mood-title {
    color: #4ade80 !important;
}

body.dark-theme .mood-buttons button {
    background: #2d2d2d;
    border-color: #444;
    color: #eee;
}

body.dark-theme .mood-buttons button:hover {
    background: #3d3d3d;
    border-color: #4ade80;
}

body.dark-theme #gregorian-date {
    color: #bbb !important; /* لون رمادي فاتح عشان يظهر */
}

body.dark-theme #hijri-date {
    color: #4ade80 !important; /* لون أخضر فوسفوري للهجري في الضلمة */
}

/* وضوح التاريخ في كل الأوضاع */
#hijri-date { display: block !important; visibility: visible !important; }
.dark-theme #gregorian-date { color: #aaaaaa !important; }


/* تأثير ظهور المحتوى */
.tab-content.active {
    display: block;
    animation: smoothAppear 0.5s ease-out;
}

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

/* نبض دائرة السبحة عند الضغط */
.counter-box {
    transition: transform 0.1s ease;
}

.counter-box:active {
    transform: scale(0.95);
}

/* تأثير خارجي ناعم */
.counter-box {
    box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.4);
    animation: pulseShadow 2s infinite;
}

@keyframes pulseShadow {
    0% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(45, 106, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0); }
}

/* حركة الأزرار عند تمرير الماوس */
.btn-main, .cat-btn, .mood-buttons button {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.btn-main:hover, .mood-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
}

.btn-main:active {
    transform: translateY(0);
}

.side-menu {
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.zekr-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-right: 8px solid var(--primary);
}

body.dark-theme .zekr-card {
    background: linear-gradient(145deg, #1e1e1e, #252525);
    border-right-color: #4ade80;
}

/* --- تجميل دائرة السبحة في الوضع الليلي --- */
body.dark-theme .counter-box {
    background: radial-gradient(circle, #1e1e1e 0%, #121212 100%) !important;
    border-color: #4ade80 !important;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2), inset 0 0 15px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .counter-display {
    color: #4ade80 !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); /* وهج خفيف للرقم */
}

/* حركة الوميض للدائرة في الليلي عند التسبيح */
body.dark-theme .counter-box:active {
    border-color: #ffffff !important;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.4) !important;
}

/* تنسيق ورد التسبيح */
.tasbih-target {
    text-align: center;
    margin: 10px 0 20px;
    animation: fadeIn 0.8s ease;
}

.tasbih-target p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.golden-text {
    color: #d4a373; /* لون ذهبي هادئ */
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0;
}

/* التنسيق في الوضع الليلي ليصبح ذهبي براق */
body.dark-theme .golden-text {
    color: #ffca28 !important; 
    text-shadow: 0 0 10px rgba(255, 202, 40, 0.4);
}

body.dark-theme .tasbih-target p {
    color: #bbb;
}

/* حاوية التحديات الكبرى */
.tasbih-challenges {
    margin: 30px auto;
    padding: 0 15px;
    max-width: 500px; /* لضمان شكل متناسق على كل الشاشات */
}

.challenge-main-title {
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: bold;
}

/* شكل الكارت الاحترافي */
.challenge-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-right: 5px solid #d4a373; /* الخط الجانبي الجمالي */
    animation: slideIn 0.5s ease forwards;
}

/* التنسيق في الوضع الليلي */
body.dark-theme .challenge-card {
    background: #252525;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-right-color: #ffca28;
}

/* معلومات التحدي داخل الكارت */
.challenge-info {
    flex: 1; /* عشان ياخد المساحة المتاحة ويزق الزرار لليسار */
    text-align: right;
}

.challenge-info p {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

.challenge-info h4 {
    color: #d4a373;
    font-size: 1.1rem;
    margin: 8px 0 0;
    line-height: 1.4;
}

body.dark-theme .challenge-info h4 {
    color: #ffca28;
}

/* زر قبول التحدي */
.challenge-btn {
    background: var(--primary, #2d6a4f);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    min-width: 100px;
    margin-right: 15px;
}

.challenge-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* حالة اكتمال التحدي */
.challenge-card.completed {
    opacity: 0.8;
    border-right-color: #4ade80 !important;
    background: #f0fff4;
}

body.dark-theme .challenge-card.completed {
    background: #1a2e1f;
}

.challenge-card.completed .challenge-btn {
    background: #4ade80;
    cursor: default;
}

/* أنيميشن الظهور */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes successPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.completed {
    animation: successPop 0.4s ease-out;
}


/* تنسيق قسم الختمة */
.subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 25px;
}

.ramadan-plans {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plan-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideUp 0.6s ease forwards;
    border-left: 6px solid var(--primary);
}

body.dark-theme .plan-card {
    background: #252525;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-tag {
    background: rgba(45, 106, 79, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
}

.plan-header h3 {
    margin: 10px 0;
    color: #333;
}

body.dark-theme .plan-header h3 {
    color: #eee;
}

.plan-body p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.plan-detail {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark-theme .plan-detail {
    background: #333;
}

.plan-detail i {
    color: #d4a373;
}

.plan-detail span strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* ألوان الحواف المتميزة */
.gold-border { border-left-color: #ffd700; }
.silver-border { border-left-color: #c0c0c0; }
.bronze-border { border-left-color: #cd7f32; }

/* أنيميشن الظهور من الأسفل */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تنسيق مقدمة فضل القرآن */
.quran-intro {
    background: rgba(45, 106, 79, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 0 15px 25px;
    text-align: center;
    border: 1px dashed var(--primary);
}

body.dark-theme .quran-intro {
    background: rgba(74, 222, 128, 0.05);
}

.quran-intro i {
    color: #e63946; /* لون أحمر حيوي */
    font-size: 2rem; /* كبرناه شوية عشان يبان جماله */
    margin-bottom: 15px;
    display: block; /* عشان يجي في النص بالظبط فوق الكلام */
    animation: heartBeat 1.5s infinite; /* اختيار اختياري: لو عايزه ينبض بنعومة */
}

/* حركة نبض خفيفة للقلب (اختياري) */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.quran-intro p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

body.dark-theme .quran-intro p {
    color: #ddd;
}

.fadl-box {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-style: italic;
}

body.dark-theme .plan-body p {
    color: #f0f0f0 !important; /* لون فاتح جداً ليكون واضحاً */
    opacity: 0.9;
}

body.dark-theme .plan-header h3 {
    color: #ffffff !important;
}

/* جعل الأيقونة بجانب النص واضحة */
.plan-detail i {
    color: #ffca28 !important; /* ذهبي لامع */
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
}

.name-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-bottom: 5px solid #d4a373; /* حافة ذهبية سفلية */
    transition: transform 0.3s ease;
}

body.dark-theme .name-card {
    background: #252525;
    border-bottom-color: #ffca28;
}

.name-card h3 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.name-description {
    display: none;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

body.dark-theme .name-description {
    color: #ccc;
    border-top-color: #444;
}

.show-desc-btn {
    background: rgba(212, 163, 115, 0.1);
    border: none;
    color: #d4a373;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px auto 0;
}

/* تنسيق تنبيه الصلاة على النبي */
.prophet-alert {
    position: fixed;
    bottom: -100px; /* مخفي تحت */
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 90%;
    max-width: 400px;
}

.prophet-alert.show {
    bottom: 30px; /* يظهر فوق شوية */
}

.prophet-alert i {
    font-size: 1.5rem;
    color: #ffca28;
}

.prophet-alert p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: bold;
}

/* تنسيق الإشعار الجديد ليظهر بشكل احترافي */
.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: #1e3a29; 
    color: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #2ecc71;
    box-shadow: 0 15px 50px rgba(0,0,0,0.7);
    z-index: 10000;
    text-align: center;
    width: 300px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-alert.show {
    transform: translate(-50%, -50%) scale(1);
}

.custom-alert p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: bold;
}

.custom-alert button {
    background: #2ecc71;
    color: #1e3a29;
    border: none;
    padding: 10px 40px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}


/* تنسيق اسم المطور في الوضع العادي */
#dev-name-field {
    color: #1a3c26; /* لون أخضر غامق جداً وواضح */
    font-weight: bold;
    padding: 5px 10px;
    border-bottom: 2px solid #2ecc71; /* خط تحت الاسم يبرزه */
    transition: all 0.3s ease;
}

/* تنسيق اسم المطور في الوضع الليلي (Dark Mode) */
body.dark-theme #dev-name-field {
    color: #2ecc71; /* لون أخضر فاتح ومضيء يبرز وسط السواد */
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.6); /* توهج خفيف يخلي الاسم "منور" */
    border-bottom: 2px solid #ffffff; /* الخط يتحول للأبيض في الليلي */
}

.zekr-card {
    display: flex;
    flex-direction: column; /* ترتيب العناصر تحت بعض */
    align-items: center; /* توسيط كل اللي جوه الكارد */
    text-align: center;
    padding: 30px 20px;
    position: relative;
    /* باقي تنسيقاتك للألوان والخلفية */
}

.info-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #d4af37;
    cursor: pointer;
    font-size: 18px;
}

.card-counter {
    /* أساسيات الدائرة */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    /* الألوان (ذهبي زي ما طلبت) */
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    border: 2px solid #d4af37;
    
    /* التوسيط في نص الكارد */
    display: flex !important; /* فرض العرض كـ flex */
    align-items: center; /* توسيط الرقم طولياً */
    justify-content: center; /* توسيط الرقم عرضياً */
    margin: 20px auto !important; /* auto من اليمين والشمال هي اللي بتجيبها في النص */
    
    /* الخط */
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
    
    /* منع أي تداخل قديم */
    position: static !important; 
    float: none !important;
    clear: both;
}

.navigation-btns {
    display: flex !important;
    flex-direction: row !important; /* لضمان الترتيب من اليمين لليوم */
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

.btn-main {
    flex: 1; /* الزرارين قد بعض */
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.challenge-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-right: 5px solid var(--primary);
}

body.dark-theme .challenge-card { background: #252525; }

.challenge-info h4 { margin: 5px 0; color: var(--primary); }

.challenge-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
}

.challenge-card.completed { border-right-color: #4ade80; opacity: 0.8; }
.challenge-card.completed .challenge-btn { background: #4ade80; }

.update-card {
    background-color: #1e1e1e; /* لون غامق يناسب الصورة */
    border: 1px solid #333;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    color: #ffffff;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.update-card .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.update-card h3 {
    color: #4CAF50; /* لون أخضر هادئ مثل المستعمل في موقعك */
    margin-bottom: 5px;
}

.update-card p {
    font-size: 14px;
    opacity: 0.8;
}

.feedback-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* ضل ناعم جداً */
    max-width: 90%;
    margin: 20px auto;
    border-top: 5px solid var(--primary);
}

.feedback-header h3 {
    color: var(--primary);
    margin: 10px 0 5px;
}

.feedback-header p {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

.input-wrapper input, .input-wrapper textarea {
    width: 100%;
    padding: 15px;
    border: 1.5px solid rgba(45, 106, 79, 0.2);
    border-radius: 12px;
    font-family: inherit;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fdfdfd;
}

.input-wrapper input:focus, .input-wrapper textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.2);
}

.modern-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modern-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(45, 106, 79, 0.3);
}


.input-wrapper {
    margin-bottom: 15px;
}

.input-wrapper input, .input-wrapper textarea {
    width: 100%;
    padding: 12px 15px;
    background: #252525;
    border: 1px solid #444;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
    outline: none;
}

.input-wrapper input:focus, .input-wrapper textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.modern-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    width: 100%;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.modern-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* حاوية المتتبع */
.diary-wrapper { background: #fdfaf5; padding: 20px; border-radius: 20px; direction: rtl; }
.diary-header { text-align: center; margin-bottom: 20px; color: #8b6d31; }

/* التقويم */
.mini-calendar { background: #fff; padding: 15px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 20px; }
/* --- تظبيط جدول المتتبع للموبايل --- */
.week-days { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    text-align: center; 
    font-size: 0.75rem; 
    color: #999; 
    margin-bottom: 12px;
    font-weight: bold;
}

.days-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 10px 5px; /* مسافة متناسقة بالطول والعرض */
    justify-items: center; /* توسيط الدواير في النص بالظبط */
}

.day-num { 
    padding: 0; /* مسحنا البادينج اللي كان مبوظ الدنيا */
    font-size: 0.9rem; 
    cursor: pointer; 
    border-radius: 50%; 
    transition: 0.3s; 
    position: relative; 
    z-index: 1; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 32px; /* مقاس مثالي لشاشة التليفون */
    height: 32px; 
}

.day-num.active-day { 
    background: #ffb703; 
    color: #fff; 
    font-weight: bold; 
}

/* شكل النجمة لما اليوم يكتمل */
.day-num.completed { 
    background: transparent !important; 
    color: #1a432f !important; /* لون الرقم جوه النجمة */
    font-weight: bold; 
}

body.dark-theme .day-num.completed { 
    color: #fff !important; 
}

.day-num.completed::before {
    content: '\f005'; 
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900;
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    font-size: 35px; /* حجم النجمة مناسب جداً لاحتواء الدائرة */
    color: #ffd700; 
    z-index: -1; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/* كروت المهام بالصور */
.task-card {
    height: 80px;
    margin-bottom: 12px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.task-card::before { content: ''; position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.4); z-index: 1; }
.task-card h4 { z-index: 2; font-size: 1.1rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

/* زر الصح (Checkmark) */
.check-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
    transition: 0.3s;
}
.check-circle.checked { background: #2d6a4f; border-color: #2d6a4f; }
.check-circle i { display: none; color: #fff; font-size: 1rem; }
.check-circle.checked i { display: block; }

/* التنقل السفلي */
.bottom-nav-tracker { display: flex; background: #fff; border-radius: 30px; margin-top: 20px; border: 1px solid #eee; overflow: hidden; }
.nav-btn { flex: 1; padding: 12px; border: none; background: none; font-weight: bold; color: #999; cursor: pointer; }
.nav-btn.active { background: #fdf2d5; color: #2d6a4f; border-bottom: 3px solid #2d6a4f; }

/* الأيام القادمة (المقفولة) */
.locked-day { opacity: 0.3; cursor: not-allowed; filter: grayscale(1); }

/* نجمة الإنجاز في التقويم */
.achieve-star { position: absolute; top: -5px; right: -5px; font-size: 10px; }

/* إصلاح الوضع الليلي */
body.dark-theme .diary-wrapper { background: #121212; color: #e0e0e0; }
body.dark-theme .mini-calendar { background: #1e1e1e; border: 1px solid #333; }
body.dark-theme .day-num { color: #888; }
body.dark-theme .active-day { color: #fff; background: #c69b3f; }

body.dark-theme .task-card { 
    background-color: #222; /* لون احتياطي لو الصورة مختفية */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
body.dark-theme .task-card::before { background: rgba(0,0,0,0.6); } /* تغميق خلفية الصورة */
body.dark-theme .bottom-nav-tracker { background: #1e1e1e; border-color: #333; }
body.dark-theme .nav-btn { color: #666; }
body.dark-theme .nav-btn.active { background: #2c2518; color: #c69b3f; }

/* تحسين شكل زر الصح في الصيام */
.fasting-card-main {
    background: #fff; padding: 15px; border-radius: 15px;
    display: flex; align-items: center; justify-content: space-between;
}
body.dark-theme .fasting-card-main { background: #1e1e1e; border: 1px solid #333; }

/* الوضع الليلي - إجباري للكروت */
body.dark-theme .diary-wrapper { background: #000 !important; color: #fff !important; }
body.dark-theme .task-card { 
    border: 1px solid #333; 
    background-color: #1a1a1a; /* لون احتياطي */
}
body.dark-theme .task-card h4 { color: #fff !important; text-shadow: 2px 2px 4px #000; }
body.dark-theme .fasting-card-main { background: #1a1a1a !important; border: 1px solid #333; }
body.dark-theme .day-num { color: #666; }
body.dark-theme .active-day { background: #d4af37 !important; color: #000 !important; }
body.dark-theme .mini-calendar { background: #111 !important; border: 1px solid #222; }

/* تحسين رؤية الدوائر في كل الأقسام */
.check-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    /* لون رمادي خفيف للإطار عشان يبان في الوضع الفاتح */
    border: 2px solid #ccc; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.02); /* لمسة ظل خفيفة */
}

/* في كروت الصلاة (لأن الخلفية صورة) هنخلي الإطار أبيض */
.task-card .check-circle {
    border-color: #fff;
    background: transparent;
}

/* لما نضغط صح */
.check-circle.checked {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
}

.check-circle i {
    font-size: 14px;
    color: #fff;
    /* التأكد إن علامة الصح ظاهرة فقط عند الضغط */
    display: none;
}

.check-circle.checked i {
    display: block;
}

/* في الوضع الليلي */
body.dark-theme .check-circle {
    border-color: #444;
    background: rgba(255,255,255,0.05);
}

/* الأيام المقفولة */
.locked-day { opacity: 0.15; pointer-events: none; filter: grayscale(1); }


/* شريط التنقل الجديد */
.tracker-nav-scroll {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 10px 0; margin-bottom: 15px;
}
.t-nav-btn {
    flex: 0 0 auto; padding: 8px 16px; border-radius: 20px;
    border: 1px solid #ddd; background: #fff; cursor: pointer;
}
.t-nav-btn.active { background: #c69b3f; color: #fff; border-color: #c69b3f; }

/* الحاويات */
.tracker-section { display: none; }
.tracker-section.active { display: block; }

/* الكروت العادية (بدون صور) للسنن والأذكار */
.simple-card {
    background: #fff; padding: 15px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px; border: 1px solid #eee;
}

/* روابط القرآن */
.quran-links { display: grid; gap: 10px; }
.q-link-card {
    background: #2d6a4f; color: #fff; padding: 20px;
    border-radius: 12px; text-align: center; text-decoration: none; font-weight: bold;
}

/* إصلاح الليلي */
body.dark-theme .simple-card { background: #1a1a1a; border-color: #333; color: #fff; }
body.dark-theme .t-nav-btn { background: #222; border-color: #444; color: #aaa; }

.tg-btn {
    background-color: #0088cc !important;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    margin-top: 15px; 
}

/* تنسيق روابط القرآن الكبيرة */
.quran-links {
    display: grid;
    gap: 15px;
    padding: 20px;
}

.q-link-card {
    background: #2d6a4f; /* لون أخضر داكن مناسب للقرآن */
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.q-link-card:hover {
    transform: scale(1.02);
    background: #40916c;
}

/* تنسيق الوضع الليلي للروابط */
body.dark-theme .q-link-card {
    background: #1b4332;
    border: 1px solid #2d6a4f;
}

/* تأكد من أن التبويبات النشطة تظهر */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- تعريفات الحركة (Animations) --- */

/* نبض هادئ للوضع الفاتح */
@keyframes pulse-soft-light {
    0% { transform: scale(1); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
    50% { transform: scale(1.015); box-shadow: 0 15px 35px rgba(45, 106, 79, 0.15); }
    100% { transform: scale(1); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
}

/* نبض متوهج للوضع الليلي */
@keyframes pulse-soft-dark {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0,0,0,0.4); border-color: rgba(45, 106, 79, 0.3); }
    50% { transform: scale(1.015); box-shadow: 0 15px 45px rgba(82, 183, 136, 0.25); border-color: rgba(82, 183, 136, 0.5); }
    100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0,0,0,0.4); border-color: rgba(45, 106, 79, 0.3); }
}

/* حركة اهتزاز بسيطة عند الضغط */
@keyframes click-wobble {
    0% { transform: scale(0.98); }
    25% { transform: scale(1.02) rotate(-1deg); }
    50% { transform: scale(0.98) rotate(1deg); }
    75% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

/* الكارت الرئيسي */
.quran-card-modern {
    background: var(--card-bg, #ffffff); /* يتكيف مع الوضع الليلي */
    padding: 25px;
    border-radius: 20px;
    margin: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid rgba(45, 106, 79, 0.1);
        /* إضافة حركة النبض المستمرة */
    animation: pulse-soft-light 4s infinite ease-in-out;
    /* جعل أي تغيير في الحجم أو الظل سلس جداً */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-theme .quran-card-modern {
    background: #1e1e1e;
    border-color: #2d6a4f;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-header h3 { margin: 10px 0; color: #2d6a4f; }
body.dark-theme .card-header h3 { color: #52b788; }

/* شريط الإنجاز */
.progress-box { margin: 20px 0; }

.progress-info {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.progress-bar-bg {
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

body.dark-theme .progress-bar-bg { background: #333; }

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2d6a4f, #52b788);
    box-shadow: 0 0 10px rgba(82, 183, 136, 0.4);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* الأزرار */
.action-btn-main {
    background: #2d6a4f;
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.action-btn-main:hover {
    background: #1b4332;
    transform: translateY(-2px);
}

.btn-reset-minimal {
    background: transparent;
    color: #888;
    border: none;
    margin-top: 15px;
    cursor: pointer;
    font-size: 0.85em;
    text-decoration: underline;
}

.action-btn-main:active {
    /* يجعل الزر ينضغط للداخل بواقعية */
    transform: scale(0.95) translateY(3px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background: #1b4332; /* لون أغمق عند الضغط */
}

/* جعل حركة شريط الإنجاز "نطاطة" (Bouncy) وأكثر حيوية */
.progress-bar-fill {
    /* ... احتفظ بالخصائص القديمة ... */
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* --- تحسينات الوضع الليلي --- */
body.dark-theme .quran-card-modern {
    background: #181818; /* خلفية أغمق لزيادة التباين */
    border: 1px solid #2d6a4f; /* حدود خضراء واضحة */
    
    /* تطبيق حركة النبض المتوهجة الخاصة بالوضع الليلي */
    animation-name: pulse-soft-dark; 
    
    /* ظل أعمق وأقوى */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* تحسين خلفية الشريط في الوضع الليلي */
body.dark-theme .progress-bar-bg {
    background: #2a2a2a;
    border: 1px solid #3d3d3d; /* إضافة حدود خفيفة للشريط الفارغ */
}

/* إضافة توهج للنص في الوضع الليلي */
body.dark-theme .card-header h3,
body.dark-theme .parts-counter strong {
    color: #52b788;
    text-shadow: 0 0 10px rgba(82, 183, 136, 0.4); /* تأثير Glow للنص */
}

/* حاوية الزينة */
.ramadan-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    pointer-events: none; /* عشان متغطيش على الأزرار وتعرف تدوس تحتها */
    z-index: 9999;
    overflow: hidden;
}

/* العنصر الواحد (الفانوس أو النجمة) */
.zina-item {
    font-size: 25px;
    position: relative;
    transform-origin: top center; /* عشان يتهز من فوق */
    animation: swing-zina 3s infinite ease-in-out;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); /* توهج خفيف */
}

/* إضافة خيط رفيع فوق كل عنصر */
.zina-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
}

/* حركة الاهتزاز (Swing) */
@keyframes swing-zina {
    0% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    100% { transform: rotate(-10deg); }
}

/* تحسين التوهج في الوضع الليلي */
body.dark-theme .zina-item {
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

/* --- تحديث الزينة لضبط المكان --- */
.ramadan-decoration {
    position: absolute;
    top: 5px; /* نزلناها شوية عشان التاريخ */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    pointer-events: none; /* مهم جداً عشان متمنعش الضغط */
    z-index: 10; /* قللنا الـ z-index عشان التاريخ يظهر فوقها */
    overflow: hidden;
}

/* --- تصميم قصاصات الاحتفال الحقيقية --- */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
}

/* حركة القصاصات وهي نازلة */
@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.forum-container {
    padding: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.forum-header { text-align: center; margin-bottom: 20px; }
.forum-header h3 { color: #52b788; text-shadow: 0 0 10px rgba(82, 183, 136, 0.3); }

.post-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(82, 183, 136, 0.2);
    margin-bottom: 25px;
}

#dua-input {
    width: 100%;
    height: 80px;
    background: transparent;
    border: none;
    color: white;
    resize: none;
    font-family: inherit;
    outline: none;
    margin-bottom: 10px;
}

.error-text {
    color: #ff4d4d;
    font-size: 0.85em;
    margin-top: 10px;
    display: none;
}

/* شكل بطاقة الدعاء */
.dua-card {
    background: rgba(45, 106, 79, 0.1);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-right: 4px solid #52b788;
    animation: slideUp 0.4s ease-out;
}

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

.app-banner {
    background-color: #1b4332; /* لون أخضر غامق زي ستايل موقعك */
    color: white;
    padding: 10px;
    text-align: center;
    position: relative;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.download-btn {
    background-color: #ffca28; /* لون أصفر ذهبي ملفت */
    color: #000;
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
}

.close-banner {
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
}

.dua-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(45, 106, 79, 0.05);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-right: 4px solid var(--secondary);
}
.dua-content p { margin: 0 0 8px 0; line-height: 1.6; }
.dua-time { color: #888; font-size: 0.8em; }
.dua-actions {
    display: flex;
    gap: 10px;
    margin-right: 15px;
}
.dua-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #52b788;
    transition: 0.2s;
}
.dua-actions button.delete { color: #ff4d4d; }
.dua-actions button:hover { transform: scale(1.15); }

/* --- تظبيط كارت الفيدباك في الوضع الليلي --- */
body.dark-theme .feedback-card {
    background-color: #1e1e1e;
    border-top: 5px solid #4ade80;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
body.dark-theme .feedback-header h3 { color: #4ade80; }
body.dark-theme .feedback-header p { color: #aaa; }
body.dark-theme .input-wrapper input,
body.dark-theme .input-wrapper textarea {
    background-color: #252525;
    border: 1px solid #444;
    color: #fff;
}
body.dark-theme .input-wrapper input:focus,
body.dark-theme .input-wrapper textarea:focus {
    border-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

/* =========================================
   تصميم قسم مواقيت الصلاة (الاحترافي)
   ========================================= */
.prayer-header-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: -30px; /* لدمجها مع الكارت اللي تحتها */
    padding-bottom: 40px;
}

.city-selector {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.city-selector select {
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    outline: none;
    cursor: pointer;
    margin-left: 10px;
    font-family: inherit;
}

.city-selector select option {
    color: #333;
}

/* =========================================
   التصميم الإبداعي الفخم لقسم الصلاة
   ========================================= */
.next-prayer-card {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    background-image: url('https://images.unsplash.com/photo-1542816417-0983c9c9ad53?q=80&w=800');
    background-size: cover;
    background-position: center;
    border-radius: 25px;
    margin: 0 15px 25px;
    box-shadow: 0 15px 35px rgba(45, 106, 79, 0.4);
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.3); /* إطار ذهبي خفيف */
}

.prayer-glass-effect {
    background: rgba(0, 0, 0, 0.5); /* تعتيم أنيق للصورة */
    backdrop-filter: blur(8px);
    padding: 40px 20px;
    color: white;
    text-align: center;
    border-radius: 25px;
}

#next-prayer-name { 
    font-size: 2.5rem; 
    margin: 10px 0; 
    color: #ffd700; 
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6); 
    font-weight: 900;
}

#next-prayer-time { 
    font-size: 3.5rem; 
    font-weight: bold; 
    margin-bottom: 15px; 
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

#prayer-countdown { 
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05)); 
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: inline-block; 
    padding: 10px 25px; 
    border-radius: 50px; 
    font-weight: bold; 
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* شبكة الصلوات بتصميم عصري */
.today-prayers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px 15px;
}

.prayer-time-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(45, 106, 79, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

body.dark-theme .prayer-time-box { 
    background: #1e1e1e; 
    border-color: #333; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.4); 
}

.prayer-time-box i { font-size: 1.8rem; color: #52b788; margin-bottom: 10px; transition: 0.3s; }
.prayer-time-box .p-name { font-weight: bold; font-size: 0.95rem; color: #666; margin-bottom: 5px; }
.prayer-time-box .p-time { font-size: 1.2rem; color: var(--primary); font-weight: 900; }

body.dark-theme .prayer-time-box .p-name { color: #bbb; }
body.dark-theme .prayer-time-box .p-time { color: #4ade80; }

/* تأثير الصلاة القادمة (Active) - السحر كله هنا */
.prayer-time-box.active-prayer {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateY(-10px) scale(1.05); /* بتكبر وتطلع لفوق */
    box-shadow: 0 15px 30px rgba(45, 106, 79, 0.4);
    border: none;
}

body.dark-theme .prayer-time-box.active-prayer {
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    box-shadow: 0 15px 30px rgba(74, 222, 128, 0.2);
    border: 1px solid #4ade80;
}

/* تلوين النص والأيقونة للأبيض في الكارت النشط */
.prayer-time-box.active-prayer i,
.prayer-time-box.active-prayer .p-name,
.prayer-time-box.active-prayer .p-time {
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* إضافة لمحة إضاءة خفيفة (Shine) للكارت النشط */
.prayer-time-box.active-prayer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}


/* جدول الإمساكية */
.table-responsive { overflow-x: auto; background: white; border-radius: 15px; padding: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
body.dark-theme .table-responsive { background: #1e1e1e; }
.prayer-table { width: 100%; border-collapse: collapse; min-width: 500px; text-align: center; }
.prayer-table th { background: rgba(45, 106, 79, 0.1); color: var(--primary); padding: 12px; font-size: 0.9rem; }
body.dark-theme .prayer-table th { background: rgba(74, 222, 128, 0.1); color: #4ade80; }
.prayer-table td { padding: 10px; border-bottom: 1px solid #eee; font-size: 0.85rem; color: #444; }
body.dark-theme .prayer-table td { border-bottom-color: #333; color: #ccc; }


/* =========================================
   تصميم النوافذ المنبثقة المخصصة (Custom Modals)
   ========================================= */
.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
}
.custom-modal-box {
    background: white; width: 90%; max-width: 350px;
    padding: 30px 20px; border-radius: 20px; text-align: center;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    transform: scale(0.9); animation: modalPop 0.3s ease forwards;
}
body.dark-theme .custom-modal-box { background: #1e1e1e; color: white; border: 1px solid #333; }
@keyframes modalPop { to { transform: scale(1); } }

.modal-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 15px; font-size: 25px; }
.modal-icon.warning { background: #fff3cd; color: #ffc107; }
.modal-icon.edit { background: #d1ecf1; color: #17a2b8; }
body.dark-theme .modal-icon.warning { background: rgba(255, 193, 7, 0.2); }
body.dark-theme .modal-icon.edit { background: rgba(23, 162, 184, 0.2); }

.custom-modal-box h3 { margin: 0 0 10px; color: #333; }
body.dark-theme .custom-modal-box h3 { color: #fff; }
.custom-modal-box p { color: #666; margin-bottom: 25px; font-size: 0.95rem; }
body.dark-theme .custom-modal-box p { color: #aaa; }

#prompt-input { width: 100%; box-sizing: border-box; padding: 15px; border-radius: 12px; border: 1px solid #ccc; font-family: inherit; margin-bottom: 20px; resize: none; background: #f9f9f9; }
body.dark-theme #prompt-input { background: #252525; border-color: #444; color: white; }

.modal-actions { display: flex; gap: 10px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 10px; border: none; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-danger { background: #e63946; color: white; }
.btn-success { background: #2d6a4f; color: white; }
.btn-cancel { background: #e0e0e0; color: #333; }
body.dark-theme .btn-cancel { background: #333; color: #ccc; }

/* --- زر القلب العائم --- */
.floating-heart-btn {
    position: fixed;
    bottom: 80px; /* فوق القائمة السفلية لو في */
    left: 20px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #ff4b4b, #ff0000);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    cursor: pointer;
    z-index: 999;
    animation: heartBeat 2s infinite;
}

/* نافذة الآيات */
.daily-msg-box {
    background: url('https://www.transparenttextures.com/patterns/arabesque.png'), linear-gradient(135deg, #ffffff, #fdfbf7) !important;
}
body.dark-theme .daily-msg-box {
    background: url('https://www.transparenttextures.com/patterns/arabesque.png'), linear-gradient(135deg, #1e1e1e, #2a2a2a) !important;
}
.heart-icon { background: rgba(255, 75, 75, 0.1) !important; color: #ff4b4b !important; }
.quran-text {
    font-size: 1.3rem !important;
    line-height: 1.8;
    color: var(--primary);
    font-weight: bold;
    font-family: 'Amiri', 'Traditional Arabic', serif;
}
body.dark-theme .quran-text { color: #52b788; }

/* --- كارت الراديو --- */
.radio-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 5px solid var(--secondary);
}
body.dark-theme .radio-card { background: #1e1e1e; border-top-color: #4ade80; }
.radio-card h3 { color: var(--primary); margin-top: 0; }
body.dark-theme .radio-card h3 { color: #4ade80; }

/* --- البوصلة --- */
.qibla-card {
    background: white; border-radius: 20px; padding: 25px 20px;
    margin-top: 25px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
body.dark-theme .qibla-card { background: #1e1e1e; }
.warning-text { font-size: 0.8rem; color: #e63946; background: rgba(230, 57, 70, 0.1); padding: 10px; border-radius: 10px; }
.compass-container {
    width: 200px; height: 200px; margin: 20px auto;
    border: 5px solid var(--primary); border-radius: 50%;
    position: relative; background: url('https://upload.wikimedia.org/wikipedia/commons/1/18/Compass_rose_pale.svg') no-repeat center;
    background-size: contain;
}
.compass-arrow {
    position: absolute; top: 10px; left: 50%;
    transform: translateX(-50%); font-size: 30px;
    transition: transform 0.2s ease-out; transform-origin: center 90px;
}

/* --- زر المشاركة العائم --- */
.floating-share-btn {
    position: fixed;
    bottom: 145px; /* رفعناه فوق زرار القلب بمسافة متناسقة */
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FFB703, #F5A623); /* لون ذهبي أنيق */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(255, 183, 3, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s;
}

.floating-share-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* =========================================
   تصميم صفحة المطور - النسخة العصرية (اللمسة الأخيرة)
   ========================================= */
.dev-card-modern {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 25px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 20px auto;
    max-width: 92%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInCard 0.8s ease-out;
}

.dev-avatar-ring {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    /* حلقة ملونة شيك جداً حوالين الصورة */
    background: linear-gradient(45deg, #FFD700, #ff8c00, #4facfe);
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.2);
}

.dev-avatar-main {
    background: #fff;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.protected-name {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 8px;
    /* لون الاسم متدرج */
    background: linear-gradient(45deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dev-bio {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 0 10px;
}

.dua-card {
    background: rgba(255, 215, 0, 0.08);
    border: 1px dashed #FFD700;
    border-radius: 15px;
    padding: 15px;
    font-size: 14.5px;
    color: #b8860b;
    font-weight: bold;
    margin-bottom: 25px;
    line-height: 1.6;
}

.dev-social {
    margin-bottom: 25px;
}

/* الزرار الجديد - أسود فخم يليق بـ Linktree */
.modern-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, #2b2b2b, #4a4a4a);
    color: #fff !important;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.modern-link-btn i {
    font-size: 18px;
}

.modern-link-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dev-footer {
    font-size: 13px;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.dev-footer p {
    margin: 0 0 8px 0;
}

.version-badge {
    display: inline-block;
    background: #e0f7fa;
    color: #00838f;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
}

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

/* الزرار العائم */
.floating-download-btn {
    position: fixed;
    bottom: 90px; /* تقدر تغير الرقم ده عشان ترفعه أو تنزله */
    left: 20px; /* على الشمال */
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    cursor: pointer;
    z-index: 999;
    animation: bounceBtn 2s infinite; /* حركة خفيفة تلفت الانتباه */
}

/* خلفية النافذة المنبثقة المظلمة */
.download-modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

/* المربع الأبيض بتاع النافذة */
.download-modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 20px;
    width: 85%;
    max-width: 350px;
    text-align: center;
    position: relative;
    animation: scaleUp 0.3s ease;
}

/* علامة الإغلاق X */
.close-download {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

/* زرار التحميل جوه النافذة */
.modal-download-link {
    display: inline-block;
    margin-top: 15px;
    background: linear-gradient(45deg, #28a745, #218838);
    color: #fff !important;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

/* حركات الأنيميشن */
@keyframes bounceBtn {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-8px);}
    60% {transform: translateY(-4px);}
}
@keyframes scaleUp {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* =========================================
   تصميم زرار التحميل العائم - أعلى الكل
   ========================================= */
.floating-download-btn {
    position: fixed;
    /* السر هنا! زودنا الرقم جداً عشان نرفعه أعلى من كل الأزرار التانية رأسيّاً */
    bottom: 240px !important; 
    left: 25px; /* حركناه لليمين شوية عشان ميكونش لازق في حافة الشاشة */
    background: linear-gradient(45deg, #28a745, #218838);
    color: white !important;
    width: 60px; /* كبرناه شوية عشان يبان إنه "الزرار الأهم" */
    height: 60px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 26px; /* كبرنا الأيقونة */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* ظل أفخم */
    cursor: pointer;
    /* الترتيب الطبقي - فوق الكل بلا منازع */
    z-index: 1000000 !important; 
    animation: bounceBtn 2s infinite;
    border: 3px solid #fff; /* إطار أبيض شيك جداً */
    pointer-events: auto !important;
    transition: all 0.3s ease;
}

/* النافذة المنبثقة - لازم تكون أعلى حاجة في الموقع كله */
.download-modal {
    display: none; 
    position: fixed;
    z-index: 2000000 !important; /* أعلى طبقة على الإطلاق */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* سواد أفخم */
    align-items: center;
    justify-content: center;
}
