/* سوشيل بورسعيد - التصميم الاجتماعي */

.social-container {
    background: #f0f2f5;
    min-height: 100vh;
    padding: 20px 0;
}

.social-header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.social-title {
    color: #1877f2;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.social-title i {
    color: #42b883;
}

.social-subtitle {
    color: #65676b;
    font-size: 1.1rem;
    margin: 0;
}

.social-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.social-content {
    max-width: 680px;
}

.social-sidebar {
    position: sticky;
    top: 20px;
}

/* السايدبار - المنتجات الممولة */
.sidebar-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 2px solid #f0f2f5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header i {
    font-size: 1.2rem;
}

/* قائمة المنتجات الممولة */
.sponsored-products-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sponsored-product-item {
    border-bottom: 1px solid #f0f2f5;
    transition: background-color 0.2s;
}

.sponsored-product-item:last-child {
    border-bottom: none;
}

.sponsored-product-item:hover {
    background-color: #f8f9fa;
}

.product-link {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f2f5;
    margin-bottom: 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-link:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bcc0c4;
    font-size: 2rem;
}

.sponsored-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #050505;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-vendor {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #65676b;
}

.product-vendor i {
    font-size: 0.75rem;
}

.product-vendor .verified {
    color: #1877f2;
    font-size: 0.7rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.sale-price {
    color: #f5576c;
}

.original-price {
    color: #bcc0c4;
    text-decoration: line-through;
    font-size: 0.8rem;
    font-weight: normal;
}

.price {
    color: #1877f2;
}

.no-sponsored {
    padding: 40px 20px;
    text-align: center;
    color: #bcc0c4;
}

.no-sponsored i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.no-sponsored p {
    margin: 0;
    font-size: 0.95rem;
}

/* الإعلانات الممولة في التايملاين */
.sponsored-ad-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #667eea;
    position: relative;
    overflow: hidden;
}

.sponsored-ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    pointer-events: none;
}

.sponsored-ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 16px 20px 0 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sponsored-ad-badge i {
    font-size: 1rem;
}

.sponsored-ad-content {
    padding: 20px;
    position: relative;
    z-index: 1;
}

.sponsored-ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.sponsored-ad-image {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sponsored-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sponsored-ad-link:hover .sponsored-ad-image img {
    transform: scale(1.05);
}

.ad-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bcc0c4;
    font-size: 3rem;
}

.sponsored-ad-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ad-product-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #050505;
    line-height: 1.4;
}

.ad-vendor-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #65676b;
    font-weight: 500;
}

.ad-vendor-info i {
    font-size: 0.9rem;
}

.ad-vendor-info .verified {
    color: #1877f2;
    font-size: 0.85rem;
}

.ad-price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.ad-sale-price {
    color: #f5576c;
    font-size: 1.3rem;
}

.ad-original-price {
    color: #bcc0c4;
    text-decoration: line-through;
    font-size: 0.95rem;
    font-weight: normal;
}

.ad-price {
    color: #1877f2;
    font-size: 1.3rem;
}

.ad-view-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    align-self: flex-start;
}

.ad-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ad-view-btn:active {
    transform: translateY(0);
}

/* علامات التبويب للتنقل - تم حذفها لصالح التصميم الموحد
.navigation-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.nav-tab {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
}

.nav-tab:hover, .nav-tab.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.nav-tab i {
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .navigation-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 200px;
        text-align: center;
    }
}
*/

/* قسم الريلز مثل قصص الفيسبوك */
.stories-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.stories-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e4e6ea;
    background: #f8f9fa;
}

.stories-header h3 {
    margin: 0;
    color: #1877f2;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stories-container {
    padding: 15px 10px;
}

.stories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-scroll::-webkit-scrollbar {
    display: none;
}

/* تحسين عرض الفيديوهات في الريلز */
.story-item:hover .story-thumbnail video {
    opacity: 0.8;
}

.story-thumbnail video {
    transition: opacity 0.3s ease;
}

.story-item {
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.story-item:hover {
    transform: translateY(-5px);
}

.story-thumbnail {
    width: 120px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 8px;
}

.story-thumbnail img,
.story-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-thumbnail video {
    pointer-events: none;
}

.story-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-item:hover .story-overlay {
    opacity: 1;
}

.play-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1877f2;
    font-size: 1.2rem;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.story-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-info .vendor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.story-info .vendor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-info .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.story-info .vendor-name {
    font-size: 0.8rem;
    color: #65676b;
    font-weight: 500;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .stories-container {
        padding: 10px 5px;
    }
    
    .story-item {
        width: 100px;
    }
    
    .story-thumbnail {
        width: 100px;
        height: 150px;
    }
    
    .play-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .story-info .vendor-avatar {
        width: 28px;
        height: 28px;
    }
    
    .story-info .vendor-name {
        font-size: 0.75rem;
    }
}

/* مودال تشغيل الريل */
.reel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    height: 90%;
    max-height: 700px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.reel-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.reel-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.reel-player {
    width: 100%;
    height: 100%;
    position: relative;
}

.reel-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: center;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.reel-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
}

.reel-info .vendor-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.reel-info .vendor-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.reel-info .vendor-info span {
    font-weight: 600;
    font-size: 1rem;
}

.reel-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.reel-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.reel-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 480px) {
    .reel-modal-content {
        width: 95%;
        height: 95%;
    }
    
    .reel-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .reel-info {
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
}

/* إشعار للتجار */
.info-notice {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
}

.notice-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
}

.notice-content i {
    color: #1976d2;
    font-size: 1.5rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.notice-content h5 {
    color: #1565c0;
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.notice-content p {
    color: #0d47a1;
    margin: 0;
    line-height: 1.5;
}

.notice-content a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
}

.notice-content a:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* نموذج إضافة منشور */
.post-composer {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.composer-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e4e6ea;
    gap: 12px;
}

.vendor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.vendor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.composer-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #050505;
}

.posting-as {
    color: #65676b;
    font-size: 14px;
}

.composer-form {
    padding: 0;
}

.composer-content {
    padding: 20px;
}

.post-textarea {
    width: 100%;
    min-height: 100px;
    border: none;
    resize: vertical;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    color: #050505;
    outline: none;
    padding: 0;
    margin-bottom: 15px;
}

.post-textarea::placeholder {
    color: #8a8d91;
}

.composer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-group label {
    font-size: 13px;
    color: #65676b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-input {
    padding: 8px 12px;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.detail-input:focus {
    border-color: #1877f2;
}

.media-upload {
    margin-top: 15px;
}

.media-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f0f2f5;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    color: #65676b;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.media-upload-btn:hover {
    background: #e4e6ea;
}

.media-preview {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f5;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.composer-footer {
    padding: 12px 20px;
    border-top: 1px solid #e4e6ea;
    display: flex;
    justify-content: flex-end;
}

.post-btn {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.post-btn:hover {
    background: #166fe5;
}

.post-btn:disabled {
    background: #e4e6ea;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* رسالة تسجيل الدخول */
.login-prompt {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 40px;
    text-align: center;
}

.prompt-content i {
    font-size: 3rem;
    color: #1877f2;
    margin-bottom: 20px;
}

.prompt-content h3 {
    color: #050505;
    margin-bottom: 10px;
}

.prompt-content p {
    color: #65676b;
    margin-bottom: 20px;
}

.login-btn {
    background: #1877f2;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background: #166fe5;
    color: white;
    text-decoration: none;
}

/* الرسائل التنبيهية */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* قائمة المنشورات */
.posts-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.post-header {
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.vendor-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.vendor-details h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #050505;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.post-time {
    color: #65676b;
    font-size: 13px;
}

.post-location {
    color: #65676b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-pin {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-content {
    padding: 0 20px 16px;
}

.post-text {
    color: #050505;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.post-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #e7f3ff;
    color: #1877f2;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.tag:hover {
    background: #d0e7ff;
    text-decoration: none;
    color: #1877f2;
}

/* وسائط المنشور */
.post-media {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    gap: 2px;
}

.post-media.single-media {
    grid-template-columns: 1fr;
}

.post-media.two-media {
    grid-template-columns: 1fr 1fr;
}

.post-media.three-media {
    grid-template-columns: 2fr 1fr;
}

.post-media.four-plus-media {
    grid-template-columns: 1fr 1fr;
}

.media-item {
    position: relative;
    overflow: hidden;
    background: #f0f2f5;
    min-height: 200px;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.media-item img:hover {
    transform: scale(1.02);
}

.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-more {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

/* إحصائيات المنشور */
.post-stats {
    padding: 12px 20px;
    border-top: 1px solid #e4e6ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #65676b;
    font-size: 14px;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-item i {
    color: #f02849;
}

/* أزرار التفاعل */
.post-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid #e4e6ea;
}

.action-btn {
    background: none;
    border: none;
    padding: 12px;
    color: #65676b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    border-radius: 0;
}

.action-btn:hover {
    background: #f0f2f5;
}

.action-btn.active {
    color: #1877f2;
}

.action-btn.like-btn.active {
    color: #f02849;
}

.action-btn.like-btn.active i {
    color: #f02849;
    animation: likeHeartBeat 0.3s ease;
}

@keyframes likeHeartBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* قسم التعليقات */
.comments-section {
    border-top: 1px solid #e4e6ea;
    background: #f8f9fa;
}

.comments-list {
    padding: 16px 20px;
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e4e6ea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    background: #e4e6ea;
    border-radius: 16px;
    padding: 8px 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.comment-header strong {
    font-size: 13px;
    color: #050505;
}

.comment-time {
    font-size: 12px;
    color: #65676b;
}

.comment-text {
    font-size: 14px;
    color: #050505;
    line-height: 1.4;
}

.comment-form {
    padding: 12px 20px;
    border-top: 1px solid #dadde1;
}

.comment-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    resize: none;
    min-height: 36px;
    max-height: 100px;
}

.comment-input:focus {
    border-color: #1877f2;
}

.comment-submit {
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.comment-submit:hover {
    background: #166fe5;
}

/* لا توجد منشورات */
.no-posts {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 60px 40px;
    text-align: center;
}

.no-posts-content i {
    font-size: 4rem;
    color: #bcc0c4;
    margin-bottom: 20px;
}

.no-posts-content h3 {
    color: #65676b;
    margin-bottom: 10px;
}

.no-posts-content p {
    color: #8a8d91;
    margin: 0;
}

/* Modal عرض الصور */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close:hover {
    opacity: 0.7;
}

/* التصميم المتجاوب */
@media (max-width: 1024px) {
    .social-wrapper {
        grid-template-columns: 1fr;
    }

    .social-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .social-container {
        padding: 10px 0;
    }

    .container {
        padding: 0 10px;
    }

    .social-title {
        font-size: 2rem;
    }

    .social-wrapper {
        grid-template-columns: 1fr;
    }

    .social-sidebar {
        position: static;
    }

    .composer-details {
        grid-template-columns: 1fr;
    }

    .post-actions {
        grid-template-columns: 1fr 1fr;
    }

    .action-btn {
        font-size: 14px;
        padding: 10px;
    }

    .post-media.two-media,
    .post-media.three-media,
    .post-media.four-plus-media {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin-top: 50px;
    }

    .stats-item {
        font-size: 13px;
        gap: 4px;
    }

    .sidebar-card {
        margin-bottom: 20px;
    }

    .sponsored-products-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 15px;
    }

    .sponsored-product-item {
        border-bottom: none;
        border-radius: 10px;
        overflow: hidden;
        background: #f8f9fa;
    }

    .product-link {
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .product-image-wrapper {
        margin-bottom: 0;
        height: 120px;
    }

    .product-info {
        padding: 8px;
    }

    .product-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }

    .product-vendor {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 0.8rem;
    }

    /* الإعلانات الممولة على الجوال */
    .sponsored-ad-image {
        height: 200px;
    }

    .ad-product-title {
        font-size: 1.1rem;
    }

    .ad-price-section {
        font-size: 1rem;
    }

    .ad-sale-price {
        font-size: 1.1rem;
    }

    .ad-view-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .social-header {
        padding: 20px;
    }
    
    .social-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .composer-header,
    .post-header {
        padding: 12px 16px;
    }
    
    .post-content {
        padding: 0 16px 12px;
    }
    
    .post-stats {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .action-btn {
        font-size: 13px;
        padding: 8px;
        gap: 4px;
    }
}

/* تحسينات إضافية */
.post-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-btn:active {
    transform: scale(0.95);
}

.post-btn:active {
    transform: scale(0.98);
}

/* تحسين التمرير */
.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* مودال الريلز */
.reel-modal {
    display: flex;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.reel-modal-content {
    position: relative;
    max-width: 400px;
    width: 90%;
    max-height: 90%;
    background: black;
    border-radius: 15px;
    overflow: hidden;
}

.reel-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-player {
    width: 100%;
    height: 100%;
    position: relative;
}

.reel-player video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: cover;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: white;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #1877f2;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #ff6b6b;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.reel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
}

.reel-info .vendor-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.reel-info .vendor-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.reel-description {
    margin-bottom: 10px;
    font-size: 14px;
}

.reel-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.reel-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}
