/* Forum System — Theme Optimized Glassmorphism & Gold Theme */

:root {
    --forum-glass-bg: rgba(26, 29, 35, 0.95);
    --forum-glass-border: rgba(212, 169, 78, 0.2);
    --forum-accent: #d4a94e;
    --forum-accent-hover: #fec757;
}

/* Category Block - Glass Effect Revised */
.forum-category {
    background: var(--forum-glass-bg);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.forum-glass-panel {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.forum-category-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--forum-glass-border);
    padding: 16px 25px;
    display: flex;
    align-items: center;
}

.forum-category-title {
    color: var(--forum-accent);
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

/* Forum Node Styling */
.forum-node {
    padding: 22px 25px;
    border-bottom: 1px solid rgba(212, 169, 78, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.forum-node:last-child {
    border-bottom: none;
}

.forum-node:hover {
    background: rgba(255, 255, 255, 0.03);
}

.forum-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 169, 78, 0.3);
    border-radius: 8px;
    color: var(--forum-accent);
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
}

.forum-details {
    flex-grow: 1;
}

.forum-title {
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    margin-bottom: 4px;
    display: block;
    transition: color 0.2s;
    text-decoration: none;
}

.forum-title:hover {
    color: var(--forum-accent-hover) !important;
}

.forum-description {
    color: #b9b3a6 !important;
    font-size: 13px !important;
    line-height: 1.4;
}

.forum-stats {
    display: flex !important;
    align-items: center;
    gap: 0 !important;
    padding: 0;
}

.forum-stats-item {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    min-width: 85px;
    border-left: 1px solid rgba(212, 169, 78, 0.15);
}

.forum-stats-item:last-child {
    border-right: 1px solid rgba(212, 169, 78, 0.15);
}

.forum-stats-item {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    min-width: 90px;
    border-left: 1px solid rgba(212, 169, 78, 0.15);
}

.forum-stats-item:last-child {
    border-right: 1px solid rgba(212, 169, 78, 0.15);
}

.forum-stats-value {
    color: #fff;
    font-weight: 500;
    font-size: 15px;
}

.forum-stats-label {
    color: #ffffff;
    font-size: 11px;
    text-transform: uppercase;
}

.forum-last-post {
    width: 280px;
    padding-left: 15px;
}

.last-post-title {
    color: var(--forum-accent);
    font-weight: 700;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    text-decoration: none;
}

.last-post-meta {
    color: #ffffff;
    font-size: 12px;
}

.last-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 169, 78, 0.2);
    object-fit: cover;
    flex-shrink: 0;
}

/* Post Container (Topic View) */
.post-container {
    background: var(--forum-glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--forum-glass-border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: visible;
    display: flex;
}

.post-user-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.015);
    border-right: 1px solid var(--forum-glass-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-content-area {
    flex-grow: 1;
    padding: 25px;
    min-width: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 10px 0;
}

.post-user-avatar {
    width: 100px;
    height: 100px;
    border: 2px solid var(--forum-accent);
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    box-shadow: none;
}

.post-user-name {
    font-size: 18px !important;
    font-weight: 400 !important;
    text-shadow: none !important;
}

.sidebar-stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    width: 100%;
}

.sidebar-stat-item:hover {
    border-color: rgba(212, 169, 78, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .forum-stats, .forum-last-post { display: none; }
    .post-container { flex-direction: column; }
    .post-user-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--forum-glass-border);
        flex-direction: row;
        gap: 15px;
        padding: 10px;
    }
    .post-user-avatar { width: 50px; height: 50px; margin-bottom: 0; }
    .post-user-name { font-size: 18px !important; }
}

/* Quill Editor Dark Theme Fixes */
.ql-toolbar.ql-snow {
    border: none !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px !important;
}

.ql-container.ql-snow {
    border: none !important;
    background: transparent !important;
}

.ql-editor {
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    min-height: 200px;
}

.ql-editor.ql-blank::before {
    color: rgba(255, 255, 255, 0.3) !important;
    font-style: normal !important;
}

/* Toolbar Icons & Text */
.ql-snow .ql-stroke { stroke: #ffffff !important; stroke-width: 2px !important; }
.ql-snow .ql-fill { fill: #ffffff !important; }
.ql-snow .ql-picker { color: #ffffff !important; }
.ql-snow .ql-picker-label::before { color: #ffffff !important; }

.ql-snow .ql-picker-options {
    background-color: #1a1d23 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.ql-snow .ql-active .ql-stroke, 
.ql-snow .ql-active .ql-fill,
.ql-snow .ql-active .ql-picker { 
    stroke: #ffbb33 !important;
    fill: #ffbb33 !important;
    color: #ffbb33 !important;
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:hover .ql-fill {
    stroke: #ffbb33 !important;
    fill: #ffbb33 !important;
}

/* Quill Text Alignment Classes */
.ql-align-center {
    text-align: center !important;
}
.ql-align-right {
    text-align: right !important;
}
.ql-align-left {
    text-align: left !important;
}
.ql-align-justify {
    text-align: justify !important;
}

/* Video/Image handling in content */
.post-content .ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    margin: 15px 0;
}

/* Pagination Styles */
.forum-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 169, 78, 0.2);
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-item:hover {
    background: rgba(212, 169, 78, 0.15);
    border-color: var(--forum-accent);
    color: var(--forum-accent) !important;
    transform: translateY(-2px);
}

.pagination-item.active {
    background: linear-gradient(180deg, #d4a94e 0%, #8b6e31 100%);
    border-color: #ffcc66;
    color: #000 !important;
    box-shadow: 0 4px 12px rgba(212, 169, 78, 0.3);
}

.pagination-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pagination-item.wide {
    width: auto;
    padding: 0 15px;
}
