/**
 * single-post.css - Complete standalone version
 * All post styles in one file
 */

/* ==================== LAYOUT ==================== */
.single-post-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 1.5rem 0;
    max-width: 1100px;
    margin: 0 auto;
}
@media (min-width: 1024px) {
    .single-post-wrapper {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }
}

/* ==================== BACK ==================== */
.back-navigation { grid-column: 1 / -1; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 50px;
    background: #fff; border: 1px solid #e2e8f0;
    color: #475569; font-size: 0.85rem; font-weight: 500;
    text-decoration: none; transition: all 0.2s;
}
.dark-mode .back-link { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.back-link:hover { background: #f1f5f9; color: #6366f1; border-color: #6366f1; }

/* ==================== POST CARD ==================== */
.single-post {
    background: #fff; border-radius: 20px; padding: 28px 24px;
    border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    max-width: 100%; overflow-x: hidden;
}
.dark-mode .single-post { background: #1e293b; border-color: #334155; }

.single-post-title {
    font-size: 1.6rem; font-weight: 800; margin-bottom: 16px;
    padding-bottom: 12px; border-bottom: 2px solid rgba(99,102,241,0.2);
    color: #0f172a; line-height: 1.4;
}
.dark-mode .single-post-title { color: #f1f5f9; border-bottom-color: rgba(99,102,241,0.3); }

/* ==================== POST HEADER ==================== */
.single-post .post-header {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 14px; margin-bottom: 16px;
}
.single-post .post-author { display: flex; align-items: center; gap: 10px; }
.single-post .author-avatar {
    width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
    border: 2px solid rgba(99,102,241,0.2); flex-shrink: 0;
}
.single-post .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.single-post .author-name { font-weight: 700; font-size: 0.95rem; margin: 0; }
.single-post .author-name a { color: #0f172a; text-decoration: none; }
.dark-mode .single-post .author-name a { color: #f1f5f9; }
.single-post .author-name a:hover { color: #6366f1; }
.single-post .post-time { font-size: 0.75rem; color: #64748b; display: flex; align-items: center; gap: 4px; }
.dark-mode .single-post .post-time { color: #94a3b8; }

/* Categories */
.single-post .post-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.single-post .category-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600; text-decoration: none;
    border: 1.5px solid; background: transparent; transition: all 0.2s;
}
.single-post .category-tag:hover { transform: translateY(-1px); }

/* ==================== VIEW STATS ==================== */
.post-stats { display: flex; gap: 10px; font-size: 0.78rem; color: #64748b; margin-right: auto; }
.dark-mode .post-stats { color: #94a3b8; }
.post-stats span { display: flex; align-items: center; gap: 4px; }

/* ==================== FEATURED IMAGE ==================== */
.post-featured-image { margin: 16px 0; border-radius: 14px; overflow: hidden; max-height: 450px; background: #f1f5f9; }
.post-featured-image img { width: 100%; height: auto; max-height: 450px; object-fit: contain; display: block; }

/* ==================== GALLERY ==================== */
.post-gallery-section { margin: 16px 0; }
.gallery-section-title {
    font-size: 0.85rem; font-weight: 600; margin-bottom: 8px;
    color: #334155; display: flex; align-items: center; gap: 6px;
}
.dark-mode .gallery-section-title { color: #cbd5e1; }
.gallery-count-badge {
    font-size: 0.7rem; background: rgba(99,102,241,0.1);
    color: #6366f1; padding: 2px 8px; border-radius: 10px;
}
.image-gallery {
    display: flex; flex-wrap: nowrap; gap: 8px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 2px 0 8px; scrollbar-width: thin;
}
.image-gallery::-webkit-scrollbar { height: 4px; }
.image-gallery::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 4px; }
.image-gallery::-webkit-scrollbar-thumb { background: #6366f1; border-radius: 4px; }
.gallery-item {
    flex: 0 0 auto; width: 90px; height: 90px;
    border-radius: 10px; overflow: hidden; cursor: pointer;
    position: relative; transition: transform 0.2s;
}
.gallery-item:hover { transform: scale(1.05); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s; color: #fff; font-size: 1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ==================== POST CONTENT ==================== */
.post-content { margin: 20px 0; max-width: 100%; overflow-x: hidden; }
.post-text { line-height: 1.85; font-size: 0.95rem; color: #334155; word-break: break-word; }
.dark-mode .post-text { color: #cbd5e1; }

/* Product box */
.product-info-box {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 14px; padding: 16px; margin: 16px 0; max-width: 100%;
}
.dark-mode .product-info-box { background: #0f172a; border-color: #334155; }
.product-price { font-size: 1.2rem; font-weight: 700; color: #10b981; }

/* Lyrics box */
.music-lyrics-box {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 14px; padding: 16px; margin: 16px 0; max-width: 100%;
}
.dark-mode .music-lyrics-box { background: #0f172a; border-color: #334155; }
.lyrics-content { max-height: 400px; overflow-y: auto; white-space: pre-wrap; line-height: 1.8; }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag-link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px; background: #f1f5f9; border-radius: 20px;
    text-decoration: none; color: #475569; font-size: 0.8rem; transition: all 0.2s;
}
.dark-mode .tag-link { background: #334155; color: #cbd5e1; }
.tag-link:hover { background: #6366f1; color: #fff; }

/* ==================== POST ACTIONS ==================== */
.post-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.dark-mode .post-actions { border-color: #334155; }
.action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.action-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 50px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    color: #475569; font-size: 0.9rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
}
.dark-mode .action-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.action-btn:hover { background: rgba(99,102,241,0.08); border-color: #6366f1; color: #6366f1; }
.action-btn.liked, .action-btn.liked i { color: #ef4444 !important; }
.action-btn.saved, .action-btn.saved i { color: #6366f1 !important; }
.action-btn i { font-size: 1rem; color: #64748b; }
.dark-mode .action-btn i { color: #94a3b8; }
.action-btn:hover i { color: #6366f1; }

/* ==================== COMMENTS - Glass Edition ==================== */
.comments-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(99,102,241,0.15);
}

.comments-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}
.dark-mode .comments-title { color: #f1f5f9; }
.comments-title i { color: #6366f1; }

/* ==================== COMMENT FORM GLASS ==================== */
.add-comment-form {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}
.dark-mode .add-comment-form {
    background: rgba(30,41,59,0.7);
    border-color: rgba(99,102,241,0.2);
}
.add-comment-form:focus-within {
    border-color: #6366f1;
    box-shadow: 0 8px 30px rgba(99,102,241,0.12);
}

.add-comment-form textarea,
.add-comment-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.92rem;
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    resize: vertical;
    min-height: 100px;
    transition: all 0.25s ease;
}
.dark-mode .add-comment-form textarea,
.dark-mode .add-comment-form input[type="text"] {
    background: rgba(15,23,41,0.8);
    border-color: rgba(255,255,255,0.08);
    color: #f1f5f9;
}
.add-comment-form textarea:focus,
.add-comment-form input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}

/* Reply bar */
.comment-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(99,102,241,0.06);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #6366f1;
    border: 1px solid rgba(99,102,241,0.12);
    animation: slideDown 0.25s ease;
}
@keyframes slideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.comment-reply-cancel {
    background: none; border: none; color: #ef4444;
    cursor: pointer; font-weight: 600; padding: 6px 10px;
    border-radius: 8px; transition: all 0.15s;
}
.comment-reply-cancel:hover { background: rgba(239,68,68,0.1); }

/* Emoji bar */
.comment-emoji-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.comment-emoji-btn {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.dark-mode .comment-emoji-btn {
    background: rgba(30,41,59,0.8);
    border-color: rgba(255,255,255,0.06);
}
.comment-emoji-btn:hover {
    background: #6366f1;
    color: #fff;
    transform: scale(1.15);
    border-color: #6366f1;
}

/* Submit button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.4);
}

/* =============================================
   COMMENTS - Glass Edition with Threading
   Mobile optimized, RTL ready
   ============================================= */

:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.14);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-dark-bg: rgba(15, 23, 42, 0.45);
    --glass-dark-hover: rgba(30, 41, 59, 0.6);
    --glass-dark-border: rgba(255, 255, 255, 0.08);
    --comment-indent: 48px;
}

/* ==================== LIST ==================== */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0;
}

/* ==================== ROOT COMMENT CARD ==================== */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    animation: commentFadeIn 0.4s ease;
    transition: all 0.25s ease;
}
.dark-mode .comment-item {
    background: var(--glass-dark-bg);
    border-color: var(--glass-dark-border);
}
.comment-item:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.dark-mode .comment-item:hover {
    background: var(--glass-dark-hover);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

@keyframes commentFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== AVATAR ==================== */
.comment-avatar { flex-shrink: 0; }
.comment-avatar img {
    width: 40px; height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
    transition: transform 0.2s;
}
.comment-item:hover .comment-avatar img {
    transform: scale(1.05);
}

/* ==================== CONTENT ==================== */
.comment-content { flex: 1; min-width: 0; }

/* Header */
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    flex-wrap: wrap; gap: 6px;
}
.comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: #154483;
}
.dark-mode .comment-author { color: #f1f5f9; }
.comment-author a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
.comment-author a:hover { color: #818cf8; }

.comment-time {
    font-size: 0.7rem;
    color: rgba(40 5 173 / 80%);
}
.dark-mode .comment-time { color: #94a3b8; }

/* Reply-to indicator */
.comment-reply-to {
    font-size: 0.75rem;
    color: #818cf8;
    margin-bottom: 3px;
    display: flex; align-items: center; gap: 4px;
}
.comment-reply-to i { font-size: 0.55rem; }

/* Text */
.comment-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #000000;
    word-break: break-word;
    margin-top: 4px;
}
.dark-mode .comment-text { color: #e2e8f0; }

/* ==================== ACTIONS ==================== */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.comment-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid #2f61a7;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.78rem;
    color: #0f0d3f;
    transition: all 0.2s ease;
}
.dark-mode .comment-action-btn {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
    color: #94a3b8;
}
.comment-action-btn:hover {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.3);
    color: #818cf8;
}
.comment-like-btn.active, 
.comment-like-btn.active i,
.comment-like-btn.active span { 
    color: #ef4444 !important; 
}
.comment-like-btn.active i { 
    animation: heartPop 0.3s ease; 
}
@keyframes heartPop { 
    0%, 100% { transform: scale(1); } 
    50% { transform: scale(1.3); } 
}

/* ==================== THREADED REPLIES ==================== */
.comment-thread {
    margin-right: var(--comment-indent);
    padding-right: 14px;
    border-right: 2px solid rgba(99,102,241,0.4);
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    position: relative;
}

/* Dot on thread line */
.comment-thread::before {
    content: "";
    position: absolute;
    right: -3px;
    top: 6px;
    width: 6px;
    height: 6px;
    background: #6366f1;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Reply card */
.reply-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    animation: commentFadeIn 0.35s ease;
    transition: all 0.2s ease;
}
.dark-mode .reply-item {
    background: rgba(30,41,59,0.3);
    border-color: rgba(255,255,255,0.06);
}
.reply-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(99,102,241,0.2);
}
.dark-mode .reply-item:hover {
    background: rgba(30,41,59,0.5);
}

.reply-item .comment-avatar img {
    width: 32px; height: 32px;
    border-radius: 10px;
}
.reply-item .comment-author {
    font-size: 0.82rem;
}
.reply-item .comment-text {
    font-size: 0.85rem;
}
.reply-item .comment-actions {
    gap: 8px;
    margin-top: 8px;
}
.reply-item .comment-action-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
}

/* Nested thread (level 3+) */
.reply-item .comment-thread {
    margin-right: 28px;
    padding-right: 10px;
}

/* ==================== HIGHLIGHT ==================== */
.comment-highlight {
    animation: highlightGlow 2.5s ease-out;
}
@keyframes highlightGlow {
    0% { 
        box-shadow: 0 0 0 4px rgba(99,102,241,0.4);
        background: rgba(99,102,241,0.12);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(99,102,241,0);
        background: transparent;
    }
}

/* ==================== EMPTY STATE ==================== */
.no-comments {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.04);
    border-radius: 16px;
    border: 1px dashed rgba(255,255,255,0.1);
}
.no-comments i {
    display: block;
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.4;
    color: #6366f1;
}
.dark-mode .no-comments {
    background: rgba(30,41,59,0.3);
    border-color: rgba(255,255,255,0.06);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    :root { --comment-indent: 32px; }
    
    .comment-item {
        padding: 12px 14px;
        gap: 10px;
    }
    .comment-avatar img {
        width: 34px; height: 34px;
        border-radius: 10px;
    }
    .comment-author { font-size: 0.82rem; }
    .comment-text { font-size: 0.85rem; }
    .comment-actions { gap: 8px; }
    .comment-action-btn {
        padding: 4px 10px;
        font-size: 0.72rem;
    }
    
    .comment-thread {
        padding-right: 10px;
        gap: 6px;
    }
    .reply-item {
        padding: 10px 12px;
        gap: 8px;
    }
    .reply-item .comment-avatar img {
        width: 28px; height: 28px;
        border-radius: 8px;
    }
    .reply-item .comment-thread {
        margin-right: 20px;
        padding-right: 8px;
    }
}

@media (max-width: 480px) {
    :root { --comment-indent: 20px; }
    
    .comment-item {
        padding: 10px 12px;
        border-radius: 14px;
    }
    .comment-avatar img {
        width: 30px; height: 30px;
        border-radius: 8px;
    }
    .comment-author { font-size: 0.78rem; }
    .comment-text { font-size: 0.82rem; }
    .comment-header { flex-direction: column; align-items: flex-start; }
    
    .comment-thread {
        margin-right: 16px;
        padding-right: 8px;
    }
    .reply-item .comment-thread {
        margin-right: 12px;
        padding-right: 6px;
    }
    .reply-item .comment-avatar img {
        width: 24px; height: 24px;
    }
    
    .comment-actions { gap: 6px; }
    .comment-action-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
}

/* ==================== SIDEBAR ==================== */
.post-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
@media (max-width: 1023px) { .post-sidebar { position: static; } }

.author-widget, .recent-posts-widget, .random-posts-slideshow {
    background: #fff; border-radius: 16px; padding: 16px;
    border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.dark-mode .author-widget,
.dark-mode .recent-posts-widget,
.dark-mode .random-posts-slideshow { background: #1e293b; border-color: #334155; }

/* Author */
.author-widget { display: flex; flex-direction: column; align-items: center; text-align: center; }
.author-widget-avatar {
    width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
    border: 2px solid #6366f1; margin-bottom: 8px;
}
.author-widget-name { font-weight: 700; font-size: 0.95rem; margin: 4px 0; }
.author-widget-name a { color: #0f172a; text-decoration: none; }
.dark-mode .author-widget-name a { color: #f1f5f9; }
.author-widget-username { font-size: 0.78rem; color: #64748b; margin-bottom: 6px; }
.author-widget-bio { font-size: 0.78rem; color: #475569; margin-bottom: 10px; line-height: 1.5; max-height: 60px; overflow-y: auto; }
.dark-mode .author-widget-bio { color: #94a3b8; }
.author-stats { display: flex; gap: 20px; margin: 10px 0; }
.author-stats .stat-item { text-align: center; cursor: pointer; }
.author-stats .stat-value { font-weight: 700; color: #6366f1; font-size: 1rem; }
.author-stats .stat-label { font-size: 0.7rem; color: #64748b; }
.dark-mode .author-stats .stat-label { color: #94a3b8; }
.follow-btn {
    width: 100%; padding: 9px; border-radius: 50px; font-weight: 600;
    font-size: 0.82rem; cursor: pointer; border: none; transition: all 0.2s;
}
.follow-btn.btn-primary { background: #6366f1; color: #fff; }
.follow-btn.btn-primary:hover { background: #4f46e5; }
.follow-btn.btn-outline { background: transparent; color: #475569; border: 1px solid #e2e8f0; }
.dark-mode .follow-btn.btn-outline { color: #cbd5e1; border-color: #334155; }

/* Suggested / Recent posts */
.slideshow-title, .widget-title {
    font-size: 0.88rem; font-weight: 700; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px; color: #0f172a;
}
.dark-mode .slideshow-title, .dark-mode .widget-title { color: #f1f5f9; }

.suggested-item, .recent-post-item {
    display: flex; align-items: center; gap: 10px; padding: 8px;
    border-radius: 10px; text-decoration: none; color: inherit; transition: background 0.15s;
}
.suggested-item:hover, .recent-post-item:hover { background: #f8fafc; }
.dark-mode .suggested-item:hover, .dark-mode .recent-post-item:hover { background: #334155; }
.suggested-item img, .recent-post-thumb {
    width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
    flex-shrink: 0; background: #f1f5f9;
}
.suggested-item span, .recent-post-title {
    font-size: 0.8rem; font-weight: 500; color: #334155;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dark-mode .suggested-item span, .dark-mode .recent-post-title { color: #cbd5e1; }
.recent-post-meta { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }

.view-all-link {
    display: block; text-align: center; margin-top: 12px; padding: 10px;
    background: #f8fafc; border-radius: 50px; color: #475569;
    text-decoration: none; font-size: 0.82rem; font-weight: 500; transition: all 0.2s;
}
.dark-mode .view-all-link { background: #334155; color: #cbd5e1; }
.view-all-link:hover { background: #6366f1; color: #fff; }

/* Audio player */
.audio-track { margin-bottom: 10px; padding: 10px; background: #f8fafc; border-radius: 10px; }
.dark-mode .audio-track { background: #0f172a; }
audio { width: 100%; }

/* ==================== TOAST ==================== */
.toast-notification {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: #0f172a; color: #fff; padding: 12px 24px; border-radius: 50px;
    display: flex; align-items: center; gap: 10px; z-index: 9999;
    font-size: 0.9rem; font-weight: 500; opacity: 0;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.toast-notification.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-notification.success { background: #10b981; }
.toast-notification.error { background: #ef4444; }

/* ==================== UTILITY ==================== */
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .single-post { padding: 16px; border-radius: 16px; }
    .single-post-title { font-size: 1.25rem; }
    .action-btn { padding: 8px 14px; font-size: 0.8rem; }
    .comment-replies { margin-right: 20px; }
    .author-widget { padding: 12px; }
    .gallery-item { width: 70px; height: 70px; }
}
@media (max-width: 480px) {
    .single-post-wrapper { padding: 0.5rem 0; }
    .single-post { padding: 12px; border-radius: 14px; }
    .action-buttons { gap: 6px; }
    .action-btn { padding: 7px 12px; font-size: 0.75rem; }
}

/* ==================== PRINT ==================== */
@media print {
    .post-sidebar, .post-actions, .comments-section, .back-navigation { display: none !important; }
    .single-post { box-shadow: none !important; border: 1px solid #ddd !important; }
}
/* ==================== COMMENT QUOTE (Telegram style) ==================== */
.comment-quote {
    background: rgba(99,102,241,0.06);
    border-right: 3px solid #6366f1;
    border-radius: 0 10px 10px 0;
    padding: 8px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.dark-mode .comment-quote {
    background: rgba(99,102,241,0.08);
    border-right-color: #818cf8;
}
.comment-quote:hover {
    background: rgba(99,102,241,0.12);
    border-right-color: #818cf8;
}

.comment-quote-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: #6366f1;
    margin-bottom: 4px;
    font-weight: 600;
}
.dark-mode .comment-quote-header { color: #818cf8; }
.comment-quote-header a {
    color: inherit; text-decoration: none;
    transition: color 0.15s;
}
.comment-quote-header a:hover { color: #4f46e5; text-decoration: underline; }
.comment-quote-header i { font-size: 0.65rem; }

.comment-quote-text {
    font-size: 0.8rem; line-height: 1.5;
    color: #64748b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.dark-mode .comment-quote-text { color: #94a3b8; }
/* ==================== GALLERY MODAL ==================== */
.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    margin: 5vh auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: imageZoomIn 0.3s ease;
}
@keyframes imageZoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Close button */
.gallery-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.gallery-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
    transform: scale(1.1);
}

/* Navigation arrows */
.gallery-prev,
.gallery-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}
.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }
.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(99, 102, 241, 0.6);
    border-color: #6366f1;
    transform: translateY(-50%) scale(1.1);
}

/* Counter */
.gallery-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
    border: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 2px;
}

/* Mobile */
@media (max-width: 768px) {
    .gallery-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 1.2rem; }
    .gallery-prev, .gallery-next { width: 38px; height: 38px; font-size: 1rem; }
    .gallery-prev { left: 8px; }
    .gallery-next { right: 8px; }
    .gallery-modal-content { width: 95%; height: 80vh; }
}

/* ==================== COMMENT DISLIKE BUTTON ==================== */
.comment-action-btn.comment-dislike-btn {
    color: #64748b;
}
.dark-mode .comment-action-btn.comment-dislike-btn {
    color: #94a3b8;
}
.comment-action-btn.comment-dislike-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}
.comment-action-btn.comment-dislike-btn.active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.12) !important;
}

/* Like button */
.comment-action-btn.comment-like-btn:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}
.comment-action-btn.comment-like-btn.active {
    color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.12) !important;
}
.author-widget-bio {
    font-size: 0.8rem; color: #475569; margin-bottom: 10px;
    line-height: 1.6; white-space: normal; overflow: visible;
    max-height: none; overflow-y: visible;
}
.comment-dislike-btn.active {
    color: #ef4444 !important;
    background: rgba(239,68,68,0.1) !important;
    border-color: rgba(239,68,68,0.2) !important;
}
.edited-badge {
    font-size: 0.68rem;
    color: #94a3b8;
    font-style: italic;
}
.deleted-comment {
    opacity: 0.5;
    pointer-events: none;
}
.deleted-comment .comment-actions {
    display: none !important;
}
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 12px;
}

.captcha-text {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: monospace;
    background: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    direction: ltr;
    display: inline-block;
}

.captcha-refresh {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
}

.captcha-refresh:hover {
    background: #e2e8f0;
    transform: rotate(180deg);
}

.captcha-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    direction: ltr;
    text-align: center;
}
/* ==================== EDIT COMMENT BOX STYLES ==================== */
.edit-comment-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    border: 2px solid #6366f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    direction: rtl;
}

.edit-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.edit-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6366f1;
}

.edit-title i {
    margin-left: 6px;
}

.close-edit-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-edit-btn:hover {
    background: #f1f5f9;
    color: #ef4444;
}

/* اصلاح اصلی - رنگ متن در تم روشن */
.edit-comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
    background: #ffffff;
    color: #1e293b; /* رنگ متن تیره برای تم روشن */
}

.edit-comment-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #ffffff;
    color: #1e293b;
}

/* Emoji Bar */
.edit-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
    padding: 8px;
    background: #f8fafc;
    border-radius: 12px;
}

.edit-emoji-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-emoji-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    transform: scale(1.05);
}

/* Edit Actions */
.edit-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
}

.save-edit-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.save-edit-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.save-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cancel-edit-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.cancel-edit-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Edited Badge */
.edited-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: 10px;
}

.edited-badge i {
    font-size: 0.65rem;
}

/* ==================== DARK MODE ==================== */
.dark-mode .edit-comment-box {
    background: #1e293b;
    border-color: #818cf8;
}

.dark-mode .edit-title {
    color: #818cf8;
}

.dark-mode .edit-comment-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0; /* رنگ متن روشن برای تم تاریک */
}

.dark-mode .edit-comment-textarea:focus {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #818cf8;
}

.dark-mode .edit-emoji-bar {
    background: #334155;
}

.dark-mode .edit-emoji-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.dark-mode .edit-emoji-btn:hover {
    background: #818cf8;
}

.dark-mode .cancel-edit-btn {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}

.dark-mode .cancel-edit-btn:hover {
    background: #475569;
    color: #ffffff;
}

.dark-mode .edited-badge {
    background: #334155;
    color: #94a3b8;
}
/* ==================== REPORT MODAL  ==================== */
.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.report-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.report-modal-container {
    background: #ffffff;
    border-radius: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    direction: rtl;
}

.report-modal-overlay.active .report-modal-container {
    transform: scale(1);
}

/* Scrollbar styling */
.report-modal-container::-webkit-scrollbar {
    width: 6px;
}

.report-modal-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.report-modal-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Header */
.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.report-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.report-modal-title i {
    font-size: 1.3rem;
    color: #ef4444;
}

.report-modal-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #64748b;
    transition: all 0.2s;
}

.report-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Body */
.report-modal-body {
    padding: 20px 24px;
}

.report-modal-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* Reasons List */
.report-reasons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.report-reason-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.report-reason-item:hover {
    background: #f1f5f9;
    transform: translateX(-4px);
}

.report-reason-item:has(input:checked) {
    background: #eef2ff;
    border-color: #6366f1;
}

.report-reason-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-left: 14px;
    accent-color: #6366f1;
    cursor: pointer;
}

.report-reason-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.report-reason-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #6366f1;
    transition: all 0.2s;
}

.report-reason-item:has(input:checked) .report-reason-icon {
    background: #6366f1;
    color: #ffffff;
}

.report-reason-text {
    flex: 1;
}

.report-reason-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.report-reason-desc {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

/* Additional Details */
.report-additional-details {
    margin-top: 16px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-description {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
    background: #f8fafc;
    color: #1e293b;
}

.report-description:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.report-char-count {
    text-align: left;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 8px;
}

/* Footer */
.report-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 28px 28px;
}

.report-btn-cancel {
    flex: 1;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.report-btn-cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.report-btn-submit {
    flex: 1;
    padding: 12px;
    background: #ef4444;
    border: none;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.report-btn-submit:hover:not(:disabled) {
    background: #dc2626;
    transform: scale(1.02);
}

.report-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== DARK MODE ==================== */
.dark-mode .report-modal-container {
    background: #1e293b;
}

.dark-mode .report-modal-title {
    color: #f1f5f9;
}

.dark-mode .report-modal-close:hover {
    background: #334155;
    color: #f1f5f9;
}

.dark-mode .report-modal-subtitle {
    color: #94a3b8;
    border-bottom-color: #334155;
}

.dark-mode .report-reason-item {
    background: #0f172a;
}

.dark-mode .report-reason-item:hover {
    background: #1e293b;
}

.dark-mode .report-reason-item:has(input:checked) {
    background: #312e81;
}

.dark-mode .report-reason-icon {
    background: #1e293b;
    color: #818cf8;
}

.dark-mode .report-reason-title {
    color: #f1f5f9;
}

.dark-mode .report-reason-desc {
    color: #94a3b8;
}

.dark-mode .report-description {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-mode .report-description:focus {
    background: #1e293b;
    border-color: #818cf8;
}

.dark-mode .report-modal-footer {
    background: #0f172a;
    border-top-color: #334155;
}

.dark-mode .report-btn-cancel {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

.dark-mode .report-btn-cancel:hover {
    background: #334155;
}
/* ==================== LINK PREVIEW CARDS - توییتر استایل ==================== */
.link-preview-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    margin: 12px 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 520px;
    direction: rtl;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.link-preview-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* تصویر کارت */
.link-preview-image {
    flex-shrink: 0;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.link-preview-card:hover .link-preview-image img {
    transform: scale(1.02);
}

/* محتوای کارت */
.link-preview-content {
    padding: 14px 16px;
    min-width: 0;
}

/* سایت مبدا - مثل توییتر */
.link-preview-site {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.link-preview-site i {
    font-size: 0.65rem;
    color: #94a3b8;
}

/* عنوان کارت */
.link-preview-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* توضیحات کارت - فقط متن خالص بدون HTML */
.link-preview-description {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* آدرس لینک */
.link-preview-url {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 8px;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

/* نویسنده پست */
.link-preview-author {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
}

.link-preview-author i {
    font-size: 0.6rem;
    color: #6366f1;
}

/* استایل لودینگ */
.link-preview-card.loading-preview {
    background: linear-gradient(90deg, #f8fafc 25%, #f1f5f9 50%, #f8fafc 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s ease-in-out infinite;
}

@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.preview-loading {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== DARK MODE ==================== */
.dark-mode .link-preview-card {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .link-preview-card:hover {
    background: #334155;
    border-color: #475569;
}

.dark-mode .link-preview-site {
    color: #94a3b8;
}

.dark-mode .link-preview-title {
    color: #f1f5f9;
}

.dark-mode .link-preview-description {
    color: #cbd5e1;
}

.dark-mode .link-preview-url {
    color: #64748b;
}

.dark-mode .link-preview-author {
    border-top-color: #334155;
    color: #64748b;
}

.dark-mode .link-preview-image {
    background: #0f172a;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .link-preview-card {
        max-width: 100%;
    }
    
    .link-preview-image {
        height: 160px;
    }
    
    .link-preview-content {
        padding: 12px;
    }
    
    .link-preview-title {
        font-size: 0.85rem;
    }
    
    .link-preview-description {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* افزایش ارتفاع کارت برای متن بیشتر */
.link-preview-card.post-preview .link-preview-content {
    padding: 14px 16px;
}

.link-preview-card.post-preview .link-preview-description {
    margin-top: 6px;
    margin-bottom: 8px;
}
}
/* ==================== DELETE MODAL ==================== */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.delete-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.delete-modal-container {
    background: #ffffff;
    border-radius: 32px;
    width: 90%;
    max-width: 400px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    direction: rtl;
}

.delete-modal-overlay.active .delete-modal-container {
    transform: scale(1);
}

.delete-modal-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.delete-modal-icon i {
    font-size: 28px;
    color: #ef4444;
}

.delete-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.delete-modal-message {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 24px;
}

.delete-modal-warning {
    display: block;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 8px;
}

.delete-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delete-modal-cancel {
    flex: 1;
    padding: 12px 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.delete-modal-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.delete-modal-confirm {
    flex: 1;
    padding: 12px 16px;
    background: #ef4444;
    border: none;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.delete-modal-confirm:hover {
    background: #dc2626;
    transform: scale(1.02);
}

.delete-modal-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Dark Mode */
.dark-mode .delete-modal-container {
    background: #1e293b;
}

.dark-mode .delete-modal-title {
    color: #f1f5f9;
}

.dark-mode .delete-modal-message {
    color: #cbd5e1;
}

.dark-mode .delete-modal-cancel {
    background: #334155;
    color: #cbd5e1;
}

.dark-mode .delete-modal-cancel:hover {
    background: #475569;
    color: #f1f5f9;
}

.dark-mode .delete-modal-icon {
    background: #450a0a;
}

/* Responsive */
@media (max-width: 480px) {
    .delete-modal-container {
        padding: 20px 16px;
    }
    
    .delete-modal-icon {
        width: 52px;
        height: 52px;
    }
    
    .delete-modal-icon i {
        font-size: 22px;
    }
    
    .delete-modal-title {
        font-size: 1.1rem;
    }
    
    .delete-modal-buttons {
        gap: 8px;
    }
    
    .delete-modal-cancel, .delete-modal-confirm {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}
/* انیمیشن حذف کامنت */
.comment-item, .reply-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-item.deleting, .reply-item.deleting {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}
/* دکمه گزارش پست */
.report-post-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 40px;
    transition: all 0.2s;
}

.report-post-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.dark-mode .report-post-btn:hover {
    background: #450a0a;
    color: #f87171;
}