.forum-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 1.5rem 80px;
}

.forum-header {
    text-align: center;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.forum-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.forum-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.forum-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat {
    text-align: center;
}

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

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.forum-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Sidebar */
.forum-sidebar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    flex: 1;
}

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

.user-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: block;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    background: var(--surface);
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Main Forum */
.forum-main {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

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

.toolbar-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-select,
.search-input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.search-input {
    width: 250px;
}

/* Topics List */
.topic-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.3s ease;
}

.topic-item:hover {
    background: var(--surface);
}

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

.topic-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.topic-content {
    flex: 1;
}

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

.topic-title a {
    color: inherit;
    text-decoration: none;
}

.topic-title a:hover {
    color: var(--primary-color);
}

.topic-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.topic-category {
    background: var(--surface);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.topic-stats {
    text-align: center;
    font-size: 0.875rem;
}

.topic-replies {
    font-weight: 600;
    color: var(--primary-color);
}

.topic-views {
    color: var(--text-secondary);
}

.topic-activity {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.page-info {
    color: var(--text-secondary);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.login-footer p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forum-content {
        grid-template-columns: 1fr;
    }
    
    .forum-sidebar {
        position: static;
        order: 2;
    }
    
    .forum-stats {
        gap: 2rem;
    }
    
    .forum-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .toolbar-right {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input {
        width: 100%;
    }
    
    .topic-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .topic-content {
        order: 1;
    }
    
    .topic-avatar {
        order: 2;
        margin: 0 auto;
    }
    
    .topic-stats,
    .topic-activity {
        order: 3;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .forum-container {
        padding: 100px 1rem 60px;
    }
    
    .forum-header {
        padding: 1.5rem;
    }
    
    .forum-header h1 {
        font-size: 2rem;
    }
    
    .forum-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
}