/* -------------------- متغيرات الألوان والتنسيقات -------------------- */
:root {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --card-bg: linear-gradient(135deg, #6e8efb, #a777e3);
    --card-text: #fff;
    --item-bg: #fff;
    --item-hover: linear-gradient(135deg, rgba(248, 249, 250, 0.1), rgba(233, 236, 239, 0.3));
    --border-color: #eee;
    --footer-text: #777;
    --promo-bg: linear-gradient(135deg, #f8f9fa, #e9ecef);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
}

/* الوضع الليلي */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --text-light: #bbb;
    --card-bg: linear-gradient(135deg, #3a3d50, #5b2573);
    --card-text: #fff;
    --item-bg: #1e1e1e;
    --item-hover: linear-gradient(135deg, rgba(40, 40, 40, 0.1), rgba(60, 60, 60, 0.3));
    --border-color: #333;
    --footer-text: #999;
    --promo-bg: linear-gradient(135deg, #252525, #1e1e1e);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

/* -------------------- تنسيقات أساسية -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* -------------------- بطاقة الملف الشخصي -------------------- */
.profile-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 35px var(--shadow-color);
    overflow: hidden;
    position: relative;
    margin-top: 50px;
    transition: all 0.3s ease;
}

/* زر تبديل الوضع الليلي/النهاري */
.theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* رأس الصفحة والمعلومات الشخصية */
.header {
    padding: 60px 30px 30px;
    text-align: center;
    color: var(--card-text);
    position: relative;
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    position: relative;
    display: block;
    box-shadow: 0 10px 25px var(--shadow-color);
}

.verified-badge {
    position: absolute;
    bottom: 10px;
    right: 5px;
    width: 30px;
    height: 30px;
    background: #1DA1F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 3px 8px var(--shadow-color);
}

.name {
    margin-top: 20px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.profession {
    font-size: 18px;
    font-weight: 300;
    margin-top: 5px;
    opacity: 0.9;
}

.bio {
    max-width: 80%;
    margin: 15px auto 0;
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.9;
}

/* -------------------- روابط التواصل الاجتماعي -------------------- */
.social-links {
    background-color: var(--item-bg);
    border-radius: 15px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: all 0.3s ease;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    background-color: var(--item-bg);
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--item-hover);
    transform: translateY(100%);
    transition: transform 0.6s ease;
    z-index: 0;
}

.contact-item:hover::before {
    transform: translateY(0);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

/* أيقونات وسائل التواصل */
.icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: white;
    font-size: 24px;
    position: relative;
    z-index: 1;
}

.icon.facebook {
    background: linear-gradient(45deg, #3b5998, #4c70ba);
}

.icon.instagram {
    background: linear-gradient(45deg, #833AB4, #FD1D1D, #FCAF45);
}

.icon.whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.icon.telegram {
    background: linear-gradient(45deg, #0088cc, #2aabee);
}

.icon.phone {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
}

/* معلومات التواصل */
.contact-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.contact-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 18px;
}

.contact-value {
    color: var(--text-light);
    margin-top: 2px;
    font-size: 16px;
}

/* أزرار التواصل */
.contact-button {
    padding: 8px 15px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 14px;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.btn-facebook {
    background: linear-gradient(45deg, #3b5998, #4c70ba);
}

.btn-instagram {
    background: linear-gradient(45deg, #833AB4, #FD1D1D, #FCAF45);
}

.btn-whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.btn-telegram {
    background: linear-gradient(45deg, #0088cc, #2aabee);
}

.btn-phone {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
}

.contact-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

/* -------------------- قسم المحادثة المجهولة -------------------- */
.whatsapp-container {
    width: 350px;
    max-width: 90%;
    margin: 20px auto;
    background: #e5ddd5;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.chat-header {
    background-color: #075e54;
    color: white;
    padding: 12px;
    display: flex;
    align-items: center;
}

.chat-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #128C7E;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.chat-header-info {
    flex: 1;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.chat-header p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.chat-box {
    padding: 10px;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-date {
    align-self: center;
    background-color: rgba(225, 245, 254, 0.9);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin: 10px 0;
    color: #555;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.chat-message {
    position: relative;
    padding: 8px 12px;
    border-radius: 7.5px;
    max-width: 80%;
    word-wrap: break-word;
    margin-bottom: 2px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.chat-message.outgoing {
    background-color: #dcf8c6;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.chat-message.incoming {
    background-color: white;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.chat-anonymous-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}


.chat-message:after {
    content: "";
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
}

.chat-message.outgoing:after {
    right: -6px;
    border-left: 12px solid #dcf8c6;
    border-bottom-right-radius: 16px 12px;
}

.chat-message.incoming:after {
    left: -6px;
    border-right: 12px solid white;
    border-bottom-left-radius: 16px 12px;
}

.chat-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: left;
    margin-top: 3px;
    margin-right: 5px;
    float: left;
}

.chat-form {
    display: flex;
    border-top: 1px solid #ddd;
    background-color: #f0f0f0;
    padding: 5px;
}

.chat-form textarea {
    flex: 1;
    resize: none;
    padding: 12px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    height: 40px;
    margin-left: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-form button {
    background-color: #075e54;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

/* -------------------- رسالة النجاح المحسنة -------------------- */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #075e54, #128C7E);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    max-width: 300px;
}

.success-message.show {
    transform: translateY(0);
    opacity: 1;
    display: flex;
}

.success-message i {
    font-size: 24px;
    margin-left: 15px;
}

.success-message div {
    flex: 1;
}

.success-message h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.success-message p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* -------------------- زر العودة للأعلى -------------------- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    box-shadow: 0 3px 10px var(--shadow-color);
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
}

/* -------------------- تحسين المظهر للشاشات الصغيرة -------------------- */
@media (max-width: 768px) {
    .profile-card {
        margin: 20px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .icon {
        margin: 0 auto 15px;
    }
    
    .bio {
        max-width: 95%;
    }
    
    .contact-button {
        margin-top: 10px;
    }
    
    .theme-toggle {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .whatsapp-container {
        width: 95%;
    }
}

/* -------------------- مؤثرات إضافية -------------------- */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}