/* تنسيق عام للصفحة */
body {
    font-family: 'Noto Naskh Arabic', serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f7ff 0%, #c4e0fd 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    line-height: 1.6;
}

/* تنسيق الحاوية الرئيسية */
.container {
    width: 92%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2.8rem;
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

/* تنسيق العنوان */
header {
    margin-bottom: 2.5rem;
}

.logo {
    font-size: 3rem;
    color: #2980b9;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    margin: 0.5rem 0;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h1::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #2980b9, transparent);
}

.subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    margin: 1rem 0 0.5rem;
    font-style: italic;
    font-family: 'Tajawal', sans-serif;
}

/* تنسيق محتوى الحديث */
.hadith-container {
    padding: 2.8rem 2.2rem;
    margin: 2.5rem 0;
    background-color: #f8f9fa;
    border-radius: 14px;
    text-align: right;
    position: relative;
    border-right: 5px solid #2980b9;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
}

.hadith-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

/* إضافة علامة اقتباس قبل نص الحديث */
#hadith-text {
    font-family: 'Amiri', serif;
    font-size: 1.85rem;
    color: #34495e;
    margin-bottom: 1.8rem;
    line-height: 1.9;
    position: relative;
    padding-right: 2.5rem;
    transition: opacity 0.5s ease;
    font-weight: 400;
}

#hadith-text::before {
    content: "\201D";
    position: absolute;
    right: 0;
    top: -5px;
    font-size: 4rem;
    color: #3498db;
    line-height: 1;
    opacity: 0.7;
}

#hadith-narrator {
    font-size: 1.25rem;
    color: #7f8c8d;
    font-weight: 500;
    text-align: left;
    font-family: 'Tajawal', sans-serif;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(127, 140, 141, 0.3);
}

/* تنسيق الأزرار */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    margin-top: 2.5rem;
}

button {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    background-color: #2980b9;
    color: white;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

button:hover {
    background-color: #3498db;
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

button:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

button i {
    font-size: 1.1rem;
}

/* تنسيق التذييل */
footer {
    margin-top: 2.5rem;
    font-size: 1rem;
    color: #95a5a6;
    font-family: 'Tajawal', sans-serif;
    font-weight: 400;
}

/* تخصيص للشاشات الصغيرة */
@media screen and (max-width: 600px) {
    .container {
        padding: 1.8rem;
        width: 95%;
        margin: 1rem auto;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    #hadith-text {
        font-size: 1.5rem;
        padding-right: 2rem;
        line-height: 1.7;
    }
    
    #hadith-narrator {
        font-size: 1.1rem;
    }
    
    button {
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .buttons-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        margin-top: 1.8rem;
    }
    
    .logo {
        font-size: 2.3rem;
    }
    
    .hadith-container {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }
}

/* تأثير التلاشي */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تأثير النبض للحديث الجديد */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* تنسيق إشعار النسخ */
.copy-notification {
    position: fixed;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s forwards;
}

.copy-notification.hide {
    animation: slideDown 0.3s forwards;
}

@keyframes slideUp {
    to { bottom: 25px; }
}

@keyframes slideDown {
    to { bottom: -50px; }
}

/* تنسيق بطاقة الحديث للمشاركة كصورة */
.hadith-card {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #c4e0fd 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
    direction: rtl;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    position: relative;
    display: inline-block;
}

.card-header h2::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(to right, transparent, #2980b9, transparent);
}

.card-content {
    padding: 1.8rem;
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    margin-bottom: 1.8rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-right: 5px solid #2980b9;
    text-align: right;
}

#card-hadith-text {
    font-family: 'Amiri', serif;
    font-size: 1.65rem;
    color: #34495e;
    margin-bottom: 1.5rem;
    line-height: 1.9;
    position: relative;
    padding-right: 2.5rem;
}

#card-hadith-text::before {
    content: "\201D";
    position: absolute;
    right: 0;
    top: -5px;
    font-size: 3.2rem;
    color: #3498db;
    line-height: 1;
    opacity: 0.7;
}

#card-hadith-narrator {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.15rem;
    color: #7f8c8d;
    font-weight: 500;
    text-align: left;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(127, 140, 141, 0.3);
}

.card-footer {
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    color: #7f8c8d;
}

/* تنسيق زر المشاركة */
#share-image-btn {
    background-color: #27ae60;
}

#share-image-btn:hover {
    background-color: #2ecc71;
    box-shadow: 0 8px 18px rgba(39, 174, 96, 0.3);
}