  /* --- public\css\forum\thread.css --- */
  /* --- הגדרות עיצוב (CSS) מותאמות ל-HUB --- */
    
    /* פריסת העמוד - ברירת מחדל (דסקטופ) */
    .thread-container-layout {
        max-width: 1400px; 
        margin: 30px auto; 
        padding: 0 20px;
        display: grid; 
        grid-template-columns: 1fr 320px; /* תוכן + סרגל צד */
        gap: 30px;
        align-items: start;
    }

    /* --- כותרת האשכול (Header) --- */
    .thread-header {
        background: var(--bg-card, #14141a);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
        padding: 25px 30px;
        margin-bottom: 25px;
        position: relative;
        overflow: hidden;
    }

    .thread-header::before {
        content: '';
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 4px;
        background: linear-gradient(to bottom, var(--primary), var(--secondary, #fff));
    }
    
    /* פירורי לחם */
    .breadcrumb { 
        font-size: 0.9rem; 
        color: #9494a0; 
        margin-bottom: 15px; 
        display: flex; 
        align-items: center; 
        gap: 8px;
        font-family: 'Heebo', sans-serif;
        flex-wrap: wrap; /* חשוב למובייל */
    }
    .breadcrumb a { 
        color: #b0b0b9; 
        text-decoration: none; 
        transition: 0.2s; 
        font-weight: 500;
    }
    .breadcrumb a:hover { color: var(--primary); }
    .breadcrumb .separator { font-size: 0.7rem; opacity: 0.5; color: #666; margin-top: 2px; }
    .breadcrumb .current { 
        color: #fff; 
        font-weight: 600; 
        opacity: 0.9; 
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 600px;
    }

    /* אזור הכותרת והאייקונים */
    .topic-title-area {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }

    .thread-title { 
        font-family: 'Rubik', sans-serif; 
        font-size: 2rem; 
        color: white; 
        font-weight: 700;
        line-height: 1.2; 
        text-shadow: 0 0 20px rgba(0,0,0,0.3);
        margin: 0;
        word-break: break-word; /* מונע שבירה של מילים ארוכות מדי */
    }
    
    .thread-meta { 
        display: flex; 
        gap: 20px; 
        font-size: 0.85rem; 
        color: #9494a0; 
        padding-top: 15px;
        border-top: 1px solid rgba(255,255,255,0.05);
        flex-wrap: wrap;
    }
    .thread-meta span { display: flex; align-items: center; gap: 6px; }
    .thread-meta i { color: var(--primary); }

    /* --- כרטיסי פוסטים --- */
    .post-card {
        background: var(--bg-card, #14141a);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
        margin-bottom: 25px;
        display: grid;
        grid-template-columns: 220px 1fr; /* צד משתמש | צד תוכן */
        overflow: visible; /* שונה מ-hidden כדי לאפשר לתפריטים לצאת */
        position: relative;
    }

    .post-card.op-post {
        border: 3px solid var(--primary);
        background: linear-gradient(180deg, rgba(255,255,255, 0.02) 0%, var(--bg-card, #14141a) 0%);
        box-shadow: 0 10px 40px rgba(0,0,0, 0.3);
    }

    /* צד ימין - פרטי משתמש */
    .post-user-side {
        background: rgba(0, 0, 0, 0.2);
        padding: 30px 20px;
        text-align: center;
        border-left: 1px solid rgba(255,255,255,0.08);
        display: flex; 
        flex-direction: column; 
        align-items: center;
    }

    .user-avatar {
        width: 100px; height: 100px;
        border-radius: 50%;
        object-fit: cover;
        margin-bottom: 15px;
        border: 3px solid rgba(255,255,255,0.1);
        padding: 3px;
        background: var(--bg-card, #14141a);
    }
    .op-post .user-avatar { border-color: var(--primary); box-shadow: 0 0 15px rgba(var(--primary), 0.3); }
    
    .username { font-family: 'Rubik'; font-weight: 700; font-size: 1.1rem; color: white; margin-bottom: 8px; display: block; }
    
    .user-role { 
        font-size: 0.75rem; padding: 4px 12px; border-radius: 20px; display: inline-block; margin-bottom: 20px; 
        font-weight: 700; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #ccc; 
        text-transform: uppercase; letter-spacing: 1px;
    }
    .role-admin { color: #ff4757; border-color: rgba(255, 71, 87, 0.3); background: rgba(255, 71, 87, 0.1); }
    
    .user-stats { font-size: 0.8rem; color: #9494a0; width: 100%; text-align: right; padding: 0 5px; }
    .user-stats div { margin-bottom: 6px; display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.03); padding-bottom: 2px; }
    .user-stats b { color: #e0e0e0; }

    /* צד שמאל - תוכן */
    .post-content-side { padding: 30px; display: flex; flex-direction: column; min-height: 280px; position: relative;  min-width: 0; /* מונע גלישה */ }
    
    .post-header-info {
        display: flex; justify-content: space-between; align-items: center; 
        padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; color: #9494a0;
        margin-bottom: 15px;
    }
    
    .post-body { 
        font-size: 1.05rem; 
        line-height: 1.8; 
        color: #e0e0e0; 
        flex-grow: 1; 
        white-space: normal; 
        font-family: 'Heebo', sans-serif; 
        overflow-wrap: break-word; /* שבירת מילים ארוכות */
    } 
    /* הגבלת גודל תמונות בתוך הפוסט */
.post-body img {
    max-width: 100%;
    max-height: 500px; /* גובה מקסימלי כדי שלא יתפוס חצי עמוד */
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
    display: block;
    margin: 10px 0;
}

.post-body img:hover {
    transform: scale(1.01);
}

/* עיצוב המודל למסך מלא (Lightbox) */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}
    .post-footer {
        margin-top: 30px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.08);
        display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
    }

    /* כפתורי פעולות */
    .btn-action {
        background: transparent; border: 1px solid rgba(255,255,255,0.1); color: #9494a0; 
        padding: 8px 20px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; 
        cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px;
    }
    .btn-action:hover { background: rgba(255,255,255,0.05); color: white; border-color: #666; }
    .btn-action.primary { border-color: var(--primary); color: var(--primary); background: rgba(255, 255, 255, 0.02); }
    .btn-action.primary:hover { background: var(--primary); color: white; box-shadow: 0 0 15px var(--primary); }

    /* תגובה מהירה */
    .quick-reply-box {
        background: var(--bg-card, #14141a); border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px; padding: 30px; margin-top: 40px; position: relative;
    }
    .quick-reply-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--primary); }
    
    .btn-submit {
        background: var(--primary); color: black; border: none; padding: 12px 35px; 
        border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 1rem;
    }
    .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 0 20px var(--primary); background: white; }

    /* --- סרגל צד ווידג'טים --- */
    .widget { background: var(--bg-card, #14141a); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 25px; margin-bottom: 25px; }
    .widget-title { font-family: 'Rubik'; font-weight: 700; margin-bottom: 20px; color: white; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; font-size: 1.1rem; }
    
    .share-btns { display: flex; gap: 10px; }
    .share-btn { flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); color: #aaa; padding: 10px; border-radius: 6px; cursor: pointer; transition: 0.2s; }
    .share-btn:hover { background: rgba(255,255,255,0.1); color: white; border-color: var(--primary); }

    /* --- התאמה למובייל (RESPONSIVE) --- */
    /* --- התאמה למובייל (RESPONSIVE) - גרסה משופרת --- */
    
    /* --- אלמנטים כלליים נוספים --- */
    .admin-controls { position: absolute; top: 35px; left: 20px; display: flex; gap: 10px; z-index: 10; }
    .admin-btn {
        background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #ccc;
        width: 35px; height: 35px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
        cursor: pointer; transition: 0.2s; font-size: 1rem;
    }
    .admin-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }
    .admin-btn.danger:hover { background: #ff4757; color: white; border-color: #ff4757; }
    
    .dropdown { position: relative; display: inline-block; }
    .dropdown-content {
        display: none; position: absolute; left: 0; top: 100%;
        background-color: #1e1e24; min-width: 160px; box-shadow: 0 8px 16px rgba(0,0,0,0.5);
        border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); z-index: 1000; margin-top: 5px;
    }
    .dropdown-content a {
        color: #e0e0e0; padding: 12px 16px; text-decoration: none; display: block;
        font-size: 0.9rem; transition: 0.2s; cursor: pointer; text-align: right;
    }
    .dropdown-content a:hover { background-color: rgba(255,255,255,0.05); color: var(--primary); }
    .dropdown:hover .dropdown-content { display: block; }
    .post-admin-menu { cursor: pointer; color: #666; font-size: 1.2rem; padding: 5px; }
    .post-admin-menu:hover { color: #fff; }

    /* תגיות */
    .topic-badges {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        background: rgba(255,255,255,0.05);
        padding: 5px 12px;
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,0.1);
    }
    .badge-icon.pinned { color: #ffa600; transform: rotate(45deg); }
    .badge-icon.locked { color: #ff4757; }
    .thread-prefix-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 0.5em;
        vertical-align: middle;
        margin-left: 12px;
        color: #fff;
        background: #444;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        transform: translateY(-4px);
    }

    /* מודלים */
    .custom-modal-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.8); z-index: 9999; display: none;
        align-items: center; justify-content: center; backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s ease;
    }
    .custom-modal-overlay.active { display: flex; opacity: 1; }
    .custom-modal-box {
        background: #1e1e24; border: 1px solid rgba(255, 255, 255, 0.1); width: 90%; max-width: 450px;
        padding: 25px; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform: translateY(20px); transition: transform 0.3s ease; text-align: center;
    }
    .custom-modal-overlay.active .custom-modal-box { transform: translateY(0); }
    .custom-modal-title { font-family: 'Rubik', sans-serif; color: #fff; font-size: 1.4rem; margin-bottom: 10px; }
    .custom-modal-text { color: #ccc; font-size: 0.95rem; margin-bottom: 20px; }
    .custom-modal-textarea, .move-modal-select {
        width: 100%; background: #0f0f13; border: 1px solid #444; color: #fff; padding: 12px; border-radius: 6px; font-family: inherit; margin-bottom: 20px;
    }
    .btn-modal { padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; border: none; transition: 0.2s; }
    .btn-modal-cancel { background: transparent; color: #888; border: 1px solid #444; }
    .btn-modal-confirm { background: #d33; color: white; }
    
    /* ווידג'ט פרומו */
    .widget.promo-widget {
        background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
        border: none; position: relative; overflow: hidden; text-align: center; padding: 30px 20px; color: white;
    }
    .btn-promo {
        background: #fff; color: #FF005C; display: flex; align-items: center; justify-content: center; gap: 10px;
        width: 100%; padding: 14px; border-radius: 6px; font-weight: 800; text-decoration: none; font-size: 1rem;
        transition: all 0.3s ease;
    }

    /* קישורים לפרופיל */
    .user-link-avatar, .user-link-name { text-decoration: none; display: block; transition: transform 0.3s; }
    .user-link-avatar:hover .user-avatar { transform: scale(1.08); border-color: var(--primary); }
    .user-link-name:hover .username { text-shadow: 0 0 12px currentColor; transform: translateX(-3px); }

    /* Quill Overrides */
    .ql-toolbar.ql-snow { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1); }
    .ql-container.ql-snow { border-color: rgba(255,255,255,0.1); background: #0f0f13; color: #e0e0e0; font-family: 'Heebo', sans-serif; }
    .ql-editor { text-align: right !important; direction: rtl; min-height: 150px; }
    .ql-stroke { stroke: #9494a0; } .ql-fill { fill: #9494a0; }
    /* --- Gaming Israel Custom Toasts --- */
.gi-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gi-toast {
    background: #1e1e24;
    border-right: 4px solid var(--primary, #00A3FF);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: 'Heebo', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gi-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.gi-toast.error { border-color: #ff4757; }
.gi-toast.success { border-color: #2ed573; }

.gi-toast i { font-size: 1.3rem; }
.gi-toast.error i { color: #ff4757; }
.gi-toast.success i { color: #2ed573; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
    .gaming-confirm-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 99999; display: none; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
    .gaming-confirm-box { background: #1a1a20; border: 1px solid rgba(255,255,255,0.1); width: 90%; max-width: 400px; padding: 25px; border-radius: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
    .gaming-confirm-icon { font-size: 2.5rem; margin-bottom: 15px; }
    .gaming-confirm-title { color: white; font-family: 'Rubik'; font-size: 1.3rem; margin-bottom: 10px; }
    .gaming-confirm-msg { color: #9494a0; font-size: 0.95rem; margin-bottom: 25px; line-height: 1.5; }
    .gaming-confirm-actions { display: flex; gap: 15px; justify-content: center; }
    .gaming-confirm-actions button { padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; border: none; transition: 0.2s; font-family: inherit; width: 45%; }
    .btn-confirm-cancel { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); }
    .btn-confirm-cancel:hover { background: rgba(255,255,255,0.1); }
    .btn-confirm-ok { background: #ff005c; color: white; }
    .btn-confirm-ok:hover { filter: brightness(1.1); transform: translateY(-2px); }
.ql-editor.ql-blank::before {
    color: #ffffff !important;
    opacity: 0.7;
}
    .sidebar-btn { width: 100%; padding: 10px; border-radius: 6px; border: none; font-weight: bold; cursor: pointer; transition: 0.2s; }
    .discord-btn { background: #5865F2; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
@media (max-width: 900px) {
        *, *::before, *::after {
    box-sizing: border-box;
    }
        /* 1. פריסה כללית - טור אחד */
        .thread-container-layout {
            grid-template-columns: 1fr; 
            padding: 0 10px;
            margin-top: 15px;
            gap: 15px;
        }
        .topic-title-area {
            margin-top: 37px;
        }
        /* 2. כותרת אשכול קומפקטית */
        .thread-header { padding: 15px; margin-bottom: 15px;         min-height: 166px;}
        .thread-title { font-size: 1.4rem; }
        .thread-meta { font-size: 0.75rem; gap: 10px; }

        /* כפתורי ניהול צפים יפה יותר */
        .admin-controls {
            position: relative; top: 0; left: 0;
            margin-bottom: 10px; justify-content: flex-end;
                position: absolute;
    top: 35px;
    left: 8px;
    display: flex;
    gap: 10px;
    z-index: 10;
    margin-top: 5px;
        }

        /* 3. כרטיס פוסט - עיצוב מחדש למובייל */
        .post-card {
            display: flex;
            flex-direction: column;
            border-radius: 8px;
            overflow: hidden; /* שומר על הפינות */
            margin-bottom: 20px;
        }

        /* פס עליון: פרטי משתמש + סטטיסטיקה */
        .post-user-side {
            width: 100%;
            flex-direction: row; /* שורה במקום עמודה */
            align-items: center;
            justify-content: space-between; /* מרווח בין השם לסטטיסטיקה */
            padding: 10px 15px;
            background: rgba(255, 255, 255, 0.03);
            border-left: none;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            border-right: 4px solid var(--primary); /* פס צבע בצד ימין ליופי */
        }

        /* אזור שם + אווטאר */
        .post-user-side > div:first-child { 
            display: flex; 
            align-items: center; 
            gap: 10px; 
        }
        
        .user-link-avatar { margin: 0; }

        .user-avatar {
            width: 42px; height: 42px;
            margin-bottom: 0;
            border-width: 2px;
        }

        /* שם ודרגה - מסודרים אחד מעל השני */
        .post-user-side > div:nth-child(2) {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            text-align: right;
            margin: 0 10px 0 0;
        }

        .username { font-size: 1rem; margin-bottom: 2px; }
        .user-role { 
            font-size: 0.65rem; padding: 2px 6px; margin-bottom: 0; 
            line-height: 1; display: inline-block;
        }

        /* הסתרת דברים שלא נכנסים טוב במובייל */
        .xp-container, .user-badges { display: none !important; }

        /* --- סטטיסטיקה עם אייקונים (החלק החשוב) --- */
        .user-stats {
            display: flex !important; /* מחזירים לתצוגה */
            flex-direction: row;
            align-items: center;
            justify-content: left;
            gap: 12px;
            padding: 0;
            margin: 0;
            text-align: left;
            border: none;
            background: none;
        }
        
        .user-stats .stat-item {
            display: flex;
            flex-direction: column; /* אייקון מעל מספר */
            align-items: center;
            line-height: 1;
        }

        .user-stats .stat-text { display: none; } /* מסתיר את המילים "הודעות/לייקים" */
        
        .user-stats b {
            font-size: 0.75rem;
            color: #ccc;
            margin-top: 3px;
        }
        
        .user-stats .stat-icon {
            font-size: 0.9rem;
            color: var(--primary); /* צבע האתר */
            opacity: 0.8;
        }

        /* תוכן הפוסט */
        .post-content-side { padding: 15px; min-height: auto;}
        
        .post-header-info { 
            font-size: 0.75rem; padding-bottom: 8px; margin-bottom: 10px;
        }
        
        /* תפריט שלוש נקודות */
        .dropdown { top: 10px; left: 10px; }

        /* כפתורים למטה - קצת יותר קומפקטיים */
        .post-footer {
            margin-top: 15px;
            padding-top: 10px;
            gap: 8px;
        }
        
        .btn-action {
            padding: 6px 12px;
            font-size: 0.8rem;
            flex-grow: 1; /* כפתורים נמתחים לרוחב */
            justify-content: center;
        }
        
        /* הסתרת כפתור "דווח" במובייל אם צפוף, או השארת אייקון בלבד */
        .btn-action.report span { display: none; } /* משאיר רק משולש אזהרה */

        .quick-reply-box { padding: 15px; }
        /* הגבלת הגובה של עורך הטקסט במובייל שלא יימתח עד אינסוף */
    #editor-container {
        height: 200px; 
        max-height: 250px;
    }
    
    .ql-editor {
        min-height: 150px !important;
        max-height: 2281px !important;
        overflow-y: auto !important; /* מוסיף פס גלילה אם הטקסט מתארך */
    }
    }
