/* ========== Discussion Forum Styles ========== */
.discussion-section {
    margin-top: 24px;
}

.discussion-count {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-teal);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.discussion-sort {
    margin-left: auto;
}

.discussion-sort-select {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.discussion-sort-select:hover {
    border-color: var(--accent-teal);
}

/* Post Form */
.discussion-post-form {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.post-form-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--bg-dark);
}

.post-form-avatar .avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    padding: 12px;
    resize: vertical;
    font-family: inherit;
    transition: var(--transition);
}

.post-textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.post-textarea::placeholder {
    color: var(--text-muted);
}

.post-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 12px;
    color: var(--text-muted);
}

.char-counter.warning {
    color: var(--accent-gold);
}

.char-counter.danger {
    color: var(--accent-red);
}

.post-submit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-teal);
    color: var(--bg-dark);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.post-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.post-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.post-submit-btn svg {
    width: 16px;
    height: 16px;
}

/* Login Prompt */
.discussion-login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: center;
}

.discussion-login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.login-prompt-btn {
    background: var(--gradient-teal);
    color: var(--bg-dark);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.login-prompt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

/* Posts List */
.discussion-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.discussion-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
    gap: 12px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Single Post */
.discussion-post {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.discussion-post:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Pinned Post */
.discussion-post.pinned {
    border-color: rgba(0, 212, 170, 0.25);
    background: rgba(0, 212, 170, 0.03);
}

.pinned-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-teal);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pinned-indicator svg {
    width: 12px;
    height: 12px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info {
    flex: 1;
    min-width: 0;
}

.post-username {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-username a {
    color: inherit;
}

.post-username a:hover {
    color: var(--accent-teal);
}

.pro-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.reputation-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    color: white;
    margin-left: 4px;
}

.reputation-badge .rep-score {
    font-size: 8px;
    opacity: 0.85;
}

.follow-btn {
    background: linear-gradient(135deg, #00d4aa 0%, #00a88a 100%);
    border: none;
    color: #0a0e1a;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.follow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 212, 170, 0.3);
}

.follow-btn.following {
    background: transparent;
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal);
}

.follow-btn.following:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.follow-btn svg {
    width: 12px;
    height: 12px;
}

.post-time {
    font-size: 12px;
    color: var(--text-muted);
}

.post-actions-menu {
    position: relative;
}

.post-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.post-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.post-menu-btn svg {
    width: 18px;
    height: 18px;
}

.post-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 150px;
    padding: 4px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
}

.post-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.post-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}

.post-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.post-dropdown-item.danger {
    color: var(--accent-red);
}

.post-dropdown-item.block-item {
    color: var(--accent-red, #ef4444);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.post-dropdown-item.block-item:hover {
    background: rgba(239, 68, 68, 0.1);
}

.post-dropdown-item svg {
    width: 14px;
    height: 14px;
}

.post-content {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.post-content .mention {
    color: var(--accent-teal);
    font-weight: 500;
}

.post-content a:not(.mention) {
    color: var(--accent-blue);
    text-decoration: underline;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.post-reaction-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.post-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-reaction-btn.active.like {
    color: var(--accent-green);
    background: rgba(34, 197, 94, 0.1);
}

.post-reaction-btn.active.dislike {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.post-reaction-btn svg {
    width: 16px;
    height: 16px;
}

.post-reply-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.post-reply-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-teal);
}

.post-reply-btn svg {
    width: 16px;
    height: 16px;
}

/* Bookmark Button */
.post-bookmark-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-left: auto;
}

.post-bookmark-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-gold);
}

.post-bookmark-btn.active {
    color: var(--accent-gold);
}

.post-bookmark-btn svg {
    width: 16px;
    height: 16px;
}

/* Edited Badge */
.edited-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.edited-badge:hover {
    opacity: 1;
    color: var(--accent-teal);
    text-decoration: underline;
}

/* Edit History Modal */
.edit-history-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: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-history-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.edit-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.edit-history-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.edit-history-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.edit-history-close:hover {
    color: var(--text-primary);
}

.edit-history-list {
    overflow-y: auto;
    padding: 12px 20px;
}

.edit-history-entry {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.edit-history-entry:last-child {
    border-bottom: none;
}

.edit-history-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.edit-history-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Replies */
.post-replies {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.post-replies .discussion-post {
    margin-left: 24px;
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.04);
}

.post-replies .discussion-post .post-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

/* Reply Form Inline */
.reply-form-inline {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
}

.reply-form-inline textarea {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    padding: 10px;
    min-height: 60px;
    resize: none;
    font-family: inherit;
}

.reply-form-inline textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
}

.reply-form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reply-submit-btn {
    background: var(--accent-teal);
    color: var(--bg-dark);
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.reply-cancel-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

/* Load More */
.discussion-load-more {
    text-align: center;
    margin-top: 16px;
}

.load-more-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

/* Empty State */
.discussion-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.discussion-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.discussion-empty p {
    font-size: 14px;
}

/* 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: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.report-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.report-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 90%;
}

.report-modal h3 {
    margin-bottom: 16px;
}

.report-modal textarea {
    width: 100%;
    min-height: 100px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 12px;
    font-family: inherit;
    margin-bottom: 16px;
}

.report-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ========== Hashtags ========== */
.post-content .hashtag {
    color: var(--accent-blue);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.post-content .hashtag:hover {
    color: var(--accent-teal);
    text-decoration: underline;
}

/* Trending Hashtags Section */
.trending-hashtags-section {
    display: none;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.trending-hashtags-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.trending-hashtags-header svg {
    width: 14px;
    height: 14px;
    color: var(--accent-teal);
}

.trending-hashtags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hashtag-chip {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.hashtag-chip:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
}

/* Hashtag Autocomplete Dropdown */
.hashtag-autocomplete-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    z-index: 200;
    margin-bottom: 4px;
}

.hashtag-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.hashtag-autocomplete-item:hover,
.hashtag-autocomplete-item.selected {
    background: rgba(59, 130, 246, 0.1);
}

.hashtag-autocomplete-tag {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: 13px;
}

.hashtag-autocomplete-count {
    color: var(--text-muted);
    font-size: 11px;
}

/* ========== @Mention Autocomplete ========== */
.mention-autocomplete-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    z-index: 200;
    margin-bottom: 4px;
}

.mention-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.selected {
    background: rgba(0, 212, 170, 0.1);
}

.mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.mention-autocomplete-username {
    color: var(--accent-teal);
    font-weight: 500;
    font-size: 13px;
}

.mention-pro-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .discussion-post-form {
        flex-direction: column;
    }

    .post-form-avatar {
        display: none;
    }

    .post-footer {
        flex-wrap: wrap;
    }

    .post-replies .discussion-post {
        margin-left: 12px;
    }

    .trending-hashtags-section {
        padding: 10px 12px;
    }

    .hashtag-chip {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Reputation Toast */
.rep-toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10000;
    pointer-events: none;
    animation: repToastIn 0.3s ease-out, repToastOut 0.3s ease-in 1.7s forwards;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rep-toast .rep-toast-pts {
    color: #00d4aa;
}

@keyframes repToastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes repToastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ========== Quote Reply ========== */
.post-quote-block {
    background: rgba(59, 130, 246, 0.06);
    border-left: 3px solid var(--accent-blue);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 12px;
}

.post-quote-block .quote-header {
    color: var(--text-muted);
    margin-bottom: 4px;
    font-size: 11px;
}

.post-quote-block .quote-header .quote-label {
    color: var(--accent-blue);
}

.post-quote-block .quote-text {
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.post-quote-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    transition: var(--transition);
}

.post-quote-btn:hover {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.post-quote-btn svg {
    width: 14px;
    height: 14px;
}

/* Quote Preview (above post form when quoting) */
.quote-preview {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 12px;
}

.quote-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.quote-preview-header span {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 11px;
}

.quote-preview-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    border-radius: 4px;
}

.quote-preview-close:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.quote-preview-text {
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========== SSE New Posts Banner ========== */
.new-posts-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(0, 212, 170, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    animation: slideDown 0.3s ease-out;
}

.new-posts-banner:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(0, 212, 170, 0.15));
    border-color: var(--accent-blue);
}

.new-posts-banner span {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 13px;
}

.new-posts-banner small {
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 6px;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Infinite Scroll Skeleton ========== */
.scroll-sentinel {
    height: 1px;
    visibility: hidden;
}

.skeleton-loader {
    padding: 8px 0;
}

.skeleton-post {
    display: flex;
    gap: 12px;
    padding: 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-body {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-name {
    width: 120px;
    height: 14px;
}

.skeleton-text {
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ========== Back to Top Button ========== */
.back-to-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    z-index: 1000;
    transition: all 0.2s;
    opacity: 0.9;
}

.back-to-top-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 70px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
}

/* Submit button cooldown state */
.disc-cooldown {
    background: #4b5563 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* Toast notification for discussion page */
.disc-toast {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
    z-index: 10;
    pointer-events: none;
}
.disc-toast-show {
    opacity: 1;
    transform: translateY(0);
}
