
.discussion-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--container-bg);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.discussion-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.discussion-title {
    font-size: 28px;
    color: var(--primary-text);
    margin-bottom: 15px;
}

.discussion-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.tag:hover {
    opacity: 0.8;
}

.tag.active {
    opacity: 0.7;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}

.tag.algebra { background-color: #007bff; }
.tag.quadratic { background-color: #00bcd4; }
.tag.parabolic { background-color: #4caf50; }
.tag.discriminant { background-color: #9c27b0; }
.tag.vertex { background-color: #e91e63; }
.tag.graphing { background-color: #ff9800; }

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

#author-name {
    font-weight: 600;
    color: var(--primary-text);
}

#post-date {
    font-size: 14px;
    color: var(--secondary-text);
}

.discussion-body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--primary-text);
    margin-bottom: 40px;
}

.discussion-body p {
    margin-bottom: 20px;
}

.discussion-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 15px 0;
}

.discussion-body .math-formula {
    background-color: var(--light-bg);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: monospace;
    overflow-x: auto;
    margin: 10px 0;
}

.comments-section {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.comments-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--primary-text);
}

.new-comment {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.new-comment .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-input-container {
    flex: 1;
}

#comment-input {
    width: 100%;
    min-height: 100px;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--primary-text);
    font-size: 16px;
    resize: vertical;
    margin-bottom: 10px;
}

#post-comment-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    float: right;
    transition: background-color 0.2s;
}

#post-comment-btn:hover {
    background-color: var(--primary-hover);
}

.comments-list {
    margin-top: 30px;
}

.comment {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment .user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.comment-date {
    font-size: 14px;
    color: var(--secondary-text);
}

.comment-text {
    color: var(--primary-text);
    line-height: 1.5;
}

.comment-actions {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--secondary-text);
    cursor: pointer;
}

.comment-action:hover {
    color: var(--primary-color);
}

.reply-container {
    margin-left: 60px;
    margin-top: 20px;
}

.reply {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .discussion-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-info {
        margin-top: 10px;
    }
    
    .new-comment {
        flex-direction: column;
    }
    
    .new-comment .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .reply-container {
        margin-left: 20px;
    }
}
