/* Styles specific to the Echoes Unbound message board */

/* User Status Signature */
.user-status-signature {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 94, 120, 0.1);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.8;
}

.user-status-signature i {
    margin-right: 0.5rem;
    color: var(--accent);
    opacity: 0.6;
}

/* Community Moderation Alerts */
.moderation-alert-banner {
    background: linear-gradient(135deg, rgba(255, 94, 120, 0.15), rgba(255, 0, 30, 0.15));
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 94, 120, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 94, 120, 0.6); }
}

.moderation-alert-banner .alert-icon {
    font-size: 2rem;
    color: var(--accent);
}

.moderation-alert-banner .alert-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--accent);
}

.moderation-alert-banner .alert-content p {
    margin: 0;
    color: var(--text);
}

.moderation-alert-banner .view-thread-btn {
    margin-left: auto;
    white-space: nowrap;
}

/* Flagged user indicator */
.flagged-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 94, 120, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.flagged-user-badge i {
    font-size: 0.7rem;
}

/* Active Users Sidebar Styles */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 94, 120, 0.2);
    /* Accessibility improvements */
    position: relative;
    z-index: 10;
}

.sidebar-header h2 {
    color: var(--accent);
    font-size: 1.2rem;
    margin: 0;
    font-family: 'Roboto Slab', serif;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main.messageboard-container {
    padding: 2rem;
    flex: 1;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

section {
    background: var(--gradient-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 94, 120, 0.25);
}

.messageboard-header h2, .thread-composer h3, .threads h3 {
    font-family: 'Roboto Slab', serif; /* Or your preferred header font */
    font-size: 2.2rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--highlight);
}

.thread-list, .reply-list {
    list-style: none;
    padding: 0;
}

.thread {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.thread:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.thread-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.thread-meta {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 10px;
}

.edit-thread-btn {
    margin-left: 10px;
    vertical-align: middle;
}

.thread-replies {
    padding-left: 20px;
    border-left: 2px solid #333;
}

.thread-content {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.thread-content p {
    margin-bottom: 1rem;
}

.thread-actions button {
    margin-right: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--accent);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--highlight);
    background: var(--primary);
    color: var(--text);
    font-size: 1rem;
}

#editor {
    height: 250px;
    background: var(--primary);
    border: 1px solid var(--highlight);
    border-radius: var(--radius-lg);
    color: var(--text);
}
.ql-toolbar {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.ql-container {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}
.ql-editor {
    color: var(--text);
}

.message {
    text-align: center;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
}
.message.error {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}
.message.success {
    background: rgba(68, 255, 68, 0.2);
    color: #44ff44;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}
.search-bar input {
    flex: 1;
}
.thread-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-secondary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent);
    z-index: var(--z-sticky);
    animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}
@media (max-width: 768px) {
    .search-bar { flex-direction: column; }
}

/* 
    messageboard.css
    Theme: "The Obsidian Scroll"
    Layout: "The Lyceum" (3-Column Dynamic)
*/

/* Main Container & Header */
.messageboard-container {
    padding: 1rem 2rem;
    height: calc(100vh - 70px); /* Full viewport height minus header */
    display: flex;
    flex-direction: column;
}

.lyceum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--highlight);
}

.lyceum-header h2 {
    color: var(--text);
    font-size: 2rem;
    margin: 0;
}

.lyceum-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* 3-Column Grid Layout */
.lyceum-grid {
    display: grid;
    grid-template-columns: 250px 1fr 1fr;
    gap: var(--space-lg);
    flex-grow: 1;
    overflow: hidden; /* Prevent container overflow */
    @media (max-width: var(--bp-md)) {
        grid-template-columns: 1fr;
    }
}

/* Individual Columns */
.lyceum-column {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition);
    border: 1px solid var(--highlight);
    overflow-y: auto; /* Enable scrolling within columns */
}

#lyceum-categories h3, #lyceum-threads h3, #lyceum-active-thread h3 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--highlight);
}

/* Column 1: Categories */
#lyceum-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#lyceum-categories ul li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s, color 0.2s;
}

#lyceum-categories ul li a:hover {
    background-color: var(--highlight);
    color: var(--text);
}

#lyceum-categories ul li a.active {
    background-color: var(--accent-tarnished);
    color: var(--text-bright);
    font-weight: 600;
}

/* Column 2 & 3: Thread List & Active Thread */
.thread-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thread {
    display: flex;
    gap: 1rem;
    background: transparent;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid var(--highlight);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.thread:hover {
    background: var(--highlight);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thread.active {
    background: var(--accent-tarnished);
    border-color: var(--accent);
}

.thread-main {
    flex-grow: 1;
}

.thread-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.thread-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Voting UI */
.thread-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.2rem;
    color: var(--text-muted);
}

.vote-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
}

.vote-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.vote-btn.active {
    color: var(--accent-bright);
}

.vote-count {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

/* Replies Styling */
.replies-container {
    padding-left: 1rem;
    margin-top: 1rem;
    border-left: 2px solid var(--highlight);
}

.reply {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--primary-darkest);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.reply-main {
    flex-grow: 1;
}

.reply-content {
    color: var(--text-muted);
    line-height: 1.6;
}

.reply-content p {
    margin-bottom: 0.5rem;
}

/* Signature */
.signature {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--highlight);
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Full Thread Content in Column 3 */
.thread-content-full {
    padding: 1rem 0;
    line-height: 1.7;
    color: var(--text);
}
.thread-content-full p, .thread-content-full blockquote {
    margin-bottom: 1rem;
}
.thread-content-full blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Quill Editor Theming */
.ql-toolbar.ql-snow, .ql-container.ql-snow {
    border-color: var(--highlight) !important;
}
.ql-toolbar.ql-snow {
    background: var(--primary);
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}
.ql-container.ql-snow {
    background: var(--primary-darker);
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}
.ql-editor {
    color: var(--text);
}
.ql-snow .ql-stroke {
    stroke: var(--text-muted);
}
.ql-snow .ql-picker-label {
    color: var(--text-muted);
}
.ql-snow .ql-active .ql-stroke {
    stroke: var(--accent);
}

/* Reply Form */
.reply-form-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--highlight);
}
.reply-editor .ql-editor {
    min-height: 100px;
    font-size: 0.95rem;
}

/* Composer Modal */
#threadComposerModal .modal-content-lg {
    width: 90vw;
    max-width: 700px;
    max-height: 90vh;
    padding: 1.5rem;
    background: var(--secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--highlight);
    position: relative; /* For absolute positioning of close button */
    overflow-y: auto;
    box-sizing: border-box;
}

#threadComposerModal .modal-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--highlight);
    padding-right: 2rem; /* Make space for close button */
}

#threadComposerModal .modal-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.4rem;
}

#threadComposerModal .close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

#threadComposerModal .close-modal:hover {
    color: var(--accent);
    transform: scale(1.1);
}

#threadComposerModal .modal-body {
    padding: 0;
}

#threadComposerModal .form-group {
    margin-bottom: 1rem;
}

#threadComposerModal .form-group label {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.4rem;
    display: block;
    font-size: 0.9rem;
}

#threadComposerModal .form-group input,
#threadComposerModal .form-group select {
    width: 100%;
    padding: 0.6rem;
    background: var(--primary);
    border: 1px solid var(--highlight);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

#threadComposerModal .form-group input:focus,
#threadComposerModal .form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

#threadComposerModal #editor {
    height: 200px;
}

#threadComposerModal .form-actions {
    margin-top: 1rem;
    text-align: right;
}

/* Button styles moved to unified components/buttons.css */

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .lyceum-grid {
        grid-template-columns: 200px 1fr; /* Shrink categories */
    }
}

@media (max-width: 768px) {
    .lyceum-grid {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 1rem; /* Reduce gap on mobile */
    }
    #lyceum-categories {
        margin-bottom: 1rem; /* Add space when stacked */
        max-height: 200px; /* Limit height on mobile */
        overflow-y: auto;
    }
    .messageboard-container {
        height: auto;
        padding: 1rem; /* Reduce padding on mobile */
    }
    
    /* Improve touch targets */
    .thread {
        padding: 1.25rem 1rem;
        margin-bottom: 1.25rem;
    }
    
    .vote-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem;
    }
    
    /* Modal responsive adjustments */
    #threadComposerModal .modal-content-lg {
        width: 95vw;
        max-height: 85vh;
        padding: 1rem;
        margin: 2.5vh auto;
    }
    
    #threadComposerModal .modal-header {
        padding-right: 2.5rem;
    }
    
    #threadComposerModal #editor {
        height: 150px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    #threadComposerModal .modal-content-lg {
        width: 98vw;
        max-height: 90vh;
        padding: 0.75rem;
        margin: 1vh auto;
        border-radius: 8px;
    }
    
    #threadComposerModal .modal-header {
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    #threadComposerModal .modal-header h3 {
        font-size: 1.2rem;
    }
    
    #threadComposerModal #editor {
        height: 120px;
    }
    
    #threadComposerModal .form-group {
        margin-bottom: 0.75rem;
    }
}

/* Search and Controls */
.thread-controls {
    margin-bottom: 1rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--highlight);
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text);
    font-size: 0.9rem;
}

.search-bar input:focus {
    border-color: var(--accent);
    outline: none;
}

.search-bar .btn {
    padding: 0.5rem;
    min-width: auto;
    font-size: 0.9rem;
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--highlight);
}

.category-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.thread-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--highlight);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Loading and Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.error-state {
    color: var(--error);
}

.error-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.empty-state h4 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Thread Improvements */
.thread-preview {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.thread-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.thread-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-tag {
    background: var(--accent);
    color: var(--text-bright);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.thread-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.thread-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--highlight);
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
}

/* Disabled Vote Buttons */
.vote-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Active Thread Header */
.active-thread-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--highlight);
}

.close-thread-btn {
    font-size: 0.8rem;
    padding: 0.5rem;
}

/* Improved Reply Voting */
.reply-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.2rem;
    color: var(--text-muted);
    min-width: 40px;
}

/* Anonymous Posting Styles */
.anonymous-toggle {
    background: rgba(74, 53, 105, 0.1);
    border: 1px solid var(--highlight);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--highlight);
    border-radius: 12px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

input[type="checkbox"]:checked + .toggle-slider {
    background: var(--accent);
}

input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(26px);
}

input[type="checkbox"] {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.anonymous-info {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.anonymous-preview,
.anonymous-author-preview {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(74, 53, 105, 0.2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.anonymous-author-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-style: italic;
    font-size: 0.85rem;
}

.anonymous-author-preview i {
    color: var(--accent);
}

/* Reply Options */
.reply-options {
    margin: 1rem 0;
}

.anonymous-reply-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.anonymous-reply-toggle .toggle-slider {
    width: 40px;
    height: 20px;
}

.anonymous-reply-toggle .toggle-slider::after {
    width: 16px;
    height: 16px;
}

.anonymous-reply-toggle input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.anonymous-reply-toggle .toggle-label {
    font-size: 0.85rem;
}

.anonymous-reply-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(74, 53, 105, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Anonymous User Display */
.thread .anonymous-user,
.reply .anonymous-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-style: italic;
}

.thread .anonymous-user i,
.reply .anonymous-user i {
    opacity: 0.7;
}

/* Anonymous Thread Styling */
.thread.anonymous {
    border-left-color: var(--accent);
    background: rgba(74, 53, 105, 0.05);
}

.reply.anonymous {
    border-left: 2px solid var(--accent);
    background: rgba(74, 53, 105, 0.05);
}

/* Anonymous Thread Indicator */
.thread-anonymous-indicator,
.reply-anonymous-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(74, 53, 105, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
}

.thread-anonymous-indicator i,
.reply-anonymous-indicator i {
    font-size: 0.7rem;
}

/* Reply Actions */
.reply-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

/* Reply button sizes moved to unified components/buttons.css */

/* Reply Edit Indicators */
.reply-edited-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-style: italic;
    margin-left: 0.5rem;
    opacity: 0.8;
}

.reply-edited-indicator i {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Reply Edit Form */
.reply-edit-form {
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1rem;
    background: rgba(74, 53, 105, 0.05);
    margin: 0.5rem 0;
}

.reply-edit-form .ql-container {
    min-height: 80px;
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.reply-edit-form .ql-toolbar {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}

.reply-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

/* Reply edit button styles moved to unified components/buttons.css */

/* Edit History Button */
.view-edit-history-btn {
    color: var(--text-muted);
    border-color: var(--text-muted);
}

.view-edit-history-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(74, 53, 105, 0.1);
}

/* Edit State Styling */
.reply.editing {
    border-left: 3px solid var(--accent);
    background: rgba(74, 53, 105, 0.05);
}

.reply.editing .reply-actions {
    opacity: 0.5;
    pointer-events: none;
}

/* Prevent edit button on replies that can't be edited */
.reply .edit-reply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Edit History Modal (for future implementation) */
.edit-history-modal {
    max-width: 600px;
}

.edit-history-item {
    border-bottom: 1px solid var(--highlight);
    padding: 1rem 0;
}

.edit-history-item:last-child {
    border-bottom: none;
}

.edit-history-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.edit-history-content {
    background: var(--highlight);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--text-muted);
}

/* ============================================================================
   DEMOCRACY 3.0 GOVERNANCE STYLES
   ============================================================================ */

/* Governance Options in Thread Composer */
.governance-options {
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
}

.governance-type-selector {
    margin-bottom: 1.5rem;
}

.governance-type-selector label {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.governance-type-selector label:hover {
    background: rgba(147, 51, 234, 0.05);
    border-color: rgba(147, 51, 234, 0.4);
}

.governance-type-selector input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(147, 51, 234, 0.5);
    border-radius: 50%;
    margin-right: 1rem;
    margin-top: 0.2rem;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

input[type="radio"]:checked + .radio-custom {
    border-color: var(--accent);
}

input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.option-label {
    flex: 1;
}

.option-label strong {
    display: block;
    color: var(--accent);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.option-label small {
    color: var(--text-secondary);
    line-height: 1.4;
}

.proposal-details {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.governance-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-top: 1rem;
}

.governance-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.governance-info i {
    color: rgba(59, 130, 246, 0.8);
    margin-right: 0.5rem;
}

/* Proposal Status Indicators */
.proposal-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proposal-status.discussion {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.proposal-status.voting {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.proposal-status.passed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.proposal-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.proposal-status.implemented {
    background: rgba(147, 51, 234, 0.2);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.4);
}

/* ============================================================================
   PROPOSAL VOTING INTERFACE
   ============================================================================ */

.proposal-voting {
    background: rgba(147, 51, 234, 0.05);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.voting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.voting-header h4 {
    margin: 0;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proposal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
}

.meta-item {
    text-align: center;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.meta-value {
    font-weight: 600;
    color: var(--text-primary);
}

.vote-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vote-option {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.vote-option:hover {
    border-color: rgba(147, 51, 234, 0.5);
    transform: translateY(-2px);
}

.vote-option.selected {
    border-color: var(--accent);
    background: rgba(147, 51, 234, 0.1);
}

.vote-option.approve.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.vote-option.reject.selected {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.vote-option.abstain.selected {
    border-color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.vote-option i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.vote-option.approve i {
    color: #22c55e;
}

.vote-option.reject i {
    color: #ef4444;
}

.vote-option.abstain i {
    color: #6b7280;
}

.vote-option div {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.vote-option small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.vote-status {
    text-align: center;
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-lg);
    color: #22c55e;
    font-weight: 500;
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}

.login-prompt p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.vote-results {
    margin-top: 1.5rem;
}

.vote-results h5 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.result-bar {
    margin-bottom: 1rem;
}

.result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.result-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.result-fill.approve {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.result-fill.reject {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.result-fill.abstain {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

.vote-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
}

.participation-rate {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.result-status {
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.result-status.passing {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.result-status.failing {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.proposal-actions {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-notification);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .vote-options {
        grid-template-columns: 1fr;
    }
    
    .vote-summary {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ============================================================================
   GOVERNANCE TAB INTERFACE
   ============================================================================ */

.governance-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.governance-welcome {
    margin-bottom: 2rem;
}

.governance-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.governance-welcome h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.governance-welcome p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.governance-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.governance-create-btn {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.governance-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.login-prompt-text {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
}

.governance-info-panel {
    background: rgba(147, 51, 234, 0.05);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: left;
}

.governance-info-panel h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.governance-info-panel ul {
    list-style: none;
    padding: 0;
}

.governance-info-panel li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(147, 51, 234, 0.1);
}

.governance-info-panel li:last-child {
    border-bottom: none;
}

.governance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(147, 51, 234, 0.05);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.governance-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proposals-list {
    display: grid;
    gap: 1rem;
}

.proposal-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.proposal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.proposal-card.voting {
    border-left: 4px solid #f59e0b;
}

.proposal-card.passed {
    border-left: 4px solid #22c55e;
}

.proposal-card.failed {
    border-left: 4px solid #ef4444;
}

.proposal-card.implemented {
    border-left: 4px solid var(--accent);
}

.proposal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.proposal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.proposal-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.proposal-card-meta span {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.proposal-type {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

.proposal-priority {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b !important;
}

.proposal-deadline {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.proposal-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.proposal-voting-preview {
    margin-bottom: 1rem;
}

.vote-progress-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vote-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.vote-fill.approve {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    height: 100%;
    transition: width 0.3s ease;
}

.vote-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.proposal-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Proposal and danger button styles moved to unified components/buttons.css */

/* Mobile adjustments for governance interface */
@media (max-width: 768px) {
    .governance-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .governance-stats {
        justify-content: center;
    }
    
    .governance-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .proposal-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .proposal-card-meta {
        justify-content: center;
    }
    
    .proposal-card-actions {
        justify-content: center;
    }
}