:root {
    --primary-color: #4CAF50;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #050505;
    --text-sub: #65676b;
    --border-color: #ddd;
    --danger-color: #f44336;
}

body.dark-mode {
    --bg-color: #18191a;
    --card-bg: #242526;
    --text-color: #e4e6eb;
    --text-sub: #b0b3b8;
    --border-color: #3e4042;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-bottom: 70px; /* مساحة للشريط السفلي */
    transition: background-color 0.3s;
}

/* --- الهيدر (الشريط العلوي) --- */
.header {
    background-color: var(--card-bg);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.brand-area { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 18px; color: var(--primary-color); }
.app-logo img { width: 30px; vertical-align: middle; }
.header-icon { color: var(--text-color); font-size: 20px; margin-left: 10px; text-decoration: none; }
.icon-btn { font-size: 20px; cursor: pointer; padding: 5px; color: var(--text-color); }

/* --- القائمة الجانبية --- */
.sidebar {
    position: fixed; top: 0; right: -280px; width: 250px; height: 100%;
    background: var(--card-bg); box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: 0.3s; z-index: 1000; padding: 20px; display: flex; flex-direction: column; gap: 15px;
}
.sidebar.active { right: 0; }
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 999; display: none;
}
.overlay.active { display: block; }
.menu-item {
    text-decoration: none; color: var(--text-color); font-size: 16px;
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border-radius: 8px; transition: 0.2s;
}
.menu-item:hover { background-color: rgba(0,0,0,0.05); }

/* --- المنشورات --- */
#postsContainer, #profilePostsContainer {
    max-width: 600px; margin: 20px auto; padding: 0 10px;
}
.post-card {
    background: var(--card-bg); border-radius: 10px;
    padding: 15px; margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar-small { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.user-info-text h4 { margin: 0; font-size: 15px; }
.user-info-text span { font-size: 12px; color: var(--text-sub); }
.post-body h3 { margin: 5px 0; font-size: 16px; }
.post-body p { font-size: 14px; line-height: 1.5; color: var(--text-color); }
.post-actions {
    border-top: 1px solid var(--border-color);
    margin-top: 10px; padding-top: 10px;
    display: flex; justify-content: space-around;
}

/* --- الشريط السفلي --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--card-bg); height: 60px;
    display: flex; justify-content: space-around; align-items: center;
    border-top: 1px solid var(--border-color); z-index: 90;
}
.nav-item { font-size: 24px; color: var(--text-sub); cursor: pointer; text-decoration: none; }
.nav-item.active { color: var(--primary-color); }
.add-post-btn {
    background: var(--primary-color); color: white;
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 24px; margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4); cursor: pointer;
}

/* --- نافذة النشر المنبثقة --- */
.add-post-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--card-bg); z-index: 2000; flex-direction: column;
}
.add-post-header {
    padding: 15px; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.btn-text { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--text-color); }
.btn-publish { background: var(--primary-color); color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; }
.add-post-body { padding: 20px; flex: 1; overflow-y: auto; }
.label-green { color: var(--primary-color); font-weight: bold; margin: 15px 0 5px; font-size: 14px; }
.input-rect input, .input-rect textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border-color);
    border-radius: 10px; background: var(--bg-color); color: var(--text-color);
    box-sizing: border-box; outline: none;
}
.upload-square {
    border: 2px dashed var(--border-color); border-radius: 15px; padding: 20px;
    text-align: center; cursor: pointer; margin-bottom: 10px;
}
.preview-img-box { width: 100%; border-radius: 10px; margin-top: 10px; display: none; }

/* --- بروفايل --- */
.profile-header { text-align: center; padding: 20px; background: var(--card-bg); margin-bottom: 10px; }
.profile-pic-container { position: relative; width: 100px; margin: 0 auto 10px; }
.profile-pic { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--primary-color); object-fit: cover; }
.stats-row { display: flex; justify-content: center; gap: 30px; margin-top: 15px; }
.stat-box { text-align: center; cursor: pointer; }
.action-btn-profile {
    background: var(--primary-color); color: white; border: none;
    padding: 8px 20px; border-radius: 20px; margin: 5px; cursor: pointer;
}

/* =========================================
   🚀 ستايل زر الإفادة الجديد (Hooby Style)
   ========================================= */
.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-sub);
    font-size: 14px;
    transition: transform 0.2s;
    user-select: none;
}

.action-btn:active {
    transform: scale(0.95);
}

/* أيقونة الشعار (رمادي وباهت في الحالة العادية) */
.efada-icon {
    width: 22px;
    height: 22px;
    filter: grayscale(100%) opacity(0.6); /* السر هنا: يجعله رمادياً */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* عند التفعيل (Active) */
.action-btn.active .efada-icon {
    filter: grayscale(0%) opacity(1); /* يرجع لألوانه الطبيعية */
    transform: scale(1.2); /* تكبير بسيط */
}

.action-btn.active {
    color: var(--primary-color); /* النص يصبح أخضر */
    font-weight: bold;
}
/* --- ستايل التعليقات --- */
.comments-section {
    display: none; /* مخفي افتراضياً */
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    padding-top: 10px;
    background-color: rgba(0,0,0,0.02);
    border-radius: 0 0 10px 10px;
}

.comments-section.active {
    display: block; /* يظهر عند الضغط */
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 0 10px;
}

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    background: var(--bg-color);
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    flex: 1;
}

.comment-author {
    font-weight: bold;
    font-size: 12px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 2px;
}

.comment-input-area {
    display: flex;
    gap: 5px;
    padding: 10px;
}

.comment-input {
    flex: 1;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    outline: none;
    font-family: inherit;
}

.send-comment-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

