/* Forum Styles */
.forum-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.forum-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.forum-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.forum-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.forum-sidebar .btn {
    width: 100%;
    margin-bottom: 30px;
}

.forum-categories {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-categories h3 {
    margin-bottom: 16px;
    color: #334155;
}

.forum-categories ul {
    list-style: none;
}

.forum-categories li {
    margin-bottom: 8px;
}

.forum-categories a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.forum-categories a:hover,
.forum-categories a.active {
    background: #f1f5f9;
    color: #667eea;
}

.forum-stats {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-stats h3 {
    margin-bottom: 16px;
    color: #334155;
}

.stat-item {
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

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

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
}

.forum-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.forum-posts {
    min-height: 400px;
}

.forum-post {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.forum-post:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #64748b;
}

.pinned {
    color: #f59e0b;
    font-size: 0.85rem;
}

.post-title {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 8px;
}

.post-preview {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-posts i {
    color: #cbd5e1;
    margin-bottom: 20px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
}

.post-full-content {
    margin-bottom: 30px;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
    margin: 20px 0;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.reply-form {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.reply-form h4 {
    margin-bottom: 12px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.reply-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #64748b;
}

.reply-content {
    color: #334155;
    line-height: 1.6;
}

.no-replies {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
}

/* Dark theme support */
[data-theme="dark"] .forum-categories,
[data-theme="dark"] .forum-stats,
[data-theme="dark"] .forum-content,
[data-theme="dark"] .modal-content {
    background: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] .forum-post {
    background: #0f172a;
}

[data-theme="dark"] .forum-post:hover {
    background: #1e293b;
}

[data-theme="dark"] .post-category {
    background: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .post-title {
    color: #f1f5f9;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #334155;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forum-container {
        flex-direction: column;
    }
    
    .forum-sidebar {
        width: 100%;
    }
    
    .forum-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box {
        width: 100%;
    }
}
